javax.swing
public class JWindow extends Window implements Accessible, RootPaneContainer
Modifier and Type | Class and Description |
---|---|
protected class |
JWindow.AccessibleJWindow
Provides accessibility support for
JWindow . |
Window.AccessibleAWTWindow
Container.AccessibleAWTContainer
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy
Modifier and Type | Field and Description |
---|---|
protected AccessibleContext |
accessibleContext |
protected JRootPane |
rootPane |
protected boolean |
rootPaneCheckingEnabled |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor and Description |
---|
JWindow()
Creates a new
JWindow that has a shared invisible owner frame
as its parent. |
JWindow(Frame owner)
Creates a new
JWindow that has the specified
owner frame. |
JWindow(GraphicsConfiguration gc)
Creates a new
JWindow that uses the specified graphics
environment. |
JWindow(Window owner)
Creates a new
JWindow that has the specified
owner window. |
JWindow(Window owner,
GraphicsConfiguration gc)
Creates a new
JWindow for the given graphics configuration
and that has the specified owner window. |
Modifier and Type | Method and Description |
---|---|
protected void |
addImpl(Component comp,
Object constraints,
int index)
This method is called by all the
add() methods to perform
the actual adding of the component. |
protected JRootPane |
createRootPane() |
AccessibleContext |
getAccessibleContext()
Gets the AccessibleContext associated with this
Window . |
Container |
getContentPane()
getContentPane
|
Component |
getGlassPane()
getGlassPane
|
JLayeredPane |
getLayeredPane()
getLayeredPane
|
Dimension |
getPreferredSize()
Returns the preferred size of this container.
|
JRootPane |
getRootPane()
getRootPane
|
protected boolean |
isRootPaneCheckingEnabled() |
protected String |
paramString()
Returns a string representing the state of this container for
debugging purposes.
|
protected void |
processKeyEvent(KeyEvent e)
Called when a key event is dispatched and component events are
enabled.
|
void |
remove(Component comp)
Removes the specified component from this container.
|
void |
setContentPane(Container contentPane)
setContentPane
|
void |
setGlassPane(Component glassPane)
setGlassPane
|
void |
setLayeredPane(JLayeredPane layeredPane)
setLayeredPane
|
void |
setLayout(LayoutManager manager)
Sets the layout manager for this container to the specified layout
manager.
|
protected void |
setRootPane(JRootPane root) |
protected void |
setRootPaneCheckingEnabled(boolean enabled) |
void |
update(Graphics g)
Updates this container.
|
protected void |
windowInit() |
addNotify, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getGraphicsConfiguration, getListeners, getLocale, getMostRecentFocusOwner, getOwnedWindows, getOwner, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isFocusableWindow, isFocusCycleRoot, isFocused, isShowing, pack, postEvent, processEvent, processWindowEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, setAlwaysOnTop, setCursor, setFocusableWindowState, setFocusCycleRoot, setLocationRelativeTo, show, toBack, toFront
add, 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, validateTree
action, 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, 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, transferFocusUpCycle
protected boolean rootPaneCheckingEnabled
protected AccessibleContext accessibleContext
public JWindow()
JWindow
that has a shared invisible owner frame
as its parent.public JWindow(GraphicsConfiguration gc)
JWindow
that uses the specified graphics
environment. This can be used to open a window on a different screen for
example.gc
- the graphics environment to usepublic JWindow(Frame owner)
JWindow
that has the specified
owner
frame. If owner
is null
, then
an invisible shared owner frame is installed as owner frame.owner
- the owner frame of this window; if null
a shared
invisible owner frame is usedpublic JWindow(Window owner)
JWindow
that has the specified
owner
window. If owner
is null
,
then an invisible shared owner frame is installed as owner frame.owner
- the owner window of this window; if null
a
shared invisible owner frame is usedpublic JWindow(Window owner, GraphicsConfiguration gc)
JWindow
for the given graphics configuration
and that has the specified owner
window. If
owner
is null
, then an invisible shared owner
frame is installed as owner frame.
The gc
parameter can be used to open the window on a
different screen for example.owner
- the owner window of this window; if null
a
shared invisible owner frame is usedgc
- the graphics configuration to useprotected void windowInit()
public Dimension getPreferredSize()
Container
getPreferredSize
in class Container
Component.getMinimumSize()
,
Component.setPreferredSize(Dimension)
,
LayoutManager
public void setLayout(LayoutManager manager)
Container
public void setLayeredPane(JLayeredPane layeredPane)
RootPaneContainer
setLayeredPane
in interface RootPaneContainer
layeredPane
- TODOpublic JLayeredPane getLayeredPane()
RootPaneContainer
getLayeredPane
in interface RootPaneContainer
public JRootPane getRootPane()
RootPaneContainer
getRootPane
in interface RootPaneContainer
protected void setRootPane(JRootPane root)
protected JRootPane createRootPane()
public Container getContentPane()
RootPaneContainer
getContentPane
in interface RootPaneContainer
public void setContentPane(Container contentPane)
RootPaneContainer
setContentPane
in interface RootPaneContainer
contentPane
- TODOpublic Component getGlassPane()
RootPaneContainer
getGlassPane
in interface RootPaneContainer
public void setGlassPane(Component glassPane)
RootPaneContainer
setGlassPane
in interface RootPaneContainer
glassPane
- TODOprotected void addImpl(Component comp, Object constraints, int index)
Container
add()
methods to perform
the actual adding of the component. Subclasses who wish to perform
their own processing when a component is added should override this
method. Any subclass doing this must call the superclass version of
this method in order to ensure proper functioning of the container.public void remove(Component comp)
Container
protected boolean isRootPaneCheckingEnabled()
protected void setRootPaneCheckingEnabled(boolean enabled)
public void update(Graphics g)
Container
update
in class Container
g
- The graphics context for this update.Component.paint(Graphics)
,
Component.repaint()
protected void processKeyEvent(KeyEvent e)
Component
processKeyEvent
in class Component
e
- the KeyEvent
to processKeyListener
,
Component.addKeyListener(KeyListener)
,
Component.enableEvents(long)
public AccessibleContext getAccessibleContext()
Window
Window
.
The context is created, if necessary.getAccessibleContext
in interface Accessible
getAccessibleContext
in class Window
protected String paramString()
Container
paramString
in class Container