public class JDialog extends java.awt.Dialog implements javax.accessibility.Accessible, WindowConstants, RootPaneContainer
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.Dialogs, JDialogs support the
Swing Pluggable Look & Feel architecture.| Modifier and Type | Class and Description |
|---|---|
protected class |
JDialog.AccessibleJDialog
Provides accessibility support for
JDialogs. |
java.awt.Dialog.AccessibleAWTDialog, java.awt.Dialog.ModalExclusionType, java.awt.Dialog.ModalityType| Modifier and Type | Field and Description |
|---|---|
protected javax.accessibility.AccessibleContext |
accessibleContext
DOCUMENT ME!
|
protected JRootPane |
rootPane
The single RootPane in the Dialog.
|
protected boolean |
rootPaneCheckingEnabled
Whether checking is enabled on the RootPane.
|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTDISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSE| Constructor and Description |
|---|
JDialog() |
JDialog(java.awt.Dialog owner)
Creates a new non-modal JDialog with no title
using the given owner.
|
JDialog(java.awt.Dialog owner,
boolean modal)
Creates a new JDialog with no title using the
given modal setting and owner.
|
JDialog(java.awt.Dialog owner,
java.lang.String title)
Creates a new non-modal JDialog using the
given title and owner.
|
JDialog(java.awt.Dialog owner,
java.lang.String title,
boolean modal)
Creates a new JDialog using the given modal
settings, title, and owner.
|
JDialog(java.awt.Dialog owner,
java.lang.String title,
boolean modal,
java.awt.GraphicsConfiguration gc)
Creates a new JDialog using the given modal
settings, title, owner and graphics configuration.
|
JDialog(java.awt.Frame owner)
Creates a new non-modal JDialog with no title
using the given owner.
|
JDialog(java.awt.Frame owner,
boolean modal)
Creates a new JDialog with no title using the
given modal setting and owner.
|
JDialog(java.awt.Frame owner,
java.lang.String title)
Creates a new non-modal JDialog using the
given title and owner.
|
JDialog(java.awt.Frame owner,
java.lang.String title,
boolean modal)
Creates a new JDialog using the given modal
settings, title, and owner.
|
JDialog(java.awt.Frame owner,
java.lang.String title,
boolean modal,
java.awt.GraphicsConfiguration gc)
Creates a new JDialog using the given modal
settings, title, owner and graphics configuration.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
addImpl(java.awt.Component comp,
java.lang.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.
|
javax.accessibility.AccessibleContext |
getAccessibleContext()
DOCUMENT ME!
|
java.awt.Container |
getContentPane()
This method returns the ContentPane
in the JRootPane.
|
int |
getDefaultCloseOperation()
This method returns the action taken when
the JDialog is closed.
|
java.awt.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.
|
java.awt.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 java.lang.String |
paramString()
This method returns a String describing the JDialog.
|
protected void |
processWindowEvent(java.awt.event.WindowEvent e)
This method handles window events.
|
void |
remove(java.awt.Component comp)
This method removes a component from the JDialog.
|
void |
setContentPane(java.awt.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(java.awt.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(java.awt.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(java.awt.Graphics g)
This method simply calls paint and returns.
|
addNotify, dispose, getTitle, hide, isModal, isResizable, isUndecorated, setModal, setResizable, setTitle, setUndecorated, showaddWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getGraphicsConfiguration, getListeners, getLocale, getMostRecentFocusOwner, getOwnedWindows, getOwner, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindowStateListeners, isActive, isAlwaysOnTop, isFocusableWindow, isFocusCycleRoot, isFocused, isShowing, pack, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, setAlwaysOnTop, setCursor, setFocusableWindowState, setFocusCycleRoot, setLocationRelativeTo, toBack, toFrontadd, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, removeNotify, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusDownCycle, validate, validateTreeaction, 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, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, 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, isOpaque, 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, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycleprotected javax.accessibility.AccessibleContext accessibleContext
protected boolean rootPaneCheckingEnabled
public JDialog()
public JDialog(java.awt.Dialog owner)
owner - The owner of the JDialog.public JDialog(java.awt.Dialog owner, boolean modal)
owner - The owner of the JDialog.modal - Whether the JDialog is modal.public JDialog(java.awt.Dialog owner, java.lang.String title)
owner - The owner of the JDialog.title - The title of the JDialog.public JDialog(java.awt.Dialog owner, java.lang.String title, boolean modal)
owner - The owner of the JDialog.title - The title of the JDialog.modal - Whether the JDialog is modal.public JDialog(java.awt.Dialog owner, java.lang.String title, boolean modal, java.awt.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(java.awt.Frame owner)
owner - The owner of the JDialog.public JDialog(java.awt.Frame owner, boolean modal)
owner - The owner of the JDialog.modal - Whether the JDialog is modal.public JDialog(java.awt.Frame owner, java.lang.String title)
owner - The owner of the JDialog.title - The title of the JDialog.public JDialog(java.awt.Frame owner, java.lang.String title, boolean modal)
owner - The owner of the JDialog.title - The title of the JDialog.modal - Whether the JDialog is modal.public JDialog(java.awt.Frame owner, java.lang.String title, boolean modal, java.awt.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.protected void dialogInit()
public static boolean isDefaultLookAndFeelDecorated()
public static void setDefaultLookAndFeelDecorated(boolean defaultLookAndFeelDecorated)
defaultLookAndFeelDecorated - Whether the window
decorations are Look and Feel provided.public java.awt.Dimension getPreferredSize()
getPreferredSize in class java.awt.ContainerComponent.getMinimumSize(),
Component.setPreferredSize(Dimension),
LayoutManagerpublic JMenuBar getJMenuBar()
public void setJMenuBar(JMenuBar menubar)
menubar - The JMenuBar to use.public void setLayout(java.awt.LayoutManager manager)
setLayout in class java.awt.Containermanager - The LayoutManager to use.public void setLayeredPane(JLayeredPane layeredPane)
setLayeredPane in interface RootPaneContainerlayeredPane - The JLayeredPane to use.public JLayeredPane getLayeredPane()
getLayeredPane in interface RootPaneContainerpublic JRootPane getRootPane()
getRootPane in interface RootPaneContainerprotected void setRootPane(JRootPane root)
root - The JRootPane to use.protected JRootPane createRootPane()
public java.awt.Container getContentPane()
getContentPane in interface RootPaneContainerpublic void setContentPane(java.awt.Container contentPane)
setContentPane in interface RootPaneContainercontentPane - The ContentPane to use with the JDialog.public java.awt.Component getGlassPane()
getGlassPane in interface RootPaneContainerpublic void setGlassPane(java.awt.Component glassPane)
setGlassPane in interface RootPaneContainerglassPane - The GlassPane for this JDialog.protected void addImpl(java.awt.Component comp, java.lang.Object constraints, int index)
addImpl in class java.awt.Containercomp - The component to add.constraints - The constraints.index - The position of the component.public void remove(java.awt.Component comp)
remove in class java.awt.Containercomp - The component to remove.protected boolean isRootPaneCheckingEnabled()
protected void setRootPaneCheckingEnabled(boolean enabled)
enabled - Whether rootPane checking is enabled.public void update(java.awt.Graphics g)
update in class java.awt.Containerg - The Graphics object to paint with.Component.paint(Graphics),
Component.repaint()protected void processWindowEvent(java.awt.event.WindowEvent e)
processWindowEvent in class java.awt.Windowe - The WindowEvent.public void setDefaultCloseOperation(int operation)
operation - The action to take.public int getDefaultCloseOperation()
protected java.lang.String paramString()
paramString in class java.awt.Dialogpublic javax.accessibility.AccessibleContext getAccessibleContext()
getAccessibleContext in interface javax.accessibility.AccessiblegetAccessibleContext in class java.awt.Dialog