Window (Java Platform SE 7 ) (original) (raw)
Modifier and Type
Method and Description
void
**[addNotify](../../java/awt/Window.html#addNotify%28%29)**()
Makes this Window displayable by creating the connection to its native screen resource.
void
**[addPropertyChangeListener](../../java/awt/Window.html#addPropertyChangeListener%28java.beans.PropertyChangeListener%29)**([PropertyChangeListener](../../java/beans/PropertyChangeListener.html "interface in java.beans") listener)
Adds a PropertyChangeListener to the listener list.
void
**[addPropertyChangeListener](../../java/awt/Window.html#addPropertyChangeListener%28java.lang.String,%20java.beans.PropertyChangeListener%29)**([String](../../java/lang/String.html "class in java.lang") propertyName,[PropertyChangeListener](../../java/beans/PropertyChangeListener.html "interface in java.beans") listener)
Adds a PropertyChangeListener to the listener list for a specific property.
void
**[addWindowFocusListener](../../java/awt/Window.html#addWindowFocusListener%28java.awt.event.WindowFocusListener%29)**([WindowFocusListener](../../java/awt/event/WindowFocusListener.html "interface in java.awt.event") l)
Adds the specified window focus listener to receive window events from this window.
void
**[addWindowListener](../../java/awt/Window.html#addWindowListener%28java.awt.event.WindowListener%29)**([WindowListener](../../java/awt/event/WindowListener.html "interface in java.awt.event") l)
Adds the specified window listener to receive window events from this window.
void
**[addWindowStateListener](../../java/awt/Window.html#addWindowStateListener%28java.awt.event.WindowStateListener%29)**([WindowStateListener](../../java/awt/event/WindowStateListener.html "interface in java.awt.event") l)
Adds the specified window state listener to receive window events from this window.
void
**[applyResourceBundle](../../java/awt/Window.html#applyResourceBundle%28java.util.ResourceBundle%29)**([ResourceBundle](../../java/util/ResourceBundle.html "class in java.util") rb)
void
**[applyResourceBundle](../../java/awt/Window.html#applyResourceBundle%28java.lang.String%29)**([String](../../java/lang/String.html "class in java.lang") rbName)
void
**[createBufferStrategy](../../java/awt/Window.html#createBufferStrategy%28int%29)**(int numBuffers)
Creates a new strategy for multi-buffering on this component.
void
**[createBufferStrategy](../../java/awt/Window.html#createBufferStrategy%28int,%20java.awt.BufferCapabilities%29)**(int numBuffers,[BufferCapabilities](../../java/awt/BufferCapabilities.html "class in java.awt") caps)
Creates a new strategy for multi-buffering on this component with the required buffer capabilities.
void
**[dispose](../../java/awt/Window.html#dispose%28%29)**()
Releases all of the native screen resources used by thisWindow
, its subcomponents, and all of its owned children.
[AccessibleContext](../../javax/accessibility/AccessibleContext.html "class in javax.accessibility")
**[getAccessibleContext](../../java/awt/Window.html#getAccessibleContext%28%29)**()
Gets the AccessibleContext associated with this Window.
[Color](../../java/awt/Color.html "class in java.awt")
**[getBackground](../../java/awt/Window.html#getBackground%28%29)**()
Gets the background color of this window.
[BufferStrategy](../../java/awt/image/BufferStrategy.html "class in java.awt.image")
**[getBufferStrategy](../../java/awt/Window.html#getBufferStrategy%28%29)**()
Returns the BufferStrategy
used by this component.
boolean
**[getFocusableWindowState](../../java/awt/Window.html#getFocusableWindowState%28%29)**()
Returns whether this Window can become the focused Window if it meets the other requirements outlined in isFocusableWindow
.
[Container](../../java/awt/Container.html "class in java.awt")
**[getFocusCycleRootAncestor](../../java/awt/Window.html#getFocusCycleRootAncestor%28%29)**()
Always returns null
because Windows have no ancestors; they represent the top of the Component hierarchy.
[Component](../../java/awt/Component.html "class in java.awt")
**[getFocusOwner](../../java/awt/Window.html#getFocusOwner%28%29)**()
Returns the child Component of this Window that has focus if this Window is focused; returns null otherwise.
[Set](../../java/util/Set.html "interface in java.util")<[AWTKeyStroke](../../java/awt/AWTKeyStroke.html "class in java.awt")>
**[getFocusTraversalKeys](../../java/awt/Window.html#getFocusTraversalKeys%28int%29)**(int id)
Gets a focus traversal key for this Window.
[List](../../java/util/List.html "interface in java.util")<[Image](../../java/awt/Image.html "class in java.awt")>
**[getIconImages](../../java/awt/Window.html#getIconImages%28%29)**()
Returns the sequence of images to be displayed as the icon for this window.
[InputContext](../../java/awt/im/InputContext.html "class in java.awt.im")
**[getInputContext](../../java/awt/Window.html#getInputContext%28%29)**()
Gets the input context for this window.
<T extends [EventListener](../../java/util/EventListener.html "interface in java.util")> T[]
**[getListeners](../../java/awt/Window.html#getListeners%28java.lang.Class%29)**([Class](../../java/lang/Class.html "class in java.lang")<T> listenerType)
Returns an array of all the objects currently registered as _Foo_Listener
s upon this Window
.
[Locale](../../java/util/Locale.html "class in java.util")
**[getLocale](../../java/awt/Window.html#getLocale%28%29)**()
Gets the Locale
object that is associated with this window, if the locale has been set.
[Dialog.ModalExclusionType](../../java/awt/Dialog.ModalExclusionType.html "enum in java.awt")
**[getModalExclusionType](../../java/awt/Window.html#getModalExclusionType%28%29)**()
Returns the modal exclusion type of this window.
[Component](../../java/awt/Component.html "class in java.awt")
**[getMostRecentFocusOwner](../../java/awt/Window.html#getMostRecentFocusOwner%28%29)**()
Returns the child Component of this Window that will receive the focus when this Window is focused.
float
**[getOpacity](../../java/awt/Window.html#getOpacity%28%29)**()
Returns the opacity of the window.
[Window](../../java/awt/Window.html "class in java.awt")[]
**[getOwnedWindows](../../java/awt/Window.html#getOwnedWindows%28%29)**()
Return an array containing all the windows this window currently owns.
[Window](../../java/awt/Window.html "class in java.awt")
**[getOwner](../../java/awt/Window.html#getOwner%28%29)**()
Returns the owner of this window.
static [Window](../../java/awt/Window.html "class in java.awt")[]
**[getOwnerlessWindows](../../java/awt/Window.html#getOwnerlessWindows%28%29)**()
Returns an array of all Window
s created by this application that have no owner.
[Shape](../../java/awt/Shape.html "interface in java.awt")
**[getShape](../../java/awt/Window.html#getShape%28%29)**()
Returns the shape of the window.
[Toolkit](../../java/awt/Toolkit.html "class in java.awt")
**[getToolkit](../../java/awt/Window.html#getToolkit%28%29)**()
Returns the toolkit of this frame.
[Window.Type](../../java/awt/Window.Type.html "enum in java.awt")
**[getType](../../java/awt/Window.html#getType%28%29)**()
Returns the type of the window.
[String](../../java/lang/String.html "class in java.lang")
**[getWarningString](../../java/awt/Window.html#getWarningString%28%29)**()
Gets the warning string that is displayed with this window.
[WindowFocusListener](../../java/awt/event/WindowFocusListener.html "interface in java.awt.event")[]
**[getWindowFocusListeners](../../java/awt/Window.html#getWindowFocusListeners%28%29)**()
Returns an array of all the window focus listeners registered on this window.
[WindowListener](../../java/awt/event/WindowListener.html "interface in java.awt.event")[]
**[getWindowListeners](../../java/awt/Window.html#getWindowListeners%28%29)**()
Returns an array of all the window listeners registered on this window.
static [Window](../../java/awt/Window.html "class in java.awt")[]
**[getWindows](../../java/awt/Window.html#getWindows%28%29)**()
Returns an array of all Window
s, both owned and ownerless, created by this application.
[WindowStateListener](../../java/awt/event/WindowStateListener.html "interface in java.awt.event")[]
**[getWindowStateListeners](../../java/awt/Window.html#getWindowStateListeners%28%29)**()
Returns an array of all the window state listeners registered on this window.
void
**[hide](../../java/awt/Window.html#hide%28%29)**()
boolean
**[isActive](../../java/awt/Window.html#isActive%28%29)**()
Returns whether this Window is active.
boolean
**[isAlwaysOnTop](../../java/awt/Window.html#isAlwaysOnTop%28%29)**()
Returns whether this window is an always-on-top window.
boolean
**[isAlwaysOnTopSupported](../../java/awt/Window.html#isAlwaysOnTopSupported%28%29)**()
Returns whether the always-on-top mode is supported for this window.
boolean
**[isAutoRequestFocus](../../java/awt/Window.html#isAutoRequestFocus%28%29)**()
Returns whether this window should receive focus on subsequently being shown (with a call to setVisible(true)), or being moved to the front (with a call to toFront()).
boolean
**[isFocusableWindow](../../java/awt/Window.html#isFocusableWindow%28%29)**()
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](../../java/awt/Window.html#isFocusCycleRoot%28%29)**()
Always returns true
because all Windows must be roots of a focus traversal cycle.
boolean
**[isFocused](../../java/awt/Window.html#isFocused%28%29)**()
Returns whether this Window is focused.
boolean
**[isLocationByPlatform](../../java/awt/Window.html#isLocationByPlatform%28%29)**()
Returns true
if this Window will appear at the default location for the native windowing system the next time this Window is made visible.
boolean
**[isOpaque](../../java/awt/Window.html#isOpaque%28%29)**()
Indicates if the window is currently opaque.
boolean
**[isShowing](../../java/awt/Window.html#isShowing%28%29)**()
Checks if this Window is showing on screen.
boolean
**[isValidateRoot](../../java/awt/Window.html#isValidateRoot%28%29)**()
Indicates if this container is a validate root.
void
**[pack](../../java/awt/Window.html#pack%28%29)**()
Causes this Window to be sized to fit the preferred size and layouts of its subcomponents.
void
**[paint](../../java/awt/Window.html#paint%28java.awt.Graphics%29)**([Graphics](../../java/awt/Graphics.html "class in java.awt") g)
Paints the container.
boolean
**[postEvent](../../java/awt/Window.html#postEvent%28java.awt.Event%29)**([Event](../../java/awt/Event.html "class in java.awt") e)
Deprecated.
As of JDK version 1.1 replaced by dispatchEvent(AWTEvent)
.
protected void
**[processEvent](../../java/awt/Window.html#processEvent%28java.awt.AWTEvent%29)**([AWTEvent](../../java/awt/AWTEvent.html "class in java.awt") e)
Processes events on this window.
protected void
**[processWindowEvent](../../java/awt/Window.html#processWindowEvent%28java.awt.event.WindowEvent%29)**([WindowEvent](../../java/awt/event/WindowEvent.html "class in java.awt.event") e)
Processes window events occurring on this window by dispatching them to any registered WindowListener objects.
protected void
**[processWindowFocusEvent](../../java/awt/Window.html#processWindowFocusEvent%28java.awt.event.WindowEvent%29)**([WindowEvent](../../java/awt/event/WindowEvent.html "class in java.awt.event") e)
Processes window focus event occuring on this window by dispatching them to any registered WindowFocusListener objects.
protected void
**[processWindowStateEvent](../../java/awt/Window.html#processWindowStateEvent%28java.awt.event.WindowEvent%29)**([WindowEvent](../../java/awt/event/WindowEvent.html "class in java.awt.event") e)
Processes window state event occuring on this window by dispatching them to any registered WindowStateListener
objects.
void
**[removeNotify](../../java/awt/Window.html#removeNotify%28%29)**()
Makes this Container undisplayable by removing its connection to its native screen resource.
void
**[removeWindowFocusListener](../../java/awt/Window.html#removeWindowFocusListener%28java.awt.event.WindowFocusListener%29)**([WindowFocusListener](../../java/awt/event/WindowFocusListener.html "interface in java.awt.event") l)
Removes the specified window focus listener so that it no longer receives window events from this window.
void
**[removeWindowListener](../../java/awt/Window.html#removeWindowListener%28java.awt.event.WindowListener%29)**([WindowListener](../../java/awt/event/WindowListener.html "interface in java.awt.event") l)
Removes the specified window listener so that it no longer receives window events from this window.
void
**[removeWindowStateListener](../../java/awt/Window.html#removeWindowStateListener%28java.awt.event.WindowStateListener%29)**([WindowStateListener](../../java/awt/event/WindowStateListener.html "interface in java.awt.event") l)
Removes the specified window state listener so that it no longer receives window events from this window.
void
**[reshape](../../java/awt/Window.html#reshape%28int,%20int,%20int,%20int%29)**(int x, int y, int width, int height)
Deprecated.
As of JDK version 1.1, replaced by setBounds(int, int, int, int)
.
void
**[setAlwaysOnTop](../../java/awt/Window.html#setAlwaysOnTop%28boolean%29)**(boolean alwaysOnTop)
Sets whether this window should always be above other windows.
void
**[setAutoRequestFocus](../../java/awt/Window.html#setAutoRequestFocus%28boolean%29)**(boolean autoRequestFocus)
Sets whether this window should receive focus on subsequently being shown (with a call to setVisible(true)), or being moved to the front (with a call to toFront()).
void
**[setBackground](../../java/awt/Window.html#setBackground%28java.awt.Color%29)**([Color](../../java/awt/Color.html "class in java.awt") bgColor)
Sets the background color of this window.
void
**[setBounds](../../java/awt/Window.html#setBounds%28int,%20int,%20int,%20int%29)**(int x, int y, int width, int height)
Moves and resizes this component.
void
**[setBounds](../../java/awt/Window.html#setBounds%28java.awt.Rectangle%29)**([Rectangle](../../java/awt/Rectangle.html "class in java.awt") r)
Moves and resizes this component to conform to the new bounding rectangle r
.
void
**[setCursor](../../java/awt/Window.html#setCursor%28java.awt.Cursor%29)**([Cursor](../../java/awt/Cursor.html "class in java.awt") cursor)
Set the cursor image to a specified cursor.
void
**[setFocusableWindowState](../../java/awt/Window.html#setFocusableWindowState%28boolean%29)**(boolean focusableWindowState)
Sets whether this Window can become the focused Window if it meets the other requirements outlined in isFocusableWindow
.
void
**[setFocusCycleRoot](../../java/awt/Window.html#setFocusCycleRoot%28boolean%29)**(boolean focusCycleRoot)
Does nothing because Windows must always be roots of a focus traversal cycle.
void
**[setIconImage](../../java/awt/Window.html#setIconImage%28java.awt.Image%29)**([Image](../../java/awt/Image.html "class in java.awt") image)
Sets the image to be displayed as the icon for this window.
void
**[setIconImages](../../java/awt/Window.html#setIconImages%28java.util.List%29)**([List](../../java/util/List.html "interface in java.util")<? extends [Image](../../java/awt/Image.html "class in java.awt")> icons)
Sets the sequence of images to be displayed as the icon for this window.
void
**[setLocation](../../java/awt/Window.html#setLocation%28int,%20int%29)**(int x, int y)
Moves this component to a new location.
void
**[setLocation](../../java/awt/Window.html#setLocation%28java.awt.Point%29)**([Point](../../java/awt/Point.html "class in java.awt") p)
Moves this component to a new location.
void
**[setLocationByPlatform](../../java/awt/Window.html#setLocationByPlatform%28boolean%29)**(boolean locationByPlatform)
Sets whether this Window should appear at the default location for the native windowing system or at the current location (returned bygetLocation
) the next time the Window is made visible.
void
**[setLocationRelativeTo](../../java/awt/Window.html#setLocationRelativeTo%28java.awt.Component%29)**([Component](../../java/awt/Component.html "class in java.awt") c)
Sets the location of the window relative to the specified component according to the following scenarios.
void
**[setMinimumSize](../../java/awt/Window.html#setMinimumSize%28java.awt.Dimension%29)**([Dimension](../../java/awt/Dimension.html "class in java.awt") minimumSize)
Sets the minimum size of this window to a constant value.
void
**[setModalExclusionType](../../java/awt/Window.html#setModalExclusionType%28java.awt.Dialog.ModalExclusionType%29)**([Dialog.ModalExclusionType](../../java/awt/Dialog.ModalExclusionType.html "enum in java.awt") exclusionType)
Specifies the modal exclusion type for this window.
void
**[setOpacity](../../java/awt/Window.html#setOpacity%28float%29)**(float opacity)
Sets the opacity of the window.
void
**[setShape](../../java/awt/Window.html#setShape%28java.awt.Shape%29)**([Shape](../../java/awt/Shape.html "interface in java.awt") shape)
Sets the shape of the window.
void
**[setSize](../../java/awt/Window.html#setSize%28java.awt.Dimension%29)**([Dimension](../../java/awt/Dimension.html "class in java.awt") d)
Resizes this component so that it has width d.width
and height d.height
.
void
**[setSize](../../java/awt/Window.html#setSize%28int,%20int%29)**(int width, int height)
Resizes this component so that it has width width
and height height
.
void
**[setType](../../java/awt/Window.html#setType%28java.awt.Window.Type%29)**([Window.Type](../../java/awt/Window.Type.html "enum in java.awt") type)
Sets the type of the window.
void
**[setVisible](../../java/awt/Window.html#setVisible%28boolean%29)**(boolean b)
Shows or hides this Window
depending on the value of parameterb
.
void
**[show](../../java/awt/Window.html#show%28%29)**()
void
**[toBack](../../java/awt/Window.html#toBack%28%29)**()
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](../../java/awt/Window.html#toFront%28%29)**()
If this Window is visible, brings this Window to the front and may make it the focused Window.