CADI.Viewer.Util
Class OpenURLDialog

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by java.awt.Window
              extended by java.awt.Dialog
                  extended by javax.swing.JDialog
                      extended by CADI.Viewer.Util.OpenURLDialog
All Implemented Interfaces:
java.awt.event.ComponentListener, java.awt.event.FocusListener, java.awt.event.KeyListener, java.awt.event.MouseListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible, javax.swing.RootPaneContainer, javax.swing.WindowConstants

public class OpenURLDialog
extends javax.swing.JDialog
implements java.awt.event.MouseListener, java.awt.event.ComponentListener, java.awt.event.FocusListener, java.awt.event.KeyListener

This class creates a graphical user interface where the user can introduce the target name, server, and the port on the server.

Usage example:
  constructor
  run
  get methods

Version:
1.1 2009/08/18
Author:
Group on Interactive Coding of Images (GICI)
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JDialog
javax.swing.JDialog.AccessibleJDialog
 
Nested classes/interfaces inherited from class java.awt.Dialog
java.awt.Dialog.AccessibleAWTDialog, java.awt.Dialog.ModalExclusionType, java.awt.Dialog.ModalityType
 
Nested classes/interfaces inherited from class java.awt.Window
java.awt.Window.AccessibleAWTWindow
 
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
private  javax.swing.JButton acceptButton
          Accept button
private  javax.swing.JPanel buttonsPane
          Panel where the buttons will be placed.
private  javax.swing.JButton cancelButton
          Cancel button
private static int DIALOG_HEIGHT
          Default height of the dialog window.
private static int DIALOG_WIDTH
          Default with of the dialog window.
private  int height
          Height of the window.
private  javax.swing.JFrame parent
          The owner of this window.
private  int port
          The last port number.
private  javax.swing.Box portBox
          Box where the port number line is placed.
private  javax.swing.JTextField portField
          Text field to input the port number.
private  javax.swing.JPanel proxyPane
          Pane where the proxyServerBox and proxyPortBox boxes will be placed.
private  int proxyPort
          Is the proxy port to be used.
private  javax.swing.Box proxyPortBox
          Box where the port number line is placed.
private  javax.swing.JTextField proxyPortField
          Text field to input the port number.
private  java.lang.String proxyServer
          Is the server proxy, if it is used.
private  javax.swing.Box proxyServerBox
          Box where the server line is placed.
private  javax.swing.JTextField proxyServerField
          Text field to input the server name.
private  java.lang.String server
          The last server name.
private  javax.swing.Box serverBox
          Box where the server line is placed.
private  javax.swing.JTextField serverField
          Text field to input the server name.
private  javax.swing.JPanel serverPane
          Pane where the targetBox, serverBox, and portBox will be p.
private  java.lang.String target
          The last target name.
private  javax.swing.Box targetBox
          Box where the target line is placed.
private  javax.swing.JTextField targetField
          Text field to input the target.
private  int width
          Width of the window.
 
Fields inherited from class javax.swing.JDialog
accessibleContext, rootPane, rootPaneCheckingEnabled
 
Fields inherited from class java.awt.Dialog
DEFAULT_MODALITY_TYPE
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface javax.swing.WindowConstants
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSE
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
OpenURLDialog(javax.swing.JFrame owner)
          Constructor.
 
Method Summary
 void componentHidden(java.awt.event.ComponentEvent e)
           
 void componentMoved(java.awt.event.ComponentEvent e)
           
 void componentResized(java.awt.event.ComponentEvent e)
           
 void componentShown(java.awt.event.ComponentEvent e)
           
private  void createAndShowGUI()
          Creates and shows the graphical interface and shows it.
private  javax.swing.JPanel createButtonsPane()
          Creates the panel where buttons will be located.
private  javax.swing.JPanel createFormPane()
          Creates the pane where jpip server data are placed.
private  javax.swing.JPanel createProxyPane()
          Creates the pane where the proxy data are placed.
 void focusGained(java.awt.event.FocusEvent e)
           
 void focusLost(java.awt.event.FocusEvent e)
           
 int getPort()
          Returns the port attribute.
 int getProxyPort()
          Returns the proxyPort attribute.
 java.lang.String getProxyServer()
          Returns the proxyServer attribute.
 java.lang.String getServer()
          Returns the server attribute.
 java.lang.String getTarget()
          Returns the target attribute.
 void keyPressed(java.awt.event.KeyEvent e)
           
 void keyReleased(java.awt.event.KeyEvent e)
           
 void keyTyped(java.awt.event.KeyEvent e)
           
 void mouseClicked(java.awt.event.MouseEvent e)
           
 void mouseEntered(java.awt.event.MouseEvent e)
           
 void mouseExited(java.awt.event.MouseEvent e)
           
 void mousePressed(java.awt.event.MouseEvent e)
           
 void mouseReleased(java.awt.event.MouseEvent e)
           
 void run()
          Displays the dialog.
 
Methods inherited from class javax.swing.JDialog
addImpl, createRootPane, dialogInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update
 
Methods inherited from class java.awt.Dialog
addNotify, getModalityType, getTitle, hide, isModal, isResizable, isUndecorated, setModal, setModalityType, setResizable, setTitle, setUndecorated, setVisible, show, toBack
 
Methods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOwnedWindows, getOwner, getOwnerlessWindows, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isShowing, pack, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeNotify, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImage, setIconImages, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, toFront
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resize, resize, setBackground, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DIALOG_WIDTH

private static final int DIALOG_WIDTH
Default with of the dialog window.

See Also:
Constant Field Values

DIALOG_HEIGHT

private static final int DIALOG_HEIGHT
Default height of the dialog window.

See Also:
Constant Field Values

parent

private javax.swing.JFrame parent
The owner of this window.


target

private java.lang.String target
The last target name.


server

private java.lang.String server
The last server name.


port

private int port
The last port number.


proxyServer

private java.lang.String proxyServer
Is the server proxy, if it is used.


proxyPort

private int proxyPort
Is the proxy port to be used.


width

private int width
Width of the window.


height

private int height
Height of the window.


serverPane

private javax.swing.JPanel serverPane
Pane where the targetBox, serverBox, and portBox will be p.


targetBox

private javax.swing.Box targetBox
Box where the target line is placed.


serverBox

private javax.swing.Box serverBox
Box where the server line is placed.


portBox

private javax.swing.Box portBox
Box where the port number line is placed.


targetField

private javax.swing.JTextField targetField
Text field to input the target.


serverField

private javax.swing.JTextField serverField
Text field to input the server name.


portField

private javax.swing.JTextField portField
Text field to input the port number.


proxyPane

private javax.swing.JPanel proxyPane
Pane where the proxyServerBox and proxyPortBox boxes will be placed.


proxyServerBox

private javax.swing.Box proxyServerBox
Box where the server line is placed.


proxyPortBox

private javax.swing.Box proxyPortBox
Box where the port number line is placed.


proxyServerField

private javax.swing.JTextField proxyServerField
Text field to input the server name.


proxyPortField

private javax.swing.JTextField proxyPortField
Text field to input the port number.


buttonsPane

private javax.swing.JPanel buttonsPane
Panel where the buttons will be placed.


acceptButton

private javax.swing.JButton acceptButton
Accept button


cancelButton

private javax.swing.JButton cancelButton
Cancel button

Constructor Detail

OpenURLDialog

public OpenURLDialog(javax.swing.JFrame owner)
Constructor.

Parameters:
owner - the parent window.
Method Detail

run

public void run()
Displays the dialog.


getTarget

public java.lang.String getTarget()
Returns the target attribute.

Returns:
the target attribute.

getServer

public java.lang.String getServer()
Returns the server attribute.

Returns:
the server attribute.

getPort

public int getPort()
Returns the port attribute.

Returns:
the port attribute.

getProxyServer

public java.lang.String getProxyServer()
Returns the proxyServer attribute.

Returns:
the proxyServer attribute.

getProxyPort

public int getProxyPort()
Returns the proxyPort attribute.

Returns:
the proxyPort attribute.

createAndShowGUI

private void createAndShowGUI()
Creates and shows the graphical interface and shows it.


createFormPane

private javax.swing.JPanel createFormPane()
Creates the pane where jpip server data are placed.

Returns:
a JPanel

createProxyPane

private javax.swing.JPanel createProxyPane()
Creates the pane where the proxy data are placed.

Returns:

createButtonsPane

private javax.swing.JPanel createButtonsPane()
Creates the panel where buttons will be located.

Returns:
a JPanel with the buttons.

mouseClicked

public void mouseClicked(java.awt.event.MouseEvent e)
Specified by:
mouseClicked in interface java.awt.event.MouseListener

mouseEntered

public void mouseEntered(java.awt.event.MouseEvent e)
Specified by:
mouseEntered in interface java.awt.event.MouseListener

mouseExited

public void mouseExited(java.awt.event.MouseEvent e)
Specified by:
mouseExited in interface java.awt.event.MouseListener

mousePressed

public void mousePressed(java.awt.event.MouseEvent e)
Specified by:
mousePressed in interface java.awt.event.MouseListener

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent e)
Specified by:
mouseReleased in interface java.awt.event.MouseListener

componentHidden

public void componentHidden(java.awt.event.ComponentEvent e)
Specified by:
componentHidden in interface java.awt.event.ComponentListener

componentMoved

public void componentMoved(java.awt.event.ComponentEvent e)
Specified by:
componentMoved in interface java.awt.event.ComponentListener

componentResized

public void componentResized(java.awt.event.ComponentEvent e)
Specified by:
componentResized in interface java.awt.event.ComponentListener

componentShown

public void componentShown(java.awt.event.ComponentEvent e)
Specified by:
componentShown in interface java.awt.event.ComponentListener

focusGained

public void focusGained(java.awt.event.FocusEvent e)
Specified by:
focusGained in interface java.awt.event.FocusListener

focusLost

public void focusLost(java.awt.event.FocusEvent e)
Specified by:
focusLost in interface java.awt.event.FocusListener

keyPressed

public void keyPressed(java.awt.event.KeyEvent e)
Specified by:
keyPressed in interface java.awt.event.KeyListener

keyReleased

public void keyReleased(java.awt.event.KeyEvent e)
Specified by:
keyReleased in interface java.awt.event.KeyListener

keyTyped

public void keyTyped(java.awt.event.KeyEvent e)
Specified by:
keyTyped in interface java.awt.event.KeyListener


CADI - Copyright (C) 2007
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

Group on Interactive Coding of Images (GICI) (contact)