com.isti.util.database
Class IstiConnectionInfoPanel

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JPanel
                  extended by com.isti.util.database.IstiConnectionInfoPanel
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible

public class IstiConnectionInfoPanel
extends javax.swing.JPanel

Class IstiConnectionInfoPanel defines a connection information panel.

See Also:
Serialized Form

Nested Class Summary
protected  class IstiConnectionInfoPanel.UpdateListener
          Update listener class.
 
Nested classes/interfaces inherited from class javax.swing.JPanel
javax.swing.JPanel.AccessibleJPanel
 
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
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
protected  javax.swing.JTextField databaseField
           
protected  javax.swing.JLabel databaseLabel
           
protected  javax.swing.JTextField hostnameField
           
protected  javax.swing.JLabel hostnameLabel
           
protected  java.util.Vector listenerList
           
static java.lang.String LOGIN_DIALOG_CANCEL_OPTION_STRING
          Login dialog cancel option string.
static java.lang.String LOGIN_DIALOG_DEFAULT_OPTION_STRING
          Login dialog default option string.
static java.lang.String LOGIN_DIALOG_DEFAULT_TITLE_STRING
          Login dialog default title string.
protected  MultiLineJLabel panelPromptTextObj
           
protected  javax.swing.JPasswordField passwordField
           
protected  javax.swing.JLabel passwordLabel
           
protected  javax.swing.JTextField portField
           
protected  javax.swing.JLabel portLabel
           
static int USERNAME_COLUMNS
          The default number of characters in the username field.
protected  javax.swing.JTextField usernameField
           
protected  javax.swing.JLabel usernameLabel
           
 
Fields inherited from class javax.swing.JComponent
accessibleContext, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
  IstiConnectionInfoPanel()
          Creates a connection information panel.
  IstiConnectionInfoPanel(int columns)
          Creates a connection information panel.
  IstiConnectionInfoPanel(int columns, java.lang.String notAllowedChars)
          Creates a connection information panel with restricted character input for the username.
protected IstiConnectionInfoPanel(javax.swing.JTextField usernameField)
          Creates a connection information panel.
  IstiConnectionInfoPanel(java.lang.String panelPromptStr)
          Creates a connection information panel.
  IstiConnectionInfoPanel(java.lang.String panelPromptStr, int columns)
          Creates a connection information panel.
  IstiConnectionInfoPanel(java.lang.String panelPromptStr, int columns, java.lang.String notAllowedChars)
          Creates a connection information panel with restricted character input for the username.
protected IstiConnectionInfoPanel(java.lang.String panelPromptStr, javax.swing.JTextField usernameField)
          Creates a connection information panel.
 
Method Summary
 void addActionListener(java.awt.event.ActionListener l)
          Adds an ActionListener to the panel.
static IstiDialogPopup createLoginDialog(java.awt.Component parentComp)
           
static IstiDialogPopup createLoginDialog(java.awt.Component parentComp, java.lang.Object msgObj)
           
static IstiDialogPopup createLoginDialog(java.awt.Component parentComp, java.lang.Object msgObj, java.lang.String titleStr)
           
static IstiDialogPopup createLoginDialog(java.awt.Component parentComp, java.lang.Object msgObj, java.lang.String titleStr, java.lang.Object optionObj)
           
protected  void fireActionPerformed(java.awt.event.ActionEvent event)
          Notifies all listeners that have registered interest for notification on this event type.
 java.lang.String getDatabase()
          Gets the database text.
 java.lang.String getHostname()
          Gets the hostname text.
 java.lang.String getPassword()
          Returns the password text.
 java.lang.String getPort()
          Gets the port text.
 java.lang.String getUsername()
          Returns the username text.
 javax.swing.JTextField getUsernameFieldObj()
          Returns the 'JTextField' object for the username.
 void removeActionListener(java.awt.event.ActionListener l)
          Removes an ActionListener from the panel.
 void setDatabase(java.lang.String database)
          Sets the database text.
 void setDatabaseVisible(boolean b)
          Sets if the database is visible.
 void setHostname(java.lang.String hostname)
          Sets the hostname text.
 void setHostnameVisible(boolean b)
          Sets if the host name is visible.
 void setInitialFocus()
          Requests that the current "initial" component have the keyboard focus.
 void setPassword(java.lang.String passwordText)
          Sets the password text.
 void setPort(java.lang.String port)
          Sets the port text.
 void setPortVisible(boolean b)
          Sets if the port is visible.
 void setUsername(java.lang.String usernameText)
          Sets the username text.
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, 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, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

hostnameLabel

protected final javax.swing.JLabel hostnameLabel

hostnameField

protected final javax.swing.JTextField hostnameField

portLabel

protected final javax.swing.JLabel portLabel

portField

protected final javax.swing.JTextField portField

databaseLabel

protected final javax.swing.JLabel databaseLabel

databaseField

protected final javax.swing.JTextField databaseField

usernameLabel

protected final javax.swing.JLabel usernameLabel

usernameField

protected final javax.swing.JTextField usernameField

passwordLabel

protected final javax.swing.JLabel passwordLabel

passwordField

protected final javax.swing.JPasswordField passwordField

panelPromptTextObj

protected final MultiLineJLabel panelPromptTextObj

listenerList

protected final java.util.Vector listenerList

LOGIN_DIALOG_DEFAULT_TITLE_STRING

public static java.lang.String LOGIN_DIALOG_DEFAULT_TITLE_STRING
Login dialog default title string.


LOGIN_DIALOG_DEFAULT_OPTION_STRING

public static java.lang.String LOGIN_DIALOG_DEFAULT_OPTION_STRING
Login dialog default option string.


LOGIN_DIALOG_CANCEL_OPTION_STRING

public static java.lang.String LOGIN_DIALOG_CANCEL_OPTION_STRING
Login dialog cancel option string.


USERNAME_COLUMNS

public static final int USERNAME_COLUMNS
The default number of characters in the username field.

See Also:
Constant Field Values
Constructor Detail

IstiConnectionInfoPanel

public IstiConnectionInfoPanel()
Creates a connection information panel.


IstiConnectionInfoPanel

public IstiConnectionInfoPanel(java.lang.String panelPromptStr)
Creates a connection information panel.

Parameters:
panelPromptStr - the "prompt" text to be shown on the panel, or null for none.
See Also:
createPasswordPanel

IstiConnectionInfoPanel

public IstiConnectionInfoPanel(int columns)
Creates a connection information panel.

Parameters:
columns - the number of the columns for the username field.

IstiConnectionInfoPanel

public IstiConnectionInfoPanel(java.lang.String panelPromptStr,
                               int columns)
Creates a connection information panel.

Parameters:
panelPromptStr - the "prompt" text to be shown on the panel, or null for none.
columns - the number of the columns for the username field.

IstiConnectionInfoPanel

public IstiConnectionInfoPanel(int columns,
                               java.lang.String notAllowedChars)
Creates a connection information panel with restricted character input for the username.

Parameters:
columns - the number of the columns for the field.
notAllowedChars - a String of characters not allowed to be entered into the username field.
See Also:
createRestrictedPasswordPanel, USERNAME_COLUMNS, USERNAME_NOT_ALLOWED_CHARS

IstiConnectionInfoPanel

public IstiConnectionInfoPanel(java.lang.String panelPromptStr,
                               int columns,
                               java.lang.String notAllowedChars)
Creates a connection information panel with restricted character input for the username.

Parameters:
panelPromptStr - the "prompt" text to be shown on the panel, or null for none.
columns - the number of the columns for the field.
notAllowedChars - a String of characters not allowed to be entered into the username field.
See Also:
createRestrictedPasswordPanel, USERNAME_COLUMNS, USERNAME_NOT_ALLOWED_CHARS

IstiConnectionInfoPanel

protected IstiConnectionInfoPanel(javax.swing.JTextField usernameField)
Creates a connection information panel.

Parameters:
usernameField - the username text field.

IstiConnectionInfoPanel

protected IstiConnectionInfoPanel(java.lang.String panelPromptStr,
                                  javax.swing.JTextField usernameField)
Creates a connection information panel.

Parameters:
panelPromptStr - the "prompt" text to be shown on the panel, or null for none.
usernameField - the username text field.
Method Detail

setInitialFocus

public void setInitialFocus()
Requests that the current "initial" component have the keyboard focus.


getPassword

public java.lang.String getPassword()
Returns the password text.

Returns:
the password text.

setPassword

public void setPassword(java.lang.String passwordText)
Sets the password text.

Parameters:
passwordText - password text to use.

getUsername

public java.lang.String getUsername()
Returns the username text.

Returns:
the username text.

setUsername

public void setUsername(java.lang.String usernameText)
Sets the username text.

Parameters:
usernameText - username text to use.

getHostname

public java.lang.String getHostname()
Gets the hostname text.

Returns:
the hostname text.

setHostname

public void setHostname(java.lang.String hostname)
Sets the hostname text.

Parameters:
hostname - the hostname text.

setHostnameVisible

public void setHostnameVisible(boolean b)
Sets if the host name is visible.

Parameters:
b - true if visible, false otherwise.

getPort

public java.lang.String getPort()
Gets the port text.

Returns:
the port text.

setPort

public void setPort(java.lang.String port)
Sets the port text.

Parameters:
port - the port text.

setPortVisible

public void setPortVisible(boolean b)
Sets if the port is visible.

Parameters:
b - true if visible, false otherwise.

getDatabase

public java.lang.String getDatabase()
Gets the database text.

Returns:
the database text.

setDatabase

public void setDatabase(java.lang.String database)
Sets the database text.

Parameters:
database - the database text.

setDatabaseVisible

public void setDatabaseVisible(boolean b)
Sets if the database is visible.

Parameters:
b - true if visible, false otherwise.

getUsernameFieldObj

public javax.swing.JTextField getUsernameFieldObj()
Returns the 'JTextField' object for the username.

Returns:
The 'JTextField' object for the username.

addActionListener

public void addActionListener(java.awt.event.ActionListener l)
Adds an ActionListener to the panel.

Parameters:
l - the ActionListener to be added.

removeActionListener

public void removeActionListener(java.awt.event.ActionListener l)
Removes an ActionListener from the panel. If the listener is the currently set Action for the panel, then the Action is set to null.

Parameters:
l - the listener to be removed.

fireActionPerformed

protected void fireActionPerformed(java.awt.event.ActionEvent event)
Notifies all listeners that have registered interest for notification on this event type. The event instance is lazily created using the parameters passed into the fire method.

Parameters:
event - the ChangeEvent object
See Also:
EventListenerList

createLoginDialog

public static IstiDialogPopup createLoginDialog(java.awt.Component parentComp)
Parameters:
parentComp - the parent component for the popup.
Returns:
login dialog

createLoginDialog

public static IstiDialogPopup createLoginDialog(java.awt.Component parentComp,
                                                java.lang.Object msgObj)
Parameters:
parentComp - the parent component for the popup.
msgObj - the message object to be shown.
Returns:
login dialog

createLoginDialog

public static IstiDialogPopup createLoginDialog(java.awt.Component parentComp,
                                                java.lang.Object msgObj,
                                                java.lang.String titleStr)
Parameters:
parentComp - the parent component for the popup.
msgObj - the message object to be shown.
titleStr - the title string for popup window.
Returns:
login dialog

createLoginDialog

public static IstiDialogPopup createLoginDialog(java.awt.Component parentComp,
                                                java.lang.Object msgObj,
                                                java.lang.String titleStr,
                                                java.lang.Object optionObj)
Parameters:
parentComp - the parent component for the popup.
msgObj - the message object to be shown.
titleStr - the title string for popup window.
optionObj - the Object that defines the button, or null to display no buttons.
Returns:
login dialog