javax.swing
Class JDialog
- Accessible, ImageObserver, MenuContainer, RootPaneContainer, Serializable, WindowConstants
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.
JDialog() - Default constructor for subclasses.
|
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.
|
addNotify , dispose , getAccessibleContext , getTitle , hide , isModal , isResizable , isUndecorated , paramString , setModal , setResizable , setTitle , setUndecorated , show |
addNotify , addWindowFocusListener , addWindowListener , addWindowStateListener , applyResourceBundle , applyResourceBundle , createBufferStrategy , createBufferStrategy , dispose , extends EventListener> T[] getListeners , getAccessibleContext , getBufferStrategy , getFocusCycleRootAncestor , getFocusOwner , getFocusableWindowState , getGraphicsConfiguration , getLocale , getMostRecentFocusOwner , getOwnedWindows , getOwner , getToolkit , getWarningString , getWindowFocusListeners , getWindowListeners , getWindowStateListeners , isActive , isAlwaysOnTop , isFocusCycleRoot , isFocusableWindow , isFocused , isShowing , pack , postEvent , processEvent , processWindowEvent , processWindowFocusEvent , processWindowStateEvent , removeWindowFocusListener , removeWindowListener , removeWindowStateListener , setAlwaysOnTop , setCursor , setFocusCycleRoot , setFocusableWindowState , setLocationRelativeTo , toBack , toFront , void hide , void show |
add , add , add , add , add , addContainerListener , addImpl , addNotify , addPropertyChangeListener , addPropertyChangeListener , applyComponentOrientation , areFocusTraversalKeysSet , countComponents , deliverEvent , doLayout , extends EventListener> T[] getListeners , findComponentAt , findComponentAt , getAlignmentX , getAlignmentY , getComponent , getComponentAt , getComponentAt , getComponentCount , getComponentZOrder , getComponents , getContainerListeners , getFocusTraversalKeys , getFocusTraversalPolicy , getInsets , getLayout , getMaximumSize , getMinimumSize , getPreferredSize , insets , invalidate , isAncestorOf , isFocusCycleRoot , isFocusCycleRoot , isFocusTraversalPolicyProvider , isFocusTraversalPolicySet , layout , list , list , locate , minimumSize , paint , paintComponents , paramString , preferredSize , print , printComponents , processContainerEvent , processEvent , remove , remove , removeAll , removeContainerListener , removeNotify , setComponentZOrder , setFocusCycleRoot , setFocusTraversalKeys , setFocusTraversalPolicy , setFocusTraversalPolicyProvider , setFont , setLayout , transferFocusDownCycle , update , validate , validateTree |
action , add , addComponentListener , addFocusListener , addHierarchyBoundsListener , addHierarchyListener , addInputMethodListener , addKeyListener , addMouseListener , addMouseMotionListener , addMouseWheelListener , addNotify , addPropertyChangeListener , addPropertyChangeListener , applyComponentOrientation , areFocusTraversalKeysSet , bounds , checkImage , checkImage , coalesceEvents , contains , contains , createImage , createImage , createVolatileImage , createVolatileImage , deliverEvent , disable , disableEvents , dispatchEvent , doLayout , enable , enable , enableEvents , enableInputMethods , extends EventListener> T[] getListeners , firePropertyChange , firePropertyChange , firePropertyChange , firePropertyChange , firePropertyChange , firePropertyChange , firePropertyChange , firePropertyChange , firePropertyChange , getAccessibleContext , getAlignmentX , getAlignmentY , getBackground , getBounds , getBounds , getColorModel , getComponentAt , getComponentAt , getComponentListeners , getComponentOrientation , getCursor , getDropTarget , getFocusCycleRootAncestor , getFocusListeners , getFocusTraversalKeys , getFocusTraversalKeysEnabled , getFont , getFontMetrics , getForeground , getGraphics , getGraphicsConfiguration , getHeight , getHierarchyBoundsListeners , getHierarchyListeners , getIgnoreRepaint , getInputContext , getInputMethodListeners , getInputMethodRequests , getKeyListeners , getLocale , getLocation , getLocation , getLocationOnScreen , getMaximumSize , getMinimumSize , getMouseListeners , getMouseMotionListeners , getMouseWheelListeners , getName , getParent , getPeer , getPreferredSize , getPropertyChangeListeners , getPropertyChangeListeners , getSize , getSize , getToolkit , getTreeLock , getWidth , getX , getY , gotFocus , handleEvent , hasFocus , hide , imageUpdate , inside , invalidate , isBackgroundSet , isCursorSet , isDisplayable , isDoubleBuffered , isEnabled , isFocusCycleRoot , isFocusOwner , isFocusTraversable , isFocusable , isFontSet , isForegroundSet , isLightweight , isMaximumSizeSet , isMinimumSizeSet , isOpaque , isPreferredSizeSet , isShowing , isValid , isVisible , keyDown , keyUp , layout , list , list , list , list , list , locate , location , lostFocus , minimumSize , mouseDown , mouseDrag , mouseEnter , mouseExit , mouseMove , mouseUp , move , nextFocus , paint , paintAll , paramString , postEvent , preferredSize , prepareImage , prepareImage , print , printAll , processComponentEvent , processEvent , processFocusEvent , processHierarchyBoundsEvent , processHierarchyEvent , processInputMethodEvent , processKeyEvent , processMouseEvent , processMouseMotionEvent , processMouseWheelEvent , remove , removeComponentListener , removeFocusListener , removeHierarchyBoundsListener , removeHierarchyListener , removeInputMethodListener , removeKeyListener , removeMouseListener , removeMouseMotionListener , removeMouseWheelListener , removeNotify , removePropertyChangeListener , removePropertyChangeListener , repaint , repaint , repaint , repaint , requestFocus , requestFocus , requestFocusInWindow , requestFocusInWindow , reshape , resize , resize , setBackground , setBounds , setBounds , setComponentOrientation , setCursor , setDropTarget , setEnabled , setFocusTraversalKeys , setFocusTraversalKeysEnabled , setFocusable , setFont , setForeground , setIgnoreRepaint , setLocale , setLocation , setLocation , setMaximumSize , setMinimumSize , setName , setPreferredSize , setSize , setSize , setVisible , show , show , size , toString , transferFocus , transferFocusBackward , transferFocusUpCycle , update , validate |
clone , equals , extends Object> getClass , finalize , hashCode , notify , notifyAll , toString , wait , wait , wait |
JDialog
public JDialog()
Default constructor for subclasses.
JDialog
public JDialog(Dialog owner)
Creates a new non-modal JDialog with no title
using the given owner.
owner
- The owner of the JDialog.
JDialog
public JDialog(Dialog owner,
boolean modal)
Creates a new JDialog with no title using the
given modal setting and owner.
owner
- The owner of the JDialog.modal
- Whether the JDialog is modal.
JDialog
public JDialog(Dialog owner,
String title)
Creates a new non-modal JDialog using the
given title and owner.
owner
- The owner of the JDialog.title
- The title of the JDialog.
JDialog
public JDialog(Dialog owner,
String title,
boolean modal)
Creates a new JDialog using the given modal
settings, title, and owner.
owner
- The owner of the JDialog.title
- The title of the JDialog.modal
- Whether the JDialog is modal.
JDialog
public JDialog(Dialog owner,
String title,
boolean modal,
GraphicsConfiguration gc)
Creates a new JDialog using the given modal
settings, title, owner and graphics configuration.
owner
- The owner of the JDialog.title
- The title of the JDialog.modal
- Whether the JDialog is modal.gc
- The Graphics Configuration to use.
JDialog
public JDialog(Frame owner)
Creates a new non-modal JDialog with no title
using the given owner.
owner
- The owner of the JDialog.
JDialog
public JDialog(Frame owner,
boolean modal)
Creates a new JDialog with no title using the
given modal setting and owner.
owner
- The owner of the JDialog.modal
- Whether the JDialog is modal.
JDialog
public JDialog(Frame owner,
String title)
Creates a new non-modal JDialog using the
given title and owner.
owner
- The owner of the JDialog.title
- The title of the JDialog.
JDialog
public JDialog(Frame owner,
String title,
boolean modal)
Creates a new JDialog using the given modal
settings, title, and owner.
owner
- The owner of the JDialog.title
- The title of the JDialog.modal
- Whether the JDialog is modal.
JDialog
public JDialog(Frame owner,
String title,
boolean modal,
GraphicsConfiguration gc)
Creates a new JDialog using the given modal
settings, title, owner and graphics configuration.
owner
- The owner of the JDialog.title
- The title of the JDialog.modal
- Whether the JDialog is modal.gc
- The Graphics Configuration to use.
addImpl
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.
- addImpl in interface Container
comp
- The component to add.constraints
- The constraints.index
- The position of the component.
dialogInit
protected void dialogInit()
This method is called to initialize the
JDialog. It sets the layout used, the locale,
and creates the RootPane.
getDefaultCloseOperation
public int getDefaultCloseOperation()
This method returns the action taken when
the JDialog is closed.
getJMenuBar
public JMenuBar getJMenuBar()
This method returns the JMenuBar used
in this JDialog.
- The JMenuBar in the JDialog.
isDefaultLookAndFeelDecorated
public static boolean isDefaultLookAndFeelDecorated()
This method returns whether JDialogs will have their
window decorations provided by the Look and Feel.
- Whether the window decorations are Look and Feel provided.
isRootPaneCheckingEnabled
protected boolean isRootPaneCheckingEnabled()
This method returns whether rootPane checking is enabled.
- Whether rootPane checking is enabled.
remove
public void remove(Component comp)
This method removes a component from the JDialog.
- remove in interface Container
comp
- The component to remove.
setContentPane
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.
- setContentPane in interface RootPaneContainer
contentPane
- The ContentPane to use with the JDialog.
setDefaultCloseOperation
public void setDefaultCloseOperation(int operation)
This method sets the action to take
when the JDialog is closed.
operation
- The action to take.
setDefaultLookAndFeelDecorated
public static void setDefaultLookAndFeelDecorated(boolean defaultLookAndFeelDecorated)
This method sets whether JDialogs will have their
window decorations provided by the Look and Feel.
defaultLookAndFeelDecorated
- Whether the window
decorations are Look and Feel provided.
setJMenuBar
public void setJMenuBar(JMenuBar menubar)
This method sets the JMenuBar used
in this JDialog.
menubar
- The JMenuBar to use.
setLayout
public void setLayout(LayoutManager manager)
This method sets the LayoutManager used in the JDialog.
This method will throw an Error if rootPaneChecking is
enabled.
- setLayout in interface Container
manager
- The LayoutManager to use.
setRootPane
protected void setRootPane(JRootPane root)
This method sets the JRootPane used with this JDialog.
root
- The JRootPane to use.
setRootPaneCheckingEnabled
protected void setRootPaneCheckingEnabled(boolean enabled)
This method sets whether rootPane checking is enabled.
enabled
- Whether rootPane checking is enabled.
update
public void update(Graphics g)
This method simply calls paint and returns.
- update in interface Container
g
- The Graphics object to paint with.
JDialog.java --
Copyright (C) 2002, 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
conditions of the GNU General Public License cover the whole
combination.
As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
module. An independent module is a module which is not derived from
or based on this library. If you modify this library, you may extend
this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version.