|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.Component java.awt.Container javax.swing.JComponent javax.swing.JPanel com.isti.util.gui.IstiPasswordPanel
public class IstiPasswordPanel
Class IstiPasswordPanel defines a password panel.
Nested Class Summary | |
---|---|
protected class |
IstiPasswordPanel.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 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
|
static int |
USERNAME_COLUMNS
The default number of characters in the username field. |
static java.lang.String |
USERNAME_NOT_ALLOWED_CHARS
The default for not allowed 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 | |
---|---|
|
IstiPasswordPanel()
Creates a password panel. |
|
IstiPasswordPanel(int columns)
Creates a password panel. |
|
IstiPasswordPanel(int columns,
java.lang.String notAllowedChars)
Creates a password panel with restricted character input for the username. |
protected |
IstiPasswordPanel(javax.swing.JTextField usernameField)
Creates a password panel. |
|
IstiPasswordPanel(java.lang.String panelPromptStr)
Creates a password panel. |
|
IstiPasswordPanel(java.lang.String panelPromptStr,
int columns)
Creates a password panel. |
|
IstiPasswordPanel(java.lang.String panelPromptStr,
int columns,
java.lang.String notAllowedChars)
Creates a password panel with restricted character input for the username. |
protected |
IstiPasswordPanel(java.lang.String panelPromptStr,
javax.swing.JTextField usernameField)
Creates a password 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)
|
static IstiPasswordPanel |
createPasswordPanel()
Creates a password panel. |
static IstiPasswordPanel |
createPasswordPanel(java.lang.String panelPromptStr)
Creates a password panel. |
static IstiPasswordPanel |
createRestrictedPasswordPanel()
Creates a password panel with restricted character input for the username. |
static IstiPasswordPanel |
createRestrictedPasswordPanel(java.lang.String panelPromptStr)
Creates a password panel with restricted character input for the username. |
protected void |
fireActionPerformed(java.awt.event.ActionEvent event)
Notifies all listeners that have registered interest for notification on this event type. |
java.lang.String |
getPassword()
Returns the password text and clear the password characters. |
java.net.PasswordAuthentication |
getPasswordAuthentication()
Get the password authentication. |
char[] |
getPasswordChars()
Returns the password characters. |
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 |
setInitialFocus()
Requests that the current "initial" component have the keyboard focus. |
void |
setPassword(java.lang.String passwordText)
Sets the password text. |
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 |
---|
protected final javax.swing.JLabel usernameLabel
protected final javax.swing.JTextField usernameField
protected final javax.swing.JLabel passwordLabel
protected final javax.swing.JPasswordField passwordField
protected final MultiLineJLabel panelPromptTextObj
protected final java.util.Vector listenerList
public static java.lang.String LOGIN_DIALOG_DEFAULT_TITLE_STRING
public static java.lang.String LOGIN_DIALOG_DEFAULT_OPTION_STRING
public static java.lang.String LOGIN_DIALOG_CANCEL_OPTION_STRING
public static final int USERNAME_COLUMNS
public static final java.lang.String USERNAME_NOT_ALLOWED_CHARS
Constructor Detail |
---|
public IstiPasswordPanel()
createPasswordPanel
public IstiPasswordPanel(java.lang.String panelPromptStr)
panelPromptStr
- the "prompt" text to be shown on the panel,
or null for none.createPasswordPanel
public IstiPasswordPanel(int columns)
columns
- the number of the columns for the username field.public IstiPasswordPanel(java.lang.String panelPromptStr, int columns)
panelPromptStr
- the "prompt" text to be shown on the panel,
or null for none.columns
- the number of the columns for the username field.public IstiPasswordPanel(int columns, java.lang.String notAllowedChars)
columns
- the number of the columns for the field.notAllowedChars
- a String of characters not allowed to be entered
into the username field.createRestrictedPasswordPanel
,
USERNAME_COLUMNS, USERNAME_NOT_ALLOWED_CHARS
public IstiPasswordPanel(java.lang.String panelPromptStr, int columns, java.lang.String notAllowedChars)
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.createRestrictedPasswordPanel
,
USERNAME_COLUMNS, USERNAME_NOT_ALLOWED_CHARS
protected IstiPasswordPanel(javax.swing.JTextField usernameField)
usernameField
- the username text field.protected IstiPasswordPanel(java.lang.String panelPromptStr, javax.swing.JTextField usernameField)
panelPromptStr
- the "prompt" text to be shown on the panel,
or null for none.usernameField
- the username text field.Method Detail |
---|
public void setInitialFocus()
public java.lang.String getPassword()
public java.net.PasswordAuthentication getPasswordAuthentication()
getPasswordAuthentication
in interface PasswordAuthenticator
public char[] getPasswordChars()
public void setPassword(java.lang.String passwordText)
passwordText
- password text to use.public java.lang.String getUsername()
public void setUsername(java.lang.String usernameText)
usernameText
- username text to use.public javax.swing.JTextField getUsernameFieldObj()
public void addActionListener(java.awt.event.ActionListener l)
ActionListener
to the panel.
l
- the ActionListener
to be added.public void removeActionListener(java.awt.event.ActionListener l)
ActionListener
from the panel.
If the listener is the currently set Action
for the panel, then the Action
is set to null
.
l
- the listener to be removed.protected void fireActionPerformed(java.awt.event.ActionEvent event)
event
- the ChangeEvent
objectEventListenerList
public static IstiPasswordPanel createPasswordPanel()
public static IstiPasswordPanel createPasswordPanel(java.lang.String panelPromptStr)
panelPromptStr
- the "prompt" text to be shown on the panel,
or null for none.
public static IstiPasswordPanel createRestrictedPasswordPanel()
public static IstiPasswordPanel createRestrictedPasswordPanel(java.lang.String panelPromptStr)
panelPromptStr
- the "prompt" text to be shown on the panel,
or null for none.
public static IstiDialogPopup createLoginDialog(java.awt.Component parentComp)
parentComp
- the parent component for the popup.
public static IstiDialogPopup createLoginDialog(java.awt.Component parentComp, java.lang.Object msgObj)
parentComp
- the parent component for the popup.msgObj
- the message object to be shown.
public static IstiDialogPopup createLoginDialog(java.awt.Component parentComp, java.lang.Object msgObj, java.lang.String titleStr)
parentComp
- the parent component for the popup.msgObj
- the message object to be shown.titleStr
- the title string for popup window.
public static IstiDialogPopup createLoginDialog(java.awt.Component parentComp, java.lang.Object msgObj, java.lang.String titleStr, java.lang.Object optionObj)
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.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |