java.lang.Object | +--java.awt.Component | +--java.awt.Container | +--java.awt.Window
Unsafe:
(package private) Vector
ownedWindowList
(package private) String
warningString
component, containerListener, descendantsCount, INCLUDE_SELF, layoutMgr, listeningBoundsChildren, listeningChildren, ncomponents, SEARCH_HEAVYWEIGHTS
accessibleContext, actionListenerK, adjustmentListenerK, appContext, background, BOTTOM_ALIGNMENT, bufferStrategy, CENTER_ALIGNMENT, componentListener, componentListenerK, componentOrientation, containerListenerK, cursor, dropTarget, enabled, eventMask, focusListener, focusListenerK, focusTraversalKeys, font, foreground, graphicsConfig, height, hierarchyBoundsListener, hierarchyBoundsListenerK, hierarchyListener, hierarchyListenerK, ignoreRepaint, incRate, inputMethodListener, inputMethodListenerK, isInc, isPacked, itemListenerK, keyListener, keyListenerK, LEFT_ALIGNMENT, locale, LOCK, metrics, minSize, mouseListener, mouseListenerK, mouseMotionListener, mouseMotionListenerK, mouseWheelListener, mouseWheelListenerK, newEventsOnly, ownedWindowK, parent, peer, peerFont, popups, prefSize, RIGHT_ALIGNMENT, textListenerK, TOP_ALIGNMENT, valid, visible, width, windowClosingException, windowFocusListenerK, windowListenerK, windowStateListenerK, x, y
Window(Frame owner)
Frame
as its owner.
(package private)
Window(GraphicsConfiguration gc)
GraphicsConfiguration
.
Window(Window owner)
Window
as its owner.
Window(Window owner,
GraphicsConfiguration gc)
GraphicsConfiguration
of a screen device.
void
addNotify()
void
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
void
addPropertyChangeListener(String propertyName,
java.beans.PropertyChangeListener listener)
void
addWindowFocusListener(WindowFocusListener l)
void
addWindowListener(WindowListener l)
void
addWindowStateListener(WindowStateListener l)
void
applyResourceBundle(ResourceBundle rb)
Component.applyComponentOrientation
.
void
applyResourceBundle(String rbName)
Component.applyComponentOrientation
.
void
createBufferStrategy(int numBuffers)
void
createBufferStrategy(int numBuffers,
BufferCapabilities caps)
(package private) void
dispatchEventImpl(AWTEvent e)
(package private) boolean
dispatchMouseWheelToAncestor(MouseWheelEvent e)
void
dispose()
protected void
finalize()
AccessibleContext
getAccessibleContext()
java.awt.image.BufferStrategy
getBufferStrategy()
boolean
getFocusableWindowState()
isFocusableWindow
.
Container
getFocusCycleRootAncestor()
null
because Windows have no ancestors; they
represent the top of the Component hierarchy.
Component
getFocusOwner()
GraphicsConfiguration
getGraphicsConfiguration()
EventListener[]
getListeners(Class listenerType)
FooListener
s
upon this Window
.
Locale
getLocale()
Locale
object that is associated
with this window, if the locale has been set.
Component
getMostRecentFocusOwner()
Window[]
getOwnedWindows()
WindowFocusListener[]
getWindowFocusListeners()
WindowListener[]
getWindowListeners()
WindowStateListener[]
getWindowStateListeners()
private static void
initIDs()
boolean
isFocusableWindow()
boolean
isFocusCycleRoot()
true
because all Windows must be roots of a
focus traversal cycle.
void
pack()
boolean
postEvent(Event e)
dispatchEvent(AWTEvent)
.
(package private) void
preProcessKeyEvent(KeyEvent e)
protected void
processWindowEvent(WindowEvent e)
protected void
processWindowFocusEvent(WindowEvent e)
protected void
processWindowStateEvent(WindowEvent e)
WindowStateListener
objects.
private void
readObject(ObjectInputStream s)
ObjectInputStream
and an optional
list of listeners to receive various events fired by
the component; also reads a list of
(possibly null
) child windows.
void
removeWindowFocusListener(WindowFocusListener l)
void
removeWindowListener(WindowListener l)
void
removeWindowStateListener(WindowStateListener l)
void
setFocusableWindowState(boolean focusableWindowState)
isFocusableWindow
.
void
setFocusCycleRoot(boolean focusCycleRoot)
void
setLocationRelativeTo(Component c)
void
toBack()
void
toFront()
add, add, add, add, add, addContainerListener, addImpl, adjustDescendants, adjustListeningChildren, applyComponentOrientation, areFocusTraversalKeysSet, checkGD, clearCurrentFocusCycleRootOnHide, containsFocus, countComponents, countHierarchyMembers, createChildHierarchyEvents, createHierarchyEvents, deliverEvent, dispatchEventToSelf, doLayout, findComponentAt, findComponentAt, findComponentAt, get, getAccessibleAt, getAccessibleChild, getAccessibleChildrenCount, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents_NoClientCode, getComponents, getContainerListeners, getDropTargetEventTarget, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMouseEventTarget, getPreferredSize, initializeFocusTraversalKeys, insets, invalidate, invalidateTree, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicySet, iterate, layout, lightweightPaint, lightweightPrint, list, list, locate, minimumSize, nextFocusHelper, numListening, paint, paintComponents, paintHeavyweightComponents, paramString, postsOldMouseEvents, preferredSize, print, printComponents, printHeavyweightComponents, processContainerEvent, proxyEnableEvents, remove, remove, removeAll, removeContainerListener, removeNotify, setFocusTraversalKeys, setFocusTraversalPolicy, setFont, setLayout, setZOrder, size, transferFocusBackward, transferFocusDownCycle, update, validate, validateTree
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, areInputMethodsEnabled, autoProcessMouseWheel, autoTransferFocus, bounds, checkImage, checkImage, checkWindowClosingException, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, eventTypeEnabled, firePropertyChange, firePropertyChange, firePropertyChange, getAccessibleIndexInParent, getAccessibleStateSet, getBackBuffer, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeys_NoIDCheck, getFocusTraversalKeysEnabled, getFont_NoClientCode, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen_NoTreeLock, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getNativeContainer, getParent_NoClientCode, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkitImpl, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isEnabledImpl, isFocusable, isFocusOwner, isFocusTraversable, isFocusTraversableOverridden, isFontSet, isForegroundSet, isLightweight, isOpaque, isRecursivelyVisible, 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, requestFocusHelper, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeys_NoIDCheck, setFocusTraversalKeysEnabled, setForeground, setGCFromPeer, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, toString, transferFocus, transferFocus, transferFocusUpCycle, updateCursorImmediately
String warningString
getWarningString()
static boolean systemSyncLWRequests
boolean syncLWRequests
boolean isFirstPack
static final int OPENED
int state
show()
transient Vector ownedWindowList
getOwnedWindows()
private transient java.lang.ref.WeakReference weakThis
private transient boolean showWithParent
transient WindowListener windowListener
transient WindowStateListener windowStateListener
transient WindowFocusListener windowFocusListener
transient java.awt.im.InputContext inputContext
private transient Object inputContextLock
private FocusManager focusMgr
private boolean focusableWindowState
getFocusableWindowState()
,
setFocusableWindowState(boolean)
private static final String base
private static int nameCounter
private static final long serialVersionUID
private static final sun.awt.DebugHelper dbg
private int windowSerializedDataVersion
Window(GraphicsConfiguration gc)
GraphicsConfiguration
.
If there is a security manager, this method first calls
the security manager's checkTopLevelWindow
method with this
as its argument to determine whether or not the window
must be displayed with a warning banner.
gc
- the GraphicsConfiguration
of the target screen device. If gc
is
null
, the system default
GraphicsConfiguration
is assumed.java.awt.GraphicsEnvironment#isHeadless
,
java.lang.SecurityManager#checkTopLevelWindow
Window() throws HeadlessException
First, if there is a security manager, its
checkTopLevelWindow
method is called with this
as its argument
to see if it's ok to display the window without a warning banner.
If the default implementation of checkTopLevelWindow
is used (that is, that method is not overriden), then this results in
a call to the security manager's checkPermission
method
with an AWTPermission("showWindowWithoutWarningBanner")
permission. It that method raises a SecurityException,
checkTopLevelWindow
returns false, otherwise it
returns true. If it returns false, a warning banner is created.
java.awt.GraphicsEnvironment#isHeadless
,
java.lang.SecurityManager#checkTopLevelWindow
public Window(Frame owner)
Frame
as its owner. The Window will not be focusable
unless its owner is showing on the screen.
If there is a security manager, this method first calls
the security manager's checkTopLevelWindow
method with this
as its argument to determine whether or not the window
must be displayed with a warning banner.
owner
- the Frame
to act as ownerjava.awt.GraphicsEnvironment#isHeadless
,
java.lang.SecurityManager#checkTopLevelWindow
,
isShowing()
public Window(Window owner)
Window
as its owner. The Window will not be focusable
unless its nearest owning Frame or Dialog is showing on the screen.
If there is a security manager, this method first calls
the security manager's checkTopLevelWindow
method with this
as its argument to determine whether or not the window
must be displayed with a warning banner.
owner
- the Window
to act as ownerjava.awt.GraphicsEnvironment#isHeadless
,
java.lang.SecurityManager#checkTopLevelWindow
,
isShowing()
public Window(Window owner, GraphicsConfiguration gc)
GraphicsConfiguration
of a screen device. The Window will
not be focusable unless its nearest owning Frame or Dialog is showing on
the screen.
If there is a security manager, this method first calls
the security manager's checkTopLevelWindow
method with this
as its argument to determine whether or not the window
must be displayed with a warning banner.
owner
- the window to act as ownergc
- the GraphicsConfiguration
of the target screen device; if gc
is
null
, the system default
GraphicsConfiguration
is assumed
IllegalArgumentException
- if
owner
is null
IllegalArgumentException
- if gc
is not from
a screen device; this exception is always thrown when
GraphicsEnvironment.isHeadless
returns
true
java.awt.GraphicsEnvironment#isHeadless
,
java.lang.SecurityManager#checkTopLevelWindow
,
GraphicsConfiguration.getBounds()
,
isShowing()
private static void initIDs()
private void init(GraphicsConfiguration gc)
private void ownedInit(Window owner)
protected void finalize() throws Throwable
Throwable
- the Exception
raised by this methodString constructComponentName()
constructComponentName
in class Component
public void addNotify()
Component.isDisplayable()
,
Container.removeNotify()
public void pack()
Component.isDisplayable()
public void show()
void postWindowEvent(int id)
public void hide()
show
.
final void clearMostRecentFocusOwnerOnHide()
clearMostRecentFocusOwnerOnHide
in class Container
public void dispose()
The Window and its subcomponents can be made displayable again
by rebuilding the native resources with a subsequent call to
pack
or show
. The states of the recreated
Window and its subcomponents will be identical to the states of these
objects at the point where the Window was disposed (not accounting for
additional modifcations between those actions).
Component.isDisplayable()
,
pack()
,
show()
void adjustListeningChildrenOnParent(long mask, int num)
adjustListeningChildrenOnParent
in class Component
void adjustDecendantsOnParent(int num)
adjustDecendantsOnParent
in class Container
public void toFront()
Places this Window at the top of the stacking order and shows it in front of any other Windows in this VM. No action will take place is this Window is not visible. Some platforms do not allow Windows which own other Windows to appear on top of those owned Windows. Some platforms may not permit this VM to place its Windows above windows of native applications, or Windows of other VMs. This permission may depend on whether a Window in this VM is already focused. Every attempt will be made to move this Window as high as possible in the stacking order; however, developers should not assume that this method will move this Window above all other windows in every situation.
Because of variations in native windowing systems, no guarantees about changes to the focused and active Windows can be made. Developers must never assume that this Window is the focused or active Window until this Window receives a WINDOW_GAINED_FOCUS or WINDOW_ACTIVATED event. On platforms where the top-most window is the focused window, this method will probably focus this Window, if it is not already focused. On platforms where the stacking order does not typically affect the focused window, this method will probably leave the focused and active Windows unchanged.
If this method causes this Window to be focused, and this Window is a Frame or a Dialog, it will also become activated. If this Window is focused, but it is not a Frame or a Dialog, then the first Frame or Dialog that is an owner of this Window will be activated.
toBack()
public void toBack()
Places this Window at the bottom of the stacking order and shows it behind any other Windows in this VM. No action will take place is this Window is not visible. Some platforms do not allow Windows which are owned by other Windows to appear below their owners. Every attempt will be made to move this Window as low as possible in the stacking order; however, developers should not assume that this method will move this Window below all other windows in every situation.
Because of variations in native windowing systems, no guarantees about changes to the focused and active Windows can be made. Developers must never assume that this Window is no longer the focused or active Window until this Window receives a WINDOW_LOST_FOCUS or WINDOW_DEACTIVATED event. On platforms where the top-most window is the focused window, this method will probably cause this Window to lose focus. In that case, the next highest, focusable Window in this VM will receive focus. On platforms where the stacking order does not typically affect the focused window, this method will probably leave the focused and active Windows unchanged.
toFront()
public Toolkit getToolkit()
getToolkit
in class Component
Toolkit
,
Toolkit.getDefaultToolkit()
,
Component.getToolkit()
public final String getWarningString()
checkTopLevelWindow
method returns
false
when this window is passed to it as an
argument.
If the window is secure, then getWarningString
returns null
. If the window is insecure, this
method checks for the system property
awt.appletWarning
and returns the string value of that property.
java.lang.SecurityManager#checkTopLevelWindow(java.lang.Object)
private void setWarningString()
public Locale getLocale()
Locale
object that is associated
with this window, if the locale has been set.
If no locale has been set, then the default locale
is returned.
java.util.Locale
public java.awt.im.InputContext getInputContext()
getInputContext
in class Component
null
if no context can be determinedComponent.getInputContext()
public void setCursor(Cursor cursor)
cursor
- One of the constants defined
by the Cursor
class;
if this parameter is null
then this component will inherit
the cursor of its parentComponent.getCursor()
,
Cursor
public Window getOwner()
public Window[] getOwnedWindows()
public void addWindowListener(WindowListener l)
l
- the window listenerremoveWindowListener(java.awt.event.WindowListener)
,
getWindowListeners()
public void addWindowStateListener(WindowStateListener l)
l
is null,
no exception is thrown and no action is performed.
l
- the window state listenerremoveWindowStateListener(java.awt.event.WindowStateListener)
,
getWindowStateListeners()
public void addWindowFocusListener(WindowFocusListener l)
l
- the window focus listenerremoveWindowFocusListener(java.awt.event.WindowFocusListener)
,
getWindowFocusListeners()
public void removeWindowListener(WindowListener l)
l
- the window listeneraddWindowListener(java.awt.event.WindowListener)
,
getWindowListeners()
public void removeWindowStateListener(WindowStateListener l)
l
is null
, no exception is thrown and
no action is performed.
l
- the window state listeneraddWindowStateListener(java.awt.event.WindowStateListener)
,
getWindowStateListeners()
public void removeWindowFocusListener(WindowFocusListener l)
l
- the window focus listeneraddWindowFocusListener(java.awt.event.WindowFocusListener)
,
getWindowFocusListeners()
public WindowListener[] getWindowListeners()
WindowListener
s
or an empty array if no window
listeners are currently registeredaddWindowListener(java.awt.event.WindowListener)
,
removeWindowListener(java.awt.event.WindowListener)
public WindowFocusListener[] getWindowFocusListeners()
WindowFocusListener
s
or an empty array if no window focus
listeners are currently registeredaddWindowFocusListener(java.awt.event.WindowFocusListener)
,
removeWindowFocusListener(java.awt.event.WindowFocusListener)
public WindowStateListener[] getWindowStateListeners()
WindowStateListener
s
or an empty array if no window state
listeners are currently registeredaddWindowStateListener(java.awt.event.WindowStateListener)
,
removeWindowStateListener(java.awt.event.WindowStateListener)
public EventListener[] getListeners(Class listenerType)
FooListener
s
upon this Window
.
FooListener
s are registered using the
addFooListener
method.
You can specify the listenerType
argument
with a class literal, such as
FooListener.class
.
For example, you can query a
Window
w
for its window listeners with the following code:
WindowListener[] wls = (WindowListener[])(w.getListeners(WindowListener.class));If no such listeners exist, this method returns an empty array.
getListeners
in class Container
listenerType
- the type of listeners requested; this parameter
should specify an interface that descends from
java.util.EventListener
FooListener
s on this window,
or an empty array if no such
listeners have been addedgetWindowListeners()
boolean eventEnabled(AWTEvent e)
eventEnabled
in class Container
protected void processEvent(AWTEvent e)
WindowEvent
, it invokes the
processWindowEvent
method, else it invokes its
superclass's processEvent
.
Note that if the event parameter is null
the behavior is unspecified and may result in an
exception.
processEvent
in class Container
e
- the eventprotected void processWindowEvent(WindowEvent e)
addWindowListener
enableEvents
Note that if the event parameter is null
the behavior is unspecified and may result in an
exception.
e
- the window eventComponent.enableEvents(long)
protected void processWindowFocusEvent(WindowEvent e)
addWindowFocusListener
enableEvents
Note that if the event parameter is null
the behavior is unspecified and may result in an
exception.
e
- the window focus eventComponent.enableEvents(long)
protected void processWindowStateEvent(WindowEvent e)
WindowStateListener
objects.
NOTE: this method will not be called unless window state events
are enabled for this window. This happens when one of the
following occurs:
WindowStateListener
is registered via
addWindowStateListener
enableEvents
Note that if the event parameter is null
the behavior is unspecified and may result in an
exception.
e
- the window state eventjava.awt.Component#enableEvents
void preProcessKeyEvent(KeyEvent e)
System.out
.
preProcessKeyEvent
in class Container
e
- the keyboard eventvoid postProcessKeyEvent(KeyEvent e)
postProcessKeyEvent
in class Container
public Component getFocusOwner()
getMostRecentFocusOwner()
,
isFocused()
public Component getMostRecentFocusOwner()
getFocusOwner()
. If
this Window is not focused, then the child Component that most recently
requested focus will be returned. If no child Component has ever
requested focus, and this is a focusable Window, then this Window's
initial focusable Component is returned. If no child Component has ever
requested focus, and this is a non-focusable Window, null is returned.
getFocusOwner()
,
isFocused()
,
isFocusableWindow()
public boolean isActive()
isFocused()
public boolean isFocused()
If the focused Window is a Frame or a Dialog it is also the active Window. Otherwise, the active Window is the first Frame or Dialog that is an owner of the focused Window.
isActive()
public Set getFocusTraversalKeys(int id)
setFocusTraversalKeys
for a full description of each key.)
If the traversal key has not been explicitly set for this Window, then this Window's parent's traversal key is returned. If the traversal key has not been explicitly set for any of this Window's ancestors, then the current KeyboardFocusManager's default traversal key is returned.
getFocusTraversalKeys
in class Container
id
- one of KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS,
KeyboardFocusManager.BACKWARD_TRAVERSAL_KEYS,
KeyboardFocusManager.UP_CYCLE_TRAVERSAL_KEYS, or
KeyboardFocusManager.DOWN_CYCLE_TRAVERSAL_KEYS
IllegalArgumentException
- if id is not one of
KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS,
KeyboardFocusManager.BACKWARD_TRAVERSAL_KEYS,
KeyboardFocusManager.UP_CYCLE_TRAVERSAL_KEYS, or
KeyboardFocusManager.DOWN_CYCLE_TRAVERSAL_KEYSContainer.setFocusTraversalKeys(int, java.util.Set)
,
KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS
,
KeyboardFocusManager.BACKWARD_TRAVERSAL_KEYS
,
KeyboardFocusManager.UP_CYCLE_TRAVERSAL_KEYS
,
KeyboardFocusManager.DOWN_CYCLE_TRAVERSAL_KEYS
public final void setFocusCycleRoot(boolean focusCycleRoot)
setFocusCycleRoot
in class Container
focusCycleRoot
- this value is ignoredisFocusCycleRoot()
,
Container.setFocusTraversalPolicy(java.awt.FocusTraversalPolicy)
,
Container.getFocusTraversalPolicy()
public final boolean isFocusCycleRoot()
true
because all Windows must be roots of a
focus traversal cycle.
isFocusCycleRoot
in class Container
true
setFocusCycleRoot(boolean)
,
Container.setFocusTraversalPolicy(java.awt.FocusTraversalPolicy)
,
Container.getFocusTraversalPolicy()
public final Container getFocusCycleRootAncestor()
null
because Windows have no ancestors; they
represent the top of the Component hierarchy.
getFocusCycleRootAncestor
in class Component
null
Container.isFocusCycleRoot()
public final boolean isFocusableWindow()
true
. For a Window which is not a Frame or
Dialog to be focusable, its focusable Window state must be set to
true
, its nearest owning Frame or Dialog must be
showing on the screen, and it must contain at least one Component in
its focus traversal cycle. If any of these conditions is not met, then
neither this Window nor any of its subcomponents can become the focus
owner.
true
if this Window can be the focused Window;
false
otherwisegetFocusableWindowState()
,
setFocusableWindowState(boolean)
,
isShowing()
,
Component.isFocusable()
public boolean getFocusableWindowState()
isFocusableWindow
. If
this method returns false
, then
isFocusableWindow
will return false
as well.
If this method returns true
, then
isFocusableWindow
may return true
or
false
depending upon the other requirements which must be
met in order for a Window to be focusable.
By default, all Windows have a focusable Window state of
true
.
isFocusableWindow()
,
setFocusableWindowState(boolean)
,
isShowing()
,
Component.setFocusable(boolean)
public void setFocusableWindowState(boolean focusableWindowState)
isFocusableWindow
. If
this Window's focusable Window state is set to false
, then
isFocusableWindow
will return false
. If this
Window's focusable Window state is set to true
, then
isFocusableWindow
may return true
or
false
depending upon the other requirements which must be
met in order for a Window to be focusable.
Setting a Window's focusability state to false
is the
standard mechanism for an application to identify to the AWT a Window
which will be used as a floating palette or toolbar, and thus should be
a non-focusable Window.
focusableWindowState
- whether this Window can be the focused
WindowisFocusableWindow()
,
getFocusableWindowState()
,
isShowing()
,
Component.setFocusable(boolean)
public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
If listener is null, no exception is thrown and no action is performed.
addPropertyChangeListener
in class Container
listener
- the PropertyChangeListener to be addedComponent.removePropertyChangeListener(java.beans.PropertyChangeListener)
,
addPropertyChangeListener(java.lang.String,java.beans.PropertyChangeListener)
public void addPropertyChangeListener(String propertyName, java.beans.PropertyChangeListener listener)
If listener is null, no exception is thrown and no action is performed.
addPropertyChangeListener
in class Container
propertyName
- one of the property names listed abovelistener
- the PropertyChangeListener to be addedaddPropertyChangeListener(java.beans.PropertyChangeListener)
,
Component.removePropertyChangeListener(java.beans.PropertyChangeListener)
void dispatchEventImpl(AWTEvent e)
dispatchEventImpl
in class Container
e
- the eventpublic boolean postEvent(Event e)
dispatchEvent(AWTEvent)
.
postEvent
in interface MenuContainer
postEvent
in class Component
public boolean isShowing()
true
if the component is showing,
false
otherwiseComponent.setVisible(boolean)
public void applyResourceBundle(ResourceBundle rb)
Component.applyComponentOrientation
.
ComponentOrientation
public void applyResourceBundle(String rbName)
Component.applyComponentOrientation
.
ComponentOrientation
void addOwnedWindow(java.lang.ref.WeakReference weakWindow)
void removeOwnedWindow(java.lang.ref.WeakReference weakWindow)
void connectOwnedWindow(Window child)
private void writeObject(ObjectOutputStream s) throws IOException
WindowListener
s and
WindowFocusListener
s as optional data.
Writes a list of child windows as optional data.
s
- the ObjectOutputStream
to write
IOException
AWTEventMulticaster.save(java.io.ObjectOutputStream, java.lang.String, java.util.EventListener)
,
Component.windowListenerK
,
Component.windowFocusListenerK
,
Component.ownedWindowK
,
readObject(java.io.ObjectInputStream)
private void readObject(ObjectInputStream s) throws ClassNotFoundException, IOException, HeadlessException
ObjectInputStream
and an optional
list of listeners to receive various events fired by
the component; also reads a list of
(possibly null
) child windows.
Unrecognized keys or values will be ignored.
s
- the ObjectInputStream
to read
ClassNotFoundException
IOException
HeadlessException
java.awt.GraphicsEnvironment#isHeadless
,
writeObject(java.io.ObjectOutputStream)
public AccessibleContext getAccessibleContext()
getAccessibleContext
in interface Accessible
getAccessibleContext
in class Component
public GraphicsConfiguration getGraphicsConfiguration()
getGraphicsConfiguration
in class Component
GraphicsConfiguration
used by this
Component
or null
void resetGC()
public void setLocationRelativeTo(Component c)
c
is null
, the
window is centered on the screen. If the bottom of the
component is offscreen, the window is displayed to the
right of the component.
c
- the component in relation to which the window's location
is determinedvoid deliverMouseWheelToAncestor(MouseWheelEvent e)
boolean dispatchMouseWheelToAncestor(MouseWheelEvent e)
dispatchMouseWheelToAncestor
in class Component
public void createBufferStrategy(int numBuffers)
BufferStrategy
with that number of buffers.
A page-flipping strategy is attempted first, then a blitting strategy
using accelerated buffers. Finally, an unaccelerated blitting
strategy is used.
Each time this method is called, the existing buffer strategy for this component is discarded.
createBufferStrategy
in class Component
numBuffers
- number of buffers to createComponent.isDisplayable()
,
getBufferStrategy()
public void createBufferStrategy(int numBuffers, BufferCapabilities caps) throws AWTException
Each time this method is called, the existing buffer strategy for this component is discarded.
createBufferStrategy
in class Component
numBuffers
- number of buffers to create, including the front buffercaps
- the required capabilities for creating the buffer strategy;
cannot be null
AWTException
getBufferStrategy()
public java.awt.image.BufferStrategy getBufferStrategy()
getBufferStrategy
in class Component
createBufferStrategy(int)