|
|||||||||
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
public class JDialog
A dialog window. This is an extension of Dialog
that
provides support for the Swing architecture. Most importantly it contains a
JRootPane
as it's only top-level child, that manages the content
pane, the menu and a glass pane.
Also, unlike java.awt.Dialog
s, JDialogs support the
Swing Pluggable Look & Feel architecture.
Nested Class Summary | |
---|---|
protected class |
JDialog.AccessibleJDialog
Provides accessibility support for JDialog s. |
Nested classes/interfaces inherited from class java.awt.Dialog |
---|
Dialog.AccessibleAWTDialog, Dialog.ModalExclusionType, Dialog.ModalityType |
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 | |
---|---|
protected AccessibleContext |
accessibleContext
DOCUMENT ME! |
protected JRootPane |
rootPane
The single RootPane in the Dialog. |
protected boolean |
rootPaneCheckingEnabled
Whether checking is enabled on the RootPane. |
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 | |
---|---|
JDialog()
|
|
JDialog(Dialog owner)
Creates a new non-modal JDialog with no title using the given owner. |
|
JDialog(Dialog owner,
boolean modal)
Creates a new JDialog with no title using the given modal setting and owner. |
|
JDialog(Dialog owner,
String title)
Creates a new non-modal JDialog using the given title and owner. |
|
JDialog(Dialog owner,
String title,
boolean modal)
Creates a new JDialog using the given modal settings, title, and owner. |
|
JDialog(Dialog owner,
String title,
boolean modal,
GraphicsConfiguration gc)
Creates a new JDialog using the given modal settings, title, owner and graphics configuration. |
|
JDialog(Frame owner)
Creates a new non-modal JDialog with no title using the given owner. |
|
JDialog(Frame owner,
boolean modal)
Creates a new JDialog with no title using the given modal setting and owner. |
|
JDialog(Frame owner,
String title)
Creates a new non-modal JDialog using the given title and owner. |
|
JDialog(Frame owner,
String title,
boolean modal)
Creates a new JDialog using the given modal settings, title, and owner. |
|
JDialog(Frame owner,
String title,
boolean modal,
GraphicsConfiguration gc)
Creates a new JDialog using the given modal settings, title, owner and graphics configuration. |
Method Summary | |
---|---|
protected void |
addImpl(Component comp,
Object constraints,
int index)
This method is called when a component is added to the the JDialog. |
protected JRootPane |
createRootPane()
This method creates a new JRootPane. |
protected void |
dialogInit()
This method is called to initialize the JDialog. |
AccessibleContext |
getAccessibleContext()
DOCUMENT ME! |
Container |
getContentPane()
This method returns the ContentPane in the JRootPane. |
int |
getDefaultCloseOperation()
This method returns the action taken when the JDialog is closed. |
Component |
getGlassPane()
This method returns the GlassPane for this JDialog. |
JMenuBar |
getJMenuBar()
This method returns the JMenuBar used in this JDialog. |
JLayeredPane |
getLayeredPane()
This method returns the JLayeredPane used with this JDialog. |
Dimension |
getPreferredSize()
This method returns the preferred size of the JDialog. |
JRootPane |
getRootPane()
This method returns the JRootPane used with this JDialog. |
static boolean |
isDefaultLookAndFeelDecorated()
This method returns whether JDialogs will have their window decorations provided by the Look and Feel. |
protected boolean |
isRootPaneCheckingEnabled()
This method returns whether rootPane checking is enabled. |
protected String |
paramString()
This method returns a String describing the JDialog. |
protected void |
processWindowEvent(WindowEvent e)
This method handles window events. |
void |
remove(Component comp)
This method removes a component from the JDialog. |
void |
setContentPane(Container contentPane)
This method sets the ContentPane to use with this JDialog. |
void |
setDefaultCloseOperation(int operation)
This method sets the action to take when the JDialog is closed. |
static void |
setDefaultLookAndFeelDecorated(boolean defaultLookAndFeelDecorated)
This method sets whether JDialogs will have their window decorations provided by the Look and Feel. |
void |
setGlassPane(Component glassPane)
This method sets the GlassPane for this JDialog. |
void |
setJMenuBar(JMenuBar menubar)
This method sets the JMenuBar used in this JDialog. |
void |
setLayeredPane(JLayeredPane layeredPane)
This method sets the JLayeredPane used in the JDialog. |
void |
setLayout(LayoutManager manager)
This method sets the LayoutManager used in the JDialog. |
protected void |
setRootPane(JRootPane root)
This method sets the JRootPane used with this JDialog. |
protected void |
setRootPaneCheckingEnabled(boolean enabled)
This method sets whether rootPane checking is enabled. |
void |
update(Graphics g)
This method simply calls paint and returns. |
Methods inherited from class java.awt.Dialog |
---|
addNotify, dispose, getTitle, hide, isModal, isResizable, isUndecorated, setModal, setResizable, setTitle, setUndecorated, show |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected AccessibleContext accessibleContext
protected JRootPane rootPane
protected boolean rootPaneCheckingEnabled
Constructor Detail |
---|
public JDialog()
public JDialog(Dialog owner)
owner
- The owner of the JDialog.public JDialog(Dialog owner, boolean modal)
owner
- The owner of the JDialog.modal
- Whether the JDialog is modal.public JDialog(Dialog owner, String title)
owner
- The owner of the JDialog.title
- The title of the JDialog.public JDialog(Dialog owner, String title, boolean modal)
owner
- The owner of the JDialog.title
- The title of the JDialog.modal
- Whether the JDialog is modal.public JDialog(Dialog owner, String title, boolean modal, GraphicsConfiguration gc)
owner
- The owner of the JDialog.title
- The title of the JDialog.modal
- Whether the JDialog is modal.gc
- The Graphics Configuration to use.public JDialog(Frame owner)
owner
- The owner of the JDialog.public JDialog(Frame owner, boolean modal)
owner
- The owner of the JDialog.modal
- Whether the JDialog is modal.public JDialog(Frame owner, String title)
owner
- The owner of the JDialog.title
- The title of the JDialog.public JDialog(Frame owner, String title, boolean modal)
owner
- The owner of the JDialog.title
- The title of the JDialog.modal
- Whether the JDialog is modal.public JDialog(Frame owner, String title, boolean modal, GraphicsConfiguration gc)
owner
- The owner of the JDialog.title
- The title of the JDialog.modal
- Whether the JDialog is modal.gc
- The Graphics Configuration to use.Method Detail |
---|
protected void dialogInit()
public static boolean isDefaultLookAndFeelDecorated()
public static void setDefaultLookAndFeelDecorated(boolean defaultLookAndFeelDecorated)
defaultLookAndFeelDecorated
- Whether the window
decorations are Look and Feel provided.public Dimension getPreferredSize()
getPreferredSize
in class Container
Component.getMinimumSize()
,
Component.setPreferredSize(Dimension)
,
LayoutManager
public JMenuBar getJMenuBar()
public void setJMenuBar(JMenuBar menubar)
menubar
- The JMenuBar to use.public void setLayout(LayoutManager manager)
setLayout
in class Container
manager
- The LayoutManager to use.public void setLayeredPane(JLayeredPane layeredPane)
setLayeredPane
in interface RootPaneContainer
layeredPane
- The JLayeredPane to use.public JLayeredPane getLayeredPane()
getLayeredPane
in interface RootPaneContainer
public JRootPane getRootPane()
getRootPane
in interface RootPaneContainer
protected void setRootPane(JRootPane root)
root
- The JRootPane to use.protected JRootPane createRootPane()
public Container getContentPane()
getContentPane
in interface RootPaneContainer
public void setContentPane(Container contentPane)
setContentPane
in interface RootPaneContainer
contentPane
- The ContentPane to use with the JDialog.public Component getGlassPane()
getGlassPane
in interface RootPaneContainer
public void setGlassPane(Component glassPane)
setGlassPane
in interface RootPaneContainer
glassPane
- The GlassPane for this JDialog.protected void addImpl(Component comp, Object constraints, int index)
addImpl
in class Container
comp
- The component to add.constraints
- The constraints.index
- The position of the component.public void remove(Component comp)
remove
in class Container
comp
- The component to remove.protected boolean isRootPaneCheckingEnabled()
protected void setRootPaneCheckingEnabled(boolean enabled)
enabled
- Whether rootPane checking is enabled.public void update(Graphics g)
update
in class Container
g
- The Graphics object to paint with.Component.paint(Graphics)
,
Component.repaint()
protected void processWindowEvent(WindowEvent e)
processWindowEvent
in class Window
e
- The WindowEvent.public void setDefaultCloseOperation(int operation)
operation
- The action to take.public int getDefaultCloseOperation()
protected String paramString()
paramString
in class Dialog
public AccessibleContext getAccessibleContext()
getAccessibleContext
in interface Accessible
getAccessibleContext
in class Dialog
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |