public class JWindow extends Window implements Accessible, RootPaneContainer
| Modifier and Type | Class and Description |
|---|---|
protected class |
JWindow.AccessibleJWindow
Provides accessibility support for
JWindow. |
Window.AccessibleAWTWindowContainer.AccessibleAWTContainerComponent.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_ALIGNMENTABORT, 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, 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, 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 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()
ContainergetPreferredSize in class ContainerComponent.getMinimumSize(),
Component.setPreferredSize(Dimension),
LayoutManagerpublic void setLayout(LayoutManager manager)
Containerpublic void setLayeredPane(JLayeredPane layeredPane)
RootPaneContainersetLayeredPane in interface RootPaneContainerlayeredPane - TODOpublic JLayeredPane getLayeredPane()
RootPaneContainergetLayeredPane in interface RootPaneContainerpublic JRootPane getRootPane()
RootPaneContainergetRootPane in interface RootPaneContainerprotected void setRootPane(JRootPane root)
protected JRootPane createRootPane()
public Container getContentPane()
RootPaneContainergetContentPane in interface RootPaneContainerpublic void setContentPane(Container contentPane)
RootPaneContainersetContentPane in interface RootPaneContainercontentPane - TODOpublic Component getGlassPane()
RootPaneContainergetGlassPane in interface RootPaneContainerpublic void setGlassPane(Component glassPane)
RootPaneContainersetGlassPane in interface RootPaneContainerglassPane - TODOprotected void addImpl(Component comp, Object constraints, int index)
Containeradd() 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)
Containerprotected boolean isRootPaneCheckingEnabled()
protected void setRootPaneCheckingEnabled(boolean enabled)
public void update(Graphics g)
Containerupdate in class Containerg - The graphics context for this update.Component.paint(Graphics),
Component.repaint()protected void processKeyEvent(KeyEvent e)
ComponentprocessKeyEvent in class Componente - the KeyEvent to processKeyListener,
Component.addKeyListener(KeyListener),
Component.enableEvents(long)public AccessibleContext getAccessibleContext()
WindowWindow.
The context is created, if necessary.getAccessibleContext in interface AccessiblegetAccessibleContext in class Windowprotected String paramString()
ContainerparamString in class Container