|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
java.awt.Window
java.awt.Dialog
javax.swing.JDialog
org.jdesktop.swingx.JXLoginDialog
public class JXLoginDialog
A standard login dialog that provides a reasonable amount of flexibility
while also providing ease of use and a professional look. The dialog is intended for simple cases or
when modality is required. The implementation of login service needs to be set for the dialog to verify user provided credentials.
When other constructors are used to create the dialog, proper login service can be provided by calling
JXLoginDialog dialog = new JXLoginDialog(new LoginService() {
public boolean authenticate(String name, char[] password,
String server) throws Exception {
//verify user credentials and return true on success or false on failure.
return success;
}}, null, null);
dialog.setVisible(true);
In case no login service is provided whatsoever, the default login service implementation will be used.
This implementation allows access to everyone!
dialog.getPanel.setLoginService(service);
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JDialog |
---|
JDialog.AccessibleJDialog |
Nested classes/interfaces inherited from class java.awt.Dialog |
---|
Dialog.AccessibleAWTDialog |
Nested classes/interfaces inherited from class java.awt.Window |
---|
Window.AccessibleAWTWindow |
Nested classes/interfaces inherited from class java.awt.Container |
---|
Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary |
---|
Fields inherited from class javax.swing.JDialog |
---|
accessibleContext, rootPane, rootPaneCheckingEnabled |
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 | |
---|---|
JXLoginDialog()
Creates a non-modal dialog without a title and without a specified Frame owner. |
|
JXLoginDialog(Dialog owner)
Creates a non-modal dialog without a title with the specified Dialog as its owner. |
|
JXLoginDialog(Dialog owner,
boolean modal)
Creates a modal or non-modal dialog without a title and with the specified owner dialog. |
|
JXLoginDialog(Dialog owner,
String title)
Creates a non-modal dialog with the specified title and with the specified owner dialog. |
|
JXLoginDialog(Dialog owner,
String title,
boolean modal)
Creates a modal or non-modal dialog with the specified title and the specified owner frame. |
|
JXLoginDialog(Dialog owner,
String title,
boolean modal,
GraphicsConfiguration gc)
Creates a modal or non-modal dialog with the specified title, owner Dialog , and GraphicsConfiguration . |
|
JXLoginDialog(Frame owner)
Creates a non-modal dialog without a title with the specified Frame as its owner. |
|
JXLoginDialog(Frame owner,
boolean modal)
Creates a modal or non-modal dialog without a title and with the specified owner Frame . |
|
JXLoginDialog(Frame owner,
String title)
Creates a non-modal dialog with the specified title and with the specified owner frame. |
|
JXLoginDialog(Frame owner,
String title,
boolean modal)
Creates a modal or non-modal dialog with the specified title and the specified owner Frame . |
|
JXLoginDialog(Frame owner,
String title,
boolean modal,
GraphicsConfiguration gc)
Creates a modal or non-modal dialog with the specified title, owner Frame , and GraphicsConfiguration . |
|
JXLoginDialog(LoginService service,
PasswordStore ps,
UserNameStore us)
|
Method Summary | |
---|---|
JXLoginPane |
getPanel()
|
JXLoginPane.Status |
getStatus()
|
protected void |
init()
|
void |
setPanel(JXLoginPane panel)
|
Methods inherited from class java.awt.Dialog |
---|
addNotify, getTitle, hide, isModal, isResizable, isUndecorated, setModal, setResizable, setTitle, setUndecorated, show |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public JXLoginDialog() throws HeadlessException
Frame
owner. A shared, hidden frame will be
set as the owner of the dialog.
This constructor sets the component's locale property to the value
returned by JComponent.getDefaultLocale
.
HeadlessException
- if GraphicsEnvironment.isHeadless()
returns true.GraphicsEnvironment.isHeadless()
,
JComponent.getDefaultLocale()
public JXLoginDialog(Frame owner) throws HeadlessException
Frame
as its owner. If owner
is null
, a shared, hidden frame will be set as the
owner of the dialog.
This constructor sets the component's locale property to the value
returned by JComponent.getDefaultLocale
.
owner
- the Frame
from which the dialog is displayed
HeadlessException
- if GraphicsEnvironment.isHeadless()
returns true.GraphicsEnvironment.isHeadless()
,
JComponent.getDefaultLocale()
public JXLoginDialog(Frame owner, boolean modal) throws HeadlessException
Frame
. If owner
is null
, a shared, hidden frame will be set as the
owner of the dialog.
This constructor sets the component's locale property to the value
returned by JComponent.getDefaultLocale
.
owner
- the Frame
from which the dialog is displayedmodal
- true for a modal dialog, false for one that allows
others windows to be active at the same time
HeadlessException
- if GraphicsEnvironment.isHeadless()
returns true.GraphicsEnvironment.isHeadless()
,
JComponent.getDefaultLocale()
public JXLoginDialog(Frame owner, String title) throws HeadlessException
owner
is null
, a shared, hidden frame will be set as the
owner of the dialog.
This constructor sets the component's locale property to the value
returned by JComponent.getDefaultLocale
.
owner
- the Frame
from which the dialog is displayedtitle
- the String
to display in the dialog's
title bar
HeadlessException
- if GraphicsEnvironment.isHeadless()
returns true.GraphicsEnvironment.isHeadless()
,
JComponent.getDefaultLocale()
public JXLoginDialog(Frame owner, String title, boolean modal) throws HeadlessException
Frame
. If owner
is null
, a shared, hidden frame will be set as the
owner of this dialog. All constructors defer to this one.
NOTE: Any popup components (JComboBox
,
JPopupMenu
, JMenuBar
)
created within a modal dialog will be forced to be lightweight.
This constructor sets the component's locale property to the value
returned by JComponent.getDefaultLocale
.
owner
- the Frame
from which the dialog is displayedtitle
- the String
to display in the dialog's
title barmodal
- true for a modal dialog, false for one that allows
other windows to be active at the same time
HeadlessException
- if GraphicsEnvironment.isHeadless()
returns true.GraphicsEnvironment.isHeadless()
,
JComponent.getDefaultLocale()
public JXLoginDialog(Frame owner, String title, boolean modal, GraphicsConfiguration gc)
Frame
, and GraphicsConfiguration
.
NOTE: Any popup components (JComboBox
,
JPopupMenu
, JMenuBar
)
created within a modal dialog will be forced to be lightweight.
This constructor sets the component's locale property to the value
returned by JComponent.getDefaultLocale
.
owner
- the Frame
from which the dialog is displayedtitle
- the String
to display in the dialog's
title barmodal
- true for a modal dialog, false for one that allows
other windows to be active at the same timegc
- the GraphicsConfiguration
of the target screen device. If gc
is
null
, the same
GraphicsConfiguration
as the owning Frame is used.
HeadlessException
- if GraphicsEnvironment.isHeadless()
returns true.GraphicsEnvironment.isHeadless()
,
JComponent.getDefaultLocale()
public JXLoginDialog(Dialog owner) throws HeadlessException
Dialog
as its owner.
This constructor sets the component's locale property to the value
returned by JComponent.getDefaultLocale
.
owner
- the non-null Dialog
from which the dialog is displayed
HeadlessException
- if GraphicsEnvironment.isHeadless()
returns true.GraphicsEnvironment.isHeadless()
,
JComponent.getDefaultLocale()
public JXLoginDialog(Dialog owner, boolean modal) throws HeadlessException
This constructor sets the component's locale property to the value
returned by JComponent.getDefaultLocale
.
owner
- the non-null Dialog
from which the dialog is displayedmodal
- true for a modal dialog, false for one that allows
other windows to be active at the same time
HeadlessException
- if GraphicsEnvironment.isHeadless()
returns true.GraphicsEnvironment.isHeadless()
,
JComponent.getDefaultLocale()
public JXLoginDialog(Dialog owner, String title) throws HeadlessException
This constructor sets the component's locale property to the value
returned by JComponent.getDefaultLocale
.
owner
- the non-null Dialog
from which the dialog is displayedtitle
- the String
to display in the dialog's
title bar
HeadlessException
- if GraphicsEnvironment.isHeadless()
returns true.GraphicsEnvironment.isHeadless()
,
JComponent.getDefaultLocale()
public JXLoginDialog(Dialog owner, String title, boolean modal) throws HeadlessException
This constructor sets the component's locale property to the value
returned by JComponent.getDefaultLocale
.
owner
- the non-null Dialog
from which the dialog is displayedtitle
- the String
to display in the dialog's
title barmodal
- true for a modal dialog, false for one that allows
other windows to be active at the same time
HeadlessException
- if GraphicsEnvironment.isHeadless()
returns true.GraphicsEnvironment.isHeadless()
,
JComponent.getDefaultLocale()
public JXLoginDialog(Dialog owner, String title, boolean modal, GraphicsConfiguration gc) throws HeadlessException
Dialog
, and GraphicsConfiguration
.
NOTE: Any popup components (JComboBox
,
JPopupMenu
, JMenuBar
)
created within a modal dialog will be forced to be lightweight.
This constructor sets the component's locale property to the value
returned by JComponent.getDefaultLocale
.
owner
- the Dialog
from which the dialog is displayedtitle
- the String
to display in the dialog's
title barmodal
- true for a modal dialog, false for one that allows
other windows to be active at the same timegc
- the GraphicsConfiguration
of the target screen device. If gc
is
null
, the same
GraphicsConfiguration
as the owning Dialog is used.
HeadlessException
- if GraphicsEnvironment.isHeadless()GraphicsEnvironment.isHeadless()
,
returns true.
public JXLoginDialog(LoginService service, PasswordStore ps, UserNameStore us)
service
- the LoginService to useps
- the PasswordStore to useus
- the UserNameStore to useMethod Detail |
---|
protected void init()
public JXLoginPane.Status getStatus()
public JXLoginPane getPanel()
public void setPanel(JXLoginPane panel)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |