public class AuthenticationWindow extends SIPCommDialog implements java.awt.event.ActionListener, AuthenticationWindowService.AuthenticationWindow
SIPCommDialog.DialogWindowAdapter
javax.swing.JDialog.AccessibleJDialog
java.awt.Dialog.AccessibleAWTDialog, java.awt.Dialog.ModalExclusionType, java.awt.Dialog.ModalityType
java.awt.Window.AccessibleAWTWindow, java.awt.Window.Type
accessibleContext, rootPane, rootPaneCheckingEnabled
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Constructor and Description |
---|
AuthenticationWindow(java.awt.Dialog owner,
java.lang.String userName,
char[] password,
java.lang.String server,
boolean isUserNameEditable,
javax.swing.ImageIcon icon)
Creates an instance of the LoginWindow.
|
AuthenticationWindow(java.lang.String server,
boolean isUserNameEditable,
javax.swing.ImageIcon icon)
Creates an instance of the LoginWindow.
|
AuthenticationWindow(java.lang.String userName,
char[] password,
java.lang.String server,
boolean isUserNameEditable,
boolean isRememberPassword,
javax.swing.ImageIcon icon,
java.lang.String windowTitle,
java.lang.String windowText,
java.lang.String usernameLabelText,
java.lang.String passwordLabelText,
java.lang.String errorMessage,
java.lang.String signupLink)
Creates an instance of the LoginWindow.
|
AuthenticationWindow(java.lang.String userName,
char[] password,
java.lang.String server,
boolean isUserNameEditable,
javax.swing.ImageIcon icon)
Creates an instance of the LoginWindow.
|
AuthenticationWindow(java.lang.String userName,
char[] password,
java.lang.String server,
boolean isUserNameEditable,
javax.swing.ImageIcon icon,
java.lang.String errorMessage)
Creates an instance of the LoginWindow.
|
AuthenticationWindow(java.lang.String userName,
char[] password,
java.lang.String server,
boolean isUserNameEditable,
javax.swing.ImageIcon icon,
java.lang.String errorMessage,
java.lang.String signupLink)
Creates an instance of the LoginWindow.
|
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent evt)
Handles the ActionEvent triggered when one of the buttons is
clicked.
|
protected void |
close(boolean isEscaped)
Automatically clicks the cancel button, when this window is closed.
|
static javax.swing.ImageIcon |
getAuthenticationWindowIcon(ProtocolProviderService protocolProvider)
Returns the icon corresponding to the given protocolProvider.
|
char[] |
getPassword()
Returns the password entered by the user.
|
java.lang.String |
getUserName()
Returns the user name entered by the user or previously set if the
user name is not editable.
|
boolean |
isCanceled()
Indicates if this window has been canceled.
|
boolean |
isRememberPassword()
Indicates if the password should be remembered.
|
void |
setAllowSavePassword(boolean allow)
Shows or hides the "save password" checkbox.
|
void |
setVisible(boolean isVisible)
Shows this modal dialog.
|
addKeyBinding, dispose
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
addNotify, getModalityType, getTitle, hide, isModal, isResizable, isUndecorated, setBackground, setModal, setModalityType, setOpacity, setResizable, setShape, setTitle, setUndecorated, show, toBack
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, getBackground, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOpacity, getOwnedWindows, getOwner, getOwnerlessWindows, getShape, getToolkit, getType, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isAutoRequestFocus, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isOpaque, isShowing, isValidateRoot, pack, paint, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeNotify, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setAutoRequestFocus, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImage, setIconImages, setLocation, setLocation, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setType, toFront
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, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusDownCycle, validate, validateTree
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, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, 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, 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, revalidate, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setMaximumSize, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
public AuthenticationWindow(java.lang.String server, boolean isUserNameEditable, javax.swing.ImageIcon icon)
server
- the server nameisUserNameEditable
- indicates if the user name is editableicon
- the icon to display on the left of the authentication windowAuthenticationWindow(java.lang.String userName, char[] password, java.lang.String server, boolean isUserNameEditable, boolean isRememberPassword, javax.swing.ImageIcon icon, java.lang.String windowTitle, java.lang.String windowText, java.lang.String usernameLabelText, java.lang.String passwordLabelText, java.lang.String errorMessage, java.lang.String signupLink)
server
- the server nameisUserNameEditable
- indicates if the user name is editableicon
- the icon to display on the left of the authentication windowwindowTitle
- customized window titlewindowText
- customized window textusernameLabelText
- customized username field label textpasswordLabelText
- customized password field label texterrorMessage
- an error message if this dialog is shown to indicate
the user that something went wrongsignupLink
- an URL that allows the user to sign uppublic AuthenticationWindow(java.lang.String userName, char[] password, java.lang.String server, boolean isUserNameEditable, javax.swing.ImageIcon icon, java.lang.String errorMessage)
userName
- the user name to set by defaultpassword
- the password to set by defaultserver
- the server name this authentication window is aboutisUserNameEditable
- indicates if the user name should be editable
by the user or noticon
- the icon displayed on the left of the authentication windowerrorMessage
- an error message explaining a reason for opening
the authentication dialog (when a wrong password was provided, etc.)public AuthenticationWindow(java.lang.String userName, char[] password, java.lang.String server, boolean isUserNameEditable, javax.swing.ImageIcon icon, java.lang.String errorMessage, java.lang.String signupLink)
userName
- the user name to set by defaultpassword
- the password to set by defaultserver
- the server name this authentication window is aboutisUserNameEditable
- indicates if the user name should be editable
by the user or noticon
- the icon displayed on the left of the authentication windowerrorMessage
- an error message explaining a reason for opening
the authentication dialog (when a wrong password was provided, etc.)signupLink
- an URL that allows the user to sign uppublic AuthenticationWindow(java.lang.String userName, char[] password, java.lang.String server, boolean isUserNameEditable, javax.swing.ImageIcon icon)
userName
- the user name to set by defaultpassword
- the password to set by defaultserver
- the server name this authentication window is aboutisUserNameEditable
- indicates if the user name should be editable
by the user or noticon
- the icon displayed on the left of the authentication windowpublic AuthenticationWindow(java.awt.Dialog owner, java.lang.String userName, char[] password, java.lang.String server, boolean isUserNameEditable, javax.swing.ImageIcon icon)
owner
- the owner of this dialoguserName
- the user name to set by defaultpassword
- the password to set by defaultserver
- the server name this authentication window is aboutisUserNameEditable
- indicates if the user name should be editable
by the user or noticon
- the icon displayed on the left of the authentication windowpublic void setAllowSavePassword(boolean allow)
setAllowSavePassword
in interface AuthenticationWindowService.AuthenticationWindow
allow
- the checkbox is shown when allow is truepublic void actionPerformed(java.awt.event.ActionEvent evt)
actionPerformed
in interface java.awt.event.ActionListener
evt
- the action event that has just occurred.protected void close(boolean isEscaped)
close
in class SIPCommDialog
isEscaped
- indicates if the window has been closed by pressing the
Esc keypublic void setVisible(boolean isVisible)
setVisible
in interface AuthenticationWindowService.AuthenticationWindow
setVisible
in class SIPCommDialog
isVisible
- specifies whether we should be showing or hiding the
window.public boolean isCanceled()
isCanceled
in interface AuthenticationWindowService.AuthenticationWindow
public java.lang.String getUserName()
getUserName
in interface AuthenticationWindowService.AuthenticationWindow
public char[] getPassword()
getPassword
in interface AuthenticationWindowService.AuthenticationWindow
public boolean isRememberPassword()
isRememberPassword
in interface AuthenticationWindowService.AuthenticationWindow
public static javax.swing.ImageIcon getAuthenticationWindowIcon(ProtocolProviderService protocolProvider)
protocolProvider
- the ProtocolProviderService, which icon
we're looking for
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.