public class IstiPasswordPanel extends javax.swing.JPanel implements PasswordAuthenticator
Modifier and Type | Class and Description |
---|---|
protected class |
IstiPasswordPanel.UpdateListener
Update listener class.
|
javax.swing.JPanel.AccessibleJPanel
javax.swing.JComponent.AccessibleJComponent
Modifier and Type | Field and Description |
---|---|
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 IstiPasswordField |
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 |
TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Modifier | Constructor and Description |
---|---|
|
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.
|
Modifier and Type | Method and Description |
---|---|
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.
|
char[] |
getPassword()
Returns the password.
|
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(char[] password)
Sets the password.
|
void |
setUsername(java.lang.String usernameText)
Sets the username text.
|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
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, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, 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
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, transferFocusDownCycle, validate, validateTree
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, 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, transferFocusBackward, transferFocusUpCycle
protected final javax.swing.JLabel usernameLabel
protected final javax.swing.JTextField usernameField
protected final javax.swing.JLabel passwordLabel
protected final IstiPasswordField 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
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.public void setInitialFocus()
public char[] getPassword()
public java.net.PasswordAuthentication getPasswordAuthentication()
getPasswordAuthentication
in interface PasswordAuthenticator
public char[] getPasswordChars()
public void setPassword(char[] password)
passwordText
- password 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.