Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
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 |
|
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 |
|
protected JRootPane |
|
protected boolean |
|
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 |
Fields inherited from interface javax.swing.WindowConstants | |
DISPOSE_ON_CLOSE , DO_NOTHING_ON_CLOSE , EXIT_ON_CLOSE , HIDE_ON_CLOSE |
Constructor Summary | |
| |
| |
|
Method Summary | |
protected void | |
protected JRootPane |
|
protected void |
|
AccessibleContext |
|
Container |
|
int |
|
Component |
|
JMenuBar |
|
JLayeredPane |
|
Dimension |
|
JRootPane |
|
static boolean |
|
protected boolean |
|
protected String |
|
protected void |
|
void | |
void |
|
void |
|
static void |
|
void |
|
void |
|
void |
|
void |
|
protected void |
|
protected void |
|
void |
Methods inherited from class java.awt.Dialog | |
addNotify , dispose , getAccessibleContext , getTitle , hide , isModal , isResizable , isUndecorated , paramString , setModal , setResizable , setTitle , setUndecorated , show |
Methods inherited from class java.lang.Object | |
clone , equals , extends Object> getClass , finalize , hashCode , notify , notifyAll , toString , wait , wait , wait |
protected boolean rootPaneCheckingEnabled
Whether checking is enabled on the RootPane.
public JDialog()
This (package access) constructor is used by subclasses that want to build windows that do not have parents. Eg. toplevel application frames. Subclasses cannot call super(null), since null is an illegal argument.
public JDialog(Dialog owner)
Creates a new non-modal JDialog with no title using the given owner.
- Parameters:
owner
- The owner of the JDialog.
public JDialog(Dialog owner, boolean modal)
Creates a new JDialog with no title using the given modal setting and owner.
- Parameters:
owner
- The owner of the JDialog.modal
- Whether the JDialog is modal.
public JDialog(Dialog owner, String title)
Creates a new non-modal JDialog using the given title and owner.
- Parameters:
owner
- The owner of the JDialog.title
- The title of the JDialog.
public JDialog(Dialog owner, String title, boolean modal)
Creates a new JDialog using the given modal settings, title, and owner.
- Parameters:
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)
Creates a new JDialog using the given modal settings, title, owner and graphics configuration.
- Parameters:
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)
Creates a new non-modal JDialog with no title using the given owner.
- Parameters:
owner
- The owner of the JDialog.
public JDialog(Frame owner, boolean modal)
Creates a new JDialog with no title using the given modal setting and owner.
- Parameters:
owner
- The owner of the JDialog.modal
- Whether the JDialog is modal.
public JDialog(Frame owner, String title)
Creates a new non-modal JDialog using the given title and owner.
- Parameters:
owner
- The owner of the JDialog.title
- The title of the JDialog.
public JDialog(Frame owner, String title, boolean modal)
Creates a new JDialog using the given modal settings, title, and owner.
- Parameters:
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)
Creates a new JDialog using the given modal settings, title, owner and graphics configuration.
- Parameters:
owner
- The owner of the JDialog.title
- The title of the JDialog.modal
- Whether the JDialog is modal.gc
- The Graphics Configuration to use.
protected void addImpl(Component comp, Object constraints, int index)
This method is called when a component is added to the the JDialog. Calling this method with rootPaneCheckingEnabled will cause an Error to be thrown.
- Parameters:
comp
- The component to add.constraints
- The constraints.index
- The position of the component.
protected JRootPane createRootPane()
This method creates a new JRootPane.
- Returns:
- A new JRootPane.
protected void dialogInit()
This method is called to initialize the JDialog. It sets the layout used, the locale, and creates the RootPane.
public AccessibleContext getAccessibleContext()
DOCUMENT ME!
- Specified by:
- getAccessibleContext in interface Accessible
- Overrides:
- getAccessibleContext in interface Dialog
- Returns:
- DOCUMENT ME!
public Container getContentPane()
This method returns the ContentPane in the JRootPane.
- Specified by:
- getContentPane in interface RootPaneContainer
- Returns:
- The ContentPane in the JRootPane.
public int getDefaultCloseOperation()
This method returns the action taken when the JDialog is closed.
- Returns:
- The action to take.
public Component getGlassPane()
This method returns the GlassPane for this JDialog.
- Specified by:
- getGlassPane in interface RootPaneContainer
- Returns:
- The GlassPane for this JDialog.
public JMenuBar getJMenuBar()
This method returns the JMenuBar used in this JDialog.
- Returns:
- The JMenuBar in the JDialog.
public JLayeredPane getLayeredPane()
This method returns the JLayeredPane used with this JDialog.
- Specified by:
- getLayeredPane in interface RootPaneContainer
- Returns:
- The JLayeredPane used with this JDialog.
public Dimension getPreferredSize()
This method returns the preferred size of the JDialog.
- Overrides:
- getPreferredSize in interface Container
- Returns:
- The preferred size.
public JRootPane getRootPane()
This method returns the JRootPane used with this JDialog.
- Specified by:
- getRootPane in interface RootPaneContainer
- Returns:
- The JRootPane used with this JDialog.
public static boolean isDefaultLookAndFeelDecorated()
This method returns whether JDialogs will have their window decorations provided by the Look and Feel.
- Returns:
- Whether the window decorations are Look and Feel provided.
protected boolean isRootPaneCheckingEnabled()
This method returns whether rootPane checking is enabled.
- Returns:
- Whether rootPane checking is enabled.
protected String paramString()
This method returns a String describing the JDialog.
- Overrides:
- paramString in interface Dialog
- Returns:
- A String describing the JDialog.
protected void processWindowEvent(WindowEvent e)
This method handles window events. This allows the JDialog to honour its default close operation.
- Overrides:
- processWindowEvent in interface Window
- Parameters:
e
- The WindowEvent.
public void remove(Component comp)
This method removes a component from the JDialog.
- Parameters:
comp
- The component to remove.
public void setContentPane(Container contentPane)
This method sets the ContentPane to use with this JDialog. If the ContentPane given is null, this method will throw an exception.
- Specified by:
- setContentPane in interface RootPaneContainer
- Parameters:
contentPane
- The ContentPane to use with the JDialog.
public void setDefaultCloseOperation(int operation)
This method sets the action to take when the JDialog is closed.
- Parameters:
operation
- The action to take.
public static void setDefaultLookAndFeelDecorated(boolean defaultLookAndFeelDecorated)
This method sets whether JDialogs will have their window decorations provided by the Look and Feel.
- Parameters:
defaultLookAndFeelDecorated
- Whether the window decorations are Look and Feel provided.
public void setGlassPane(Component glassPane)
This method sets the GlassPane for this JDialog.
- Specified by:
- setGlassPane in interface RootPaneContainer
- Parameters:
glassPane
- The GlassPane for this JDialog.
public void setJMenuBar(JMenuBar menubar)
This method sets the JMenuBar used in this JDialog.
- Parameters:
menubar
- The JMenuBar to use.
public void setLayeredPane(JLayeredPane layeredPane)
This method sets the JLayeredPane used in the JDialog. If the given JLayeredPane is null, then this method will throw an Error.
- Specified by:
- setLayeredPane in interface RootPaneContainer
- Parameters:
layeredPane
- The JLayeredPane to use.
public void setLayout(LayoutManager manager)
This method sets the LayoutManager used in the JDialog. This method will throw an Error if rootPaneChecking is enabled.
- Parameters:
manager
- The LayoutManager to use.
protected void setRootPane(JRootPane root)
This method sets the JRootPane used with this JDialog.
- Parameters:
root
- The JRootPane to use.
protected void setRootPaneCheckingEnabled(boolean enabled)
This method sets whether rootPane checking is enabled.
- Parameters:
enabled
- Whether rootPane checking is enabled.