Documente Academic
Documente Profesional
Documente Cultură
OVERVIEW PACKAGE
11/12/2014
CLASS
FRAMES NO FRAMES
Java Platform
Standard Ed. 8
ALL CLASSES
javax.swing
Class JWindow
java.lang.Object
java.awt.Component
java.awt.Container
java.awt.Window
javax.swing.JWindow
All Implemented Interfaces:
JRootPane
protected class
JWindow.AccessibleJWindow
This class implements accessibility support for the JWindow class.
1 / 11
11/12/2014
Field Summary
Fields
Modifier and Type
rootPane
The JRootPane instance that manages the contentPane and optional menuBar for this
frame, as well as the glassPane.
protected boolean
rootPaneCheckingEnabled
If true then calls to add and setLayout will be forwarded to the contentPane.
Constructor Summary
Constructors
Constructor and Description
JWindow()
Creates a window with no specified owner.
JWindow(Frame owner)
Creates a window with the specified owner frame.
JWindow(GraphicsConfiguration gc)
Creates a window with the specified GraphicsConfiguration of a screen device.
JWindow(Window owner)
Creates a window with the specified owner window.
JWindow(Window owner, GraphicsConfiguration gc)
Creates a window with the specified owner window and GraphicsConfiguration of a screen device.
Method Summary
All Methods
Instance Methods
Concrete Methods
protected void
protected JRootPane
createRootPane()
Called by the constructor methods to create the default rootPane.
AccessibleContext
getAccessibleContext()
Gets the AccessibleContext associated with this JWindow.
Container
getContentPane()
Returns the Container which is the contentPane for this window.
Component
getGlassPane()
Returns the glassPane Component for this window.
http://docs.oracle.com/javase/8/docs/api/javax/swing/JWindow.html
2 / 11
11/12/2014
Graphics
getGraphics()
Creates a graphics context for this component.
JLayeredPane
getLayeredPane()
Returns the layeredPane object for this window.
JRootPane
getRootPane()
Returns the rootPane object for this window.
TransferHandler
getTransferHandler()
Gets the transferHandler property.
protected boolean
isRootPaneCheckingEnabled()
Returns whether calls to add and setLayout are forwarded to the contentPane.
protected String
paramString()
Returns a string representation of this JWindow.
void
remove(Component comp)
Removes the specified component from the container.
void
void
setContentPane(Container contentPane)
Sets the contentPane property for this window.
void
setGlassPane(Component glassPane)
Sets the glassPane property.
void
setLayeredPane(JLayeredPane layeredPane)
Sets the layeredPane property.
void
setLayout(LayoutManager manager)
Sets the LayoutManager.
protected void
setRootPane(JRootPane root)
Sets the new rootPane object for this window.
protected void
setRootPaneCheckingEnabled(boolean enabled)
Sets whether calls to add and setLayout are forwarded to the contentPane.
void
setTransferHandler(TransferHandler newHandler)
Sets the transferHandler property, which is a mechanism to support transfer of data
into this component.
void
update(Graphics g)
Calls paint(g).
protected void
windowInit()
Called by the constructors to init the JWindow properly.
3 / 11
11/12/2014
Field Detail
rootPane
getRootPane(), setRootPane(javax.swing.JRootPane)
rootPaneCheckingEnabled
accessibleContext
http://docs.oracle.com/javase/8/docs/api/javax/swing/JWindow.html
4 / 11
11/12/2014
Constructor Detail
JWindow
public JWindow()
Creates a window with no specified owner. This window will not be focusable.
This constructor sets the component's locale property to the value returned by JComponent.getDefaultLocale.
Throws:
JWindow
gc - the GraphicsConfiguration that is used to construct the new window with; if gc is null, the system
default GraphicsConfiguration is assumed
Throws:
1.3
See Also:
JWindow
JWindow
5 / 11
11/12/2014
JWindow
1.3
See Also:
Method Detail
windowInit
setTransferHandler
6 / 11
11/12/2014
If the system property suppressSwingDropSupport is false (the default) and the current drop target on this component
is either null or not a user-set drop target, this method will change the drop target as follows: If newHandler is null it
will clear the drop target. If not null it will install a new DropTarget.
Note: When used with JWindow, TransferHandler only provides data import capability, as the data export related
methods are currently typed to JComponent.
Please see How to Use Drag and Drop and Data Transfer, a section in The Java Tutorial, for more information.
Parameters:
1.6
See Also:
getTransferHandler
1.6
See Also:
TransferHandler, setTransferHandler(javax.swing.TransferHandler)
update
Component.update(Graphics)
setRootPaneCheckingEnabled
enabled - true if add and setLayout are forwarded, false if they should operate directly on the JWindow.
See Also:
addImpl
http://docs.oracle.com/javase/8/docs/api/javax/swing/JWindow.html
7 / 11
11/12/2014
setRootPaneCheckingEnabled(boolean), RootPaneContainer
remove
Container.add(java.awt.Component), RootPaneContainer
setLayout
setRootPaneCheckingEnabled(boolean), RootPaneContainer
getRootPane
setRootPane(javax.swing.JRootPane), RootPaneContainer.getRootPane()
setRootPane
http://docs.oracle.com/javase/8/docs/api/javax/swing/JWindow.html
8 / 11
11/12/2014
Sets the new rootPane object for this window. This method is called by the constructor.
Parameters:
getRootPane()
getContentPane
setContentPane(java.awt.Container), RootPaneContainer.getContentPane()
setContentPane
getContentPane(), RootPaneContainer.setContentPane(java.awt.Container)
getLayeredPane
setLayeredPane(javax.swing.JLayeredPane), RootPaneContainer.getLayeredPane()
setLayeredPane
http://docs.oracle.com/javase/8/docs/api/javax/swing/JWindow.html
9 / 11
11/12/2014
getLayeredPane(), RootPaneContainer.setLayeredPane(javax.swing.JLayeredPane)
getGlassPane
setGlassPane(java.awt.Component), RootPaneContainer.getGlassPane()
setGlassPane
getGlassPane(), RootPaneContainer.setGlassPane(java.awt.Component)
getGraphics
1.6
See Also:
Component.paint(java.awt.Graphics)
repaint
http://docs.oracle.com/javase/8/docs/api/javax/swing/JWindow.html
10 / 11
11/12/2014
1.6
See Also:
RepaintManager
paramString
getAccessibleContext
OVERVIEW PACKAGE
CLASS
Java Platform
Standard Ed. 8
ALL CLASSES
http://docs.oracle.com/javase/8/docs/api/javax/swing/JWindow.html
11 / 11