java.awt
Class Window

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--java.awt.Window
All Implemented Interfaces:
Accessible, java.awt.image.ImageObserver, MenuContainer, Serializable
Direct Known Subclasses:
Dialog, Frame, JWindow

public class Window
extends Container
implements Accessible

Unsafe:

See Also:
Serialized Form

Field Summary
private static String base
           
private static sun.awt.DebugHelper dbg
           
private  boolean focusableWindowState
          Indicates whether this Window can become the focused Window.
private  FocusManager focusMgr
          Unused.
(package private)  java.awt.im.InputContext inputContext
           
private  Object inputContextLock
           
(package private)  boolean isFirstPack
           
private static int nameCounter
           
(package private) static int OPENED
           
(package private)  Vector ownedWindowList
          A vector containing all the windows this window currently owns.
private static long serialVersionUID
           
private  boolean showWithParent
           
(package private)  int state
          An Integer value representing the Window State.
(package private)  boolean syncLWRequests
           
(package private) static boolean systemSyncLWRequests
           
(package private)  String warningString
          This represents the warning message that is to be displayed in a non secure window.
private  java.lang.ref.WeakReference weakThis
           
(package private)  WindowFocusListener windowFocusListener
           
(package private)  WindowListener windowListener
           
private  int windowSerializedDataVersion
          The window serialized data version.
(package private)  WindowStateListener windowStateListener
           
 
Fields inherited from class java.awt.Container
component, containerListener, descendantsCount, INCLUDE_SELF, layoutMgr, listeningBoundsChildren, listeningChildren, ncomponents, SEARCH_HEAVYWEIGHTS
 
Fields inherited from class java.awt.Component
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
 
Constructor Summary
(package private) Window()
          Constructs a new window in the default size.
  Window(Frame owner)
          Suppressed: Constructs a new invisible window with the specified Frame as its owner.
(package private) Window(GraphicsConfiguration gc)
          Constructs a new window in default size with the specified GraphicsConfiguration.
  Window(Window owner)
          Suppressed: Constructs a new invisible window with the specified Window as its owner.
  Window(Window owner, GraphicsConfiguration gc)
          Suppressed: Constructs a new invisible window with the specified window as its owner and a GraphicsConfiguration of a screen device.
 
Method Summary
 void addNotify()
          Suppressed: Makes this Window displayable by creating the connection to its native screen resource.
(package private)  void addOwnedWindow(java.lang.ref.WeakReference weakWindow)
           
 void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
          Suppressed: Adds a PropertyChangeListener to the listener list.
 void addPropertyChangeListener(String propertyName, java.beans.PropertyChangeListener listener)
          Suppressed: Adds a PropertyChangeListener to the listener list for a specific property.
 void addWindowFocusListener(WindowFocusListener l)
          Suppressed: Adds the specified window focus listener to receive window events from this window.
 void addWindowListener(WindowListener l)
          Enabled: Adds the specified window listener to receive window events from this window.
 void addWindowStateListener(WindowStateListener l)
          Suppressed: Adds the specified window state listener to receive window events from this window.
(package private)  void adjustDecendantsOnParent(int num)
           
(package private)  void adjustListeningChildrenOnParent(long mask, int num)
           
 void applyResourceBundle(ResourceBundle rb)
          Deprecated. As of J2SE 1.4, replaced by Component.applyComponentOrientation.
 void applyResourceBundle(String rbName)
          Deprecated. As of J2SE 1.4, replaced by Component.applyComponentOrientation.
(package private)  void clearMostRecentFocusOwnerOnHide()
           
(package private)  void connectOwnedWindow(Window child)
           
(package private)  String constructComponentName()
          Construct a name for this component.
 void createBufferStrategy(int numBuffers)
          Enabled: Creates a new strategy for multi-buffering on this component.
 void createBufferStrategy(int numBuffers, BufferCapabilities caps)
          Enabled: Creates a new strategy for multi-buffering on this component with the required buffer capabilities.
(package private)  void deliverMouseWheelToAncestor(MouseWheelEvent e)
          Overridden from Component.
(package private)  void dispatchEventImpl(AWTEvent e)
          Dispatches an event to this window or one of its sub components.
(package private)  boolean dispatchMouseWheelToAncestor(MouseWheelEvent e)
          Overridden from Component.
 void dispose()
          Enabled: Releases all of the native screen resources used by this Window, its subcomponents, and all of its owned children.
(package private)  boolean eventEnabled(AWTEvent e)
           
protected  void finalize()
          Disposes of the input methods and context, and removes the WeakReference which formerly pointed to this Window from the parent's owned Window list.
 AccessibleContext getAccessibleContext()
          Suppressed: Gets the AccessibleContext associated with this Window.
 java.awt.image.BufferStrategy getBufferStrategy()
          Enabled: @return the buffer strategy used by this component
 boolean getFocusableWindowState()
          Suppressed: Returns whether this Window can become the focused Window if it meets the other requirements outlined in isFocusableWindow.
 Container getFocusCycleRootAncestor()
          Suppressed: Always returns null because Windows have no ancestors; they represent the top of the Component hierarchy.
 Component getFocusOwner()
          Suppressed: Returns the child Component of this Window that has focus if this Window is focused; returns null otherwise.
 Set getFocusTraversalKeys(int id)
          Enabled: Gets a focus traversal key for this Window.
 GraphicsConfiguration getGraphicsConfiguration()
          Suppressed: This method returns the GraphicsConfiguration used by this Window.
 java.awt.im.InputContext getInputContext()
          Suppressed: Gets the input context for this window.
 EventListener[] getListeners(Class listenerType)
          Suppressed: Returns an array of all the objects currently registered as FooListeners upon this Window.
 Locale getLocale()
          Suppressed: Gets the Locale object that is associated with this window, if the locale has been set.
 Component getMostRecentFocusOwner()
          Suppressed: Returns the child Component of this Window that will receive the focus when this Window is focused.
 Window[] getOwnedWindows()
          Suppressed: Return an array containing all the windows this window currently owns.
 Window getOwner()
          Suppressed: Returns the owner of this window.
 Toolkit getToolkit()
          Suppressed: Returns the toolkit of this frame.
 String getWarningString()
          Suppressed: Gets the warning string that is displayed with this window.
 WindowFocusListener[] getWindowFocusListeners()
          Suppressed: Returns an array of all the window focus listeners registered on this window.
 WindowListener[] getWindowListeners()
          Suppressed: Returns an array of all the window listeners registered on this window.
 WindowStateListener[] getWindowStateListeners()
          Suppressed: Returns an array of all the window state listeners registered on this window.
 void hide()
          Enabled: Hide this Window, its subcomponents, and all of its owned children.
private  void init(GraphicsConfiguration gc)
           
private static void initIDs()
          Initialize JNI field and method IDs for fields that may be accessed from C.
 boolean isActive()
          Enabled: Returns whether this Window is active.
 boolean isFocusableWindow()
          Suppressed: Returns whether this Window can become the focused Window, that is, whether this Window or any of its subcomponents can become the focus owner.
 boolean isFocusCycleRoot()
          Suppressed: Always returns true because all Windows must be roots of a focus traversal cycle.
 boolean isFocused()
          Enabled: Returns whether this Window is focused.
 boolean isShowing()
          Enabled: Checks if this Window is showing on screen.
private  void ownedInit(Window owner)
           
 void pack()
          Enabled: Causes this Window to be sized to fit the preferred size and layouts of its subcomponents.
 boolean postEvent(Event e)
          Suppressed: @deprecated As of JDK version 1.1 replaced by dispatchEvent(AWTEvent).
(package private)  void postProcessKeyEvent(KeyEvent e)
           
(package private)  void postWindowEvent(int id)
           
(package private)  void preProcessKeyEvent(KeyEvent e)
          Implements a debugging hook -- checks to see if the user has typed control-shift-F1.
protected  void processEvent(AWTEvent e)
          Processes events on this window.
protected  void processWindowEvent(WindowEvent e)
          Processes window events occurring on this window by dispatching them to any registered WindowListener objects.
protected  void processWindowFocusEvent(WindowEvent e)
          Processes window focus event occuring on this window by dispatching them to any registered WindowFocusListener objects.
protected  void processWindowStateEvent(WindowEvent e)
          Processes window state event occuring on this window by dispatching them to any registered WindowStateListener objects.
private  void readObject(ObjectInputStream s)
          Reads the ObjectInputStream and an optional list of listeners to receive various events fired by the component; also reads a list of (possibly null) child windows.
(package private)  void removeOwnedWindow(java.lang.ref.WeakReference weakWindow)
           
 void removeWindowFocusListener(WindowFocusListener l)
          Suppressed: Removes the specified window focus listener so that it no longer receives window events from this window.
 void removeWindowListener(WindowListener l)
          Enabled: Removes the specified window listener so that it no longer receives window events from this window.
 void removeWindowStateListener(WindowStateListener l)
          Suppressed: Removes the specified window state listener so that it no longer receives window events from this window.
(package private)  void resetGC()
          Reset this Window's GraphicsConfiguration to match its peer.
 void setCursor(Cursor cursor)
          Suppressed: Set the cursor image to a specified cursor.
 void setFocusableWindowState(boolean focusableWindowState)
          Suppressed: Sets whether this Window can become the focused Window if it meets the other requirements outlined in isFocusableWindow.
 void setFocusCycleRoot(boolean focusCycleRoot)
          Suppressed: Does nothing because Windows must always be roots of a focus traversal cycle.
 void setLocationRelativeTo(Component c)
          Enabled: Sets the location of the window relative to the specified component.
private  void setWarningString()
           
 void show()
          Enabled: Makes the Window visible.
 void toBack()
          Enabled: If this Window is visible, sends this Window to the back and may cause it to lose focus or activation if it is the focused or active Window.
 void toFront()
          Suppressed: If this Window is visible, brings this Window to the front and may make it the focused Window.
private  void writeObject(ObjectOutputStream s)
          Writes default serializable fields to stream.
 
Methods inherited from class java.awt.Container
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
 
Methods inherited from class java.awt.Component
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
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

warningString

String warningString
This represents the warning message that is to be displayed in a non secure window. ie : a window that has a security manager installed for which calling SecurityManager.checkTopLevelWindow() is false. This message can be displayed anywhere in the window.

See Also:
getWarningString()

systemSyncLWRequests

static boolean systemSyncLWRequests

syncLWRequests

boolean syncLWRequests

isFirstPack

boolean isFirstPack

OPENED

static final int OPENED

state

int state
An Integer value representing the Window State.

Since:
1.2
See Also:
show()

ownedWindowList

transient Vector ownedWindowList
A vector containing all the windows this window currently owns.

Since:
1.2
See Also:
getOwnedWindows()

weakThis

private transient java.lang.ref.WeakReference weakThis

showWithParent

private transient boolean showWithParent

windowListener

transient WindowListener windowListener

windowStateListener

transient WindowStateListener windowStateListener

windowFocusListener

transient WindowFocusListener windowFocusListener

inputContext

transient java.awt.im.InputContext inputContext

inputContextLock

private transient Object inputContextLock

focusMgr

private FocusManager focusMgr
Unused. Maintained for serialization backward-compatibility.

Since:
1.2

focusableWindowState

private boolean focusableWindowState
Indicates whether this Window can become the focused Window.

Since:
1.4
See Also:
getFocusableWindowState(), setFocusableWindowState(boolean)

base

private static final String base

nameCounter

private static int nameCounter

serialVersionUID

private static final long serialVersionUID

dbg

private static final sun.awt.DebugHelper dbg

windowSerializedDataVersion

private int windowSerializedDataVersion
The window serialized data version.

Constructor Detail

Window

Window(GraphicsConfiguration gc)
Constructs a new window in default size with the specified 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.

Parameters:
gc - the GraphicsConfiguration of the target screen device. If gc is null, the system default GraphicsConfiguration is assumed.
See Also:
java.awt.GraphicsEnvironment#isHeadless, java.lang.SecurityManager#checkTopLevelWindow

Window

Window()
 throws HeadlessException
Constructs a new window in the default size.

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.

See Also:
java.awt.GraphicsEnvironment#isHeadless, java.lang.SecurityManager#checkTopLevelWindow

Window

public Window(Frame owner)
Suppressed: Constructs a new invisible window with the specified 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.

Parameters:
owner - the Frame to act as owner
See Also:
java.awt.GraphicsEnvironment#isHeadless, java.lang.SecurityManager#checkTopLevelWindow, isShowing()

Window

public Window(Window owner)
Suppressed: Constructs a new invisible window with the specified 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.

Parameters:
owner - the Window to act as owner
Since:
1.2
See Also:
java.awt.GraphicsEnvironment#isHeadless, java.lang.SecurityManager#checkTopLevelWindow, isShowing()

Window

public Window(Window owner,
              GraphicsConfiguration gc)
Suppressed: Constructs a new invisible window with the specified window as its owner and a 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.

Parameters:
owner - the window to act as owner
gc - the GraphicsConfiguration of the target screen device; if gc is null, the system default GraphicsConfiguration is assumed
Throws:
IllegalArgumentException - if owner is null
IllegalArgumentException - if gc is not from a screen device; this exception is always thrown when GraphicsEnvironment.isHeadless returns true
Since:
1.3
See Also:
java.awt.GraphicsEnvironment#isHeadless, java.lang.SecurityManager#checkTopLevelWindow, GraphicsConfiguration.getBounds(), isShowing()
Method Detail

initIDs

private static void initIDs()
Initialize JNI field and method IDs for fields that may be accessed from C.


init

private void init(GraphicsConfiguration gc)

ownedInit

private void ownedInit(Window owner)

finalize

protected void finalize()
                 throws Throwable
Disposes of the input methods and context, and removes the WeakReference which formerly pointed to this Window from the parent's owned Window list.

Overrides:
finalize in class Object
Throws:
Throwable - the Exception raised by this method

constructComponentName

String constructComponentName()
Construct a name for this component. Called by getName() when the name is null.

Overrides:
constructComponentName in class Component

addNotify

public void addNotify()
Suppressed: Makes this Window displayable by creating the connection to its native screen resource. This method is called internally by the toolkit and should not be called directly by programs.

Overrides:
addNotify in class Container
Since:
JDK1.0
See Also:
Component.isDisplayable(), Container.removeNotify()

pack

public void pack()
Enabled: Causes this Window to be sized to fit the preferred size and layouts of its subcomponents. If the window and/or its owner are not yet displayable, both are made displayable before calculating the preferred size. The Window will be validated after the preferredSize is calculated.

See Also:
Component.isDisplayable()

show

public void show()
Enabled: Makes the Window visible. If the Window and/or its owner are not yet displayable, both are made displayable. The Window will be validated prior to being made visible. If the Window is already visible, this will bring the Window to the front.

Overrides:
show in class Component
See Also:
Component.isDisplayable(), toFront(), Component.setVisible(boolean)

postWindowEvent

void postWindowEvent(int id)

hide

public void hide()
Enabled: Hide this Window, its subcomponents, and all of its owned children. The Window and its subcomponents can be made visible again with a call to show.

Overrides:
hide in class Component
See Also:
show(), dispose()

clearMostRecentFocusOwnerOnHide

final void clearMostRecentFocusOwnerOnHide()
Overrides:
clearMostRecentFocusOwnerOnHide in class Container

dispose

public void dispose()
Enabled: Releases all of the native screen resources used by this Window, its subcomponents, and all of its owned children. That is, the resources for these Components will be destroyed, any memory they consume will be returned to the OS, and they will be marked as undisplayable.

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).

See Also:
Component.isDisplayable(), pack(), show()

adjustListeningChildrenOnParent

void adjustListeningChildrenOnParent(long mask,
                                     int num)
Overrides:
adjustListeningChildrenOnParent in class Component

adjustDecendantsOnParent

void adjustDecendantsOnParent(int num)
Overrides:
adjustDecendantsOnParent in class Container

toFront

public void toFront()
Suppressed: If this Window is visible, brings this Window to the front and may make it the focused Window.

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.

See Also:
toBack()

toBack

public void toBack()
Enabled: If this Window is visible, sends this Window to the back and may cause it to lose focus or activation if it is the focused or active Window.

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.

See Also:
toFront()

getToolkit

public Toolkit getToolkit()
Suppressed: Returns the toolkit of this frame.

Overrides:
getToolkit in class Component
Returns:
the toolkit of this window.
See Also:
Toolkit, Toolkit.getDefaultToolkit(), Component.getToolkit()

getWarningString

public final String getWarningString()
Suppressed: Gets the warning string that is displayed with this window. If this window is insecure, the warning string is displayed somewhere in the visible area of the window. A window is insecure if there is a security manager, and the security manager's 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.

Returns:
the warning string for this window.
See Also:
java.lang.SecurityManager#checkTopLevelWindow(java.lang.Object)

setWarningString

private void setWarningString()

getLocale

public Locale getLocale()
Suppressed: Gets the 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.

Overrides:
getLocale in class Component
Returns:
the locale that is set for this window.
Since:
JDK1.1
See Also:
java.util.Locale

getInputContext

public java.awt.im.InputContext getInputContext()
Suppressed: Gets the input context for this window. A window always has an input context, which is shared by subcomponents unless they create and set their own.

Overrides:
getInputContext in class Component
Returns:
the input context used by this component; null if no context can be determined
Since:
1.2
See Also:
Component.getInputContext()

setCursor

public void setCursor(Cursor cursor)
Suppressed: Set the cursor image to a specified cursor.

Overrides:
setCursor in class Component
Parameters:
cursor - One of the constants defined by the Cursor class; if this parameter is null then this component will inherit the cursor of its parent
Since:
JDK1.1
See Also:
Component.getCursor(), Cursor

getOwner

public Window getOwner()
Suppressed: Returns the owner of this window.

Since:
1.2

getOwnedWindows

public Window[] getOwnedWindows()
Suppressed: Return an array containing all the windows this window currently owns.

Since:
1.2

addWindowListener

public void addWindowListener(WindowListener l)
Enabled: Adds the specified window listener to receive window events from this window. If l is null, no exception is thrown and no action is performed.

Parameters:
l - the window listener
See Also:
removeWindowListener(java.awt.event.WindowListener), getWindowListeners()

addWindowStateListener

public void addWindowStateListener(WindowStateListener l)
Suppressed: Adds the specified window state listener to receive window events from this window. If l is null, no exception is thrown and no action is performed.

Parameters:
l - the window state listener
Since:
1.4
See Also:
removeWindowStateListener(java.awt.event.WindowStateListener), getWindowStateListeners()

addWindowFocusListener

public void addWindowFocusListener(WindowFocusListener l)
Suppressed: Adds the specified window focus listener to receive window events from this window. If l is null, no exception is thrown and no action is performed.

Parameters:
l - the window focus listener
See Also:
removeWindowFocusListener(java.awt.event.WindowFocusListener), getWindowFocusListeners()

removeWindowListener

public void removeWindowListener(WindowListener l)
Enabled: Removes the specified window listener so that it no longer receives window events from this window. If l is null, no exception is thrown and no action is performed.

Parameters:
l - the window listener
See Also:
addWindowListener(java.awt.event.WindowListener), getWindowListeners()

removeWindowStateListener

public void removeWindowStateListener(WindowStateListener l)
Suppressed: Removes the specified window state listener so that it no longer receives window events from this window. If l is null, no exception is thrown and no action is performed.

Parameters:
l - the window state listener
Since:
1.4
See Also:
addWindowStateListener(java.awt.event.WindowStateListener), getWindowStateListeners()

removeWindowFocusListener

public void removeWindowFocusListener(WindowFocusListener l)
Suppressed: Removes the specified window focus listener so that it no longer receives window events from this window. If l is null, no exception is thrown and no action is performed.

Parameters:
l - the window focus listener
See Also:
addWindowFocusListener(java.awt.event.WindowFocusListener), getWindowFocusListeners()

getWindowListeners

public WindowListener[] getWindowListeners()
Suppressed: Returns an array of all the window listeners registered on this window.

Returns:
all of this window's WindowListeners or an empty array if no window listeners are currently registered
Since:
1.4
See Also:
addWindowListener(java.awt.event.WindowListener), removeWindowListener(java.awt.event.WindowListener)

getWindowFocusListeners

public WindowFocusListener[] getWindowFocusListeners()
Suppressed: Returns an array of all the window focus listeners registered on this window.

Returns:
all of this window's WindowFocusListeners or an empty array if no window focus listeners are currently registered
Since:
1.4
See Also:
addWindowFocusListener(java.awt.event.WindowFocusListener), removeWindowFocusListener(java.awt.event.WindowFocusListener)

getWindowStateListeners

public WindowStateListener[] getWindowStateListeners()
Suppressed: Returns an array of all the window state listeners registered on this window.

Returns:
all of this window's WindowStateListeners or an empty array if no window state listeners are currently registered
Since:
1.4
See Also:
addWindowStateListener(java.awt.event.WindowStateListener), removeWindowStateListener(java.awt.event.WindowStateListener)

getListeners

public EventListener[] getListeners(Class listenerType)
Suppressed: Returns an array of all the objects currently registered as FooListeners upon this Window. FooListeners 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.

Overrides:
getListeners in class