All Downloads are FREE. Search and download functionalities are using the official Maven repository.

java.awt.Window Maven / Gradle / Ivy

/*

NOTICE


(c) 2005-2007 Sun Microsystems, Inc. All Rights Reserved.

Neither this file nor any files generated from it describe a complete specification, and they may only be used as described below. For example, no permission is given for you to incorporate this file, in whole or in part, in an implementation of a Java specification.

Sun Microsystems Inc. owns the copyright in this file and it is provided to you for informative, as opposed to normative, use. The file and any files generated from it may be used to generate other informative documentation, such as a unified set of documents of API signatures for a platform that includes technologies expressed as Java APIs. The file may also be used to produce "compilation stubs," which allow applications to be compiled and validated for such platforms.

Any work generated from this file, such as unified javadocs or compiled stub files, must be accompanied by this notice in its entirety.

This work corresponds to the API signatures of JSR 217: Personal Basis Profile 1.1. In the event of a discrepency between this work and the JSR 217 specification, which is available at http://www.jcp.org/en/jsr/detail?id=217, the latter takes precedence. */ package java.awt; import java.awt.event.*; // import javax.accessibility.*; // import java.applet.Applet; // import java.awt.peer.WindowPeer; // import java.awt.image.BufferStrategy; import java.util.Vector; import java.util.Locale; import java.util.EventListener; import java.util.Set; import java.io.Serializable; import java.io.ObjectOutputStream; import java.io.ObjectInputStream; import java.io.IOException; import java.io.OptionalDataException; import java.awt.im.InputContext; import java.util.ResourceBundle; import java.lang.ref.WeakReference; import java.lang.reflect.InvocationTargetException; import java.security.AccessController; import java.security.PrivilegedAction; import java.beans.PropertyChangeListener; // import sun.awt.DebugHelper; // PBP/PP /** * A Window object is a top-level window with no borders and no * menubar. * The default layout for a window is BorderLayout. * * * * * Note: the location and size of top-level windows (including * Windows, Frames, and Dialogs) * are under the control of the window management system. * Calls to setLocation, setSize, and * setBounds are requests (not directives) which are * forwarded to the window management system. In some cases the window * management system may ignore such requests, or modify the requested * geometry in order to place and size the Window * appropriately. * * Due to the asynchronous nature of native event handling, the results * returned by getBounds, getLocation, * getLocationOnScreen, and getSize might not * reflect the actual geometry of the Window on screen until the last * request has been processed. During the processing of subsequent * requests these values might change accordingly while the window * management system fulfills the requests. * *

* * * An application may set the size and location of an * invisible Window arbitrarily, * but the window management system may subsequently change * its size and/or location if and when the Window is * made visible. One or more ComponentEvents will * be generated to indicate the new geometry. * * *

* Windows are capable of generating the following WindowEvents: * WindowOpened, WindowClosed, WindowGainedFocus, WindowLostFocus. * * @version 1.184, 01/28/03 * @author Sami Shaio * @author Arthur van Hoff * @see WindowEvent * @see #addWindowListener * @see java.awt.BorderLayout * @since JDK1.0 */ public class Window extends Container // public class Window extends Container implements Accessible { /** * 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. * * @serial * @see #getWarningString */ String warningString; // PBP/PP [6205182] // boolean syncLWRequests; /** * An Integer value representing the Window State. * * @serial * @since 1.2 * @see #show */ int state; // /** // * Unused. Maintained for serialization backward-compatibility. // * // * @serial // * @since 1.2 // */ // private FocusManager focusMgr; /** * Indicates whether this Window can become the focused Window. * * @serial * @see #getFocusableWindowState * @see #setFocusableWindowState * @since 1.4 */ private boolean focusableWindowState; /** * The window serialized data version. * * @serial */ private int windowSerializedDataVersion; /* * JDK 1.1 serialVersionUID */ private static final long serialVersionUID = 4497834738069338734L; // /** // * 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. // * // * @param owner the Frame to act as owner // * @exception IllegalArgumentException if the owner's // * GraphicsConfiguration is not from a screen device // * @exception java.lang.IllegalArgumentException if // * owner is null; this exception // * is always thrown when GraphicsEnvironment.isHeadless // * returns true // * @see java.awt.GraphicsEnvironment#isHeadless // * @see java.lang.SecurityManager#checkTopLevelWindow // * @see #isShowing // */ Window(Frame owner) { } // /** // * 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. // * // * @param owner the Window to act as owner // * @exception IllegalArgumentException if the owner's // * GraphicsConfiguration is not from a screen device // * @exception java.lang.IllegalArgumentException if owner // * is null. This exception is always thrown // * when GraphicsEnvironment.isHeadless() returns true. // * @see java.awt.GraphicsEnvironment#isHeadless // * @see java.lang.SecurityManager#checkTopLevelWindow // * @see #isShowing // * @since 1.2 // */ // public Window(Window owner) { } // /** // * 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. // * // * @param owner the window to act as owner // * @param gc the GraphicsConfiguration // * of the target screen device; if gc is // * null, the system default // * GraphicsConfiguration is assumed // * @throws IllegalArgumentException if // * owner is null // * @throws IllegalArgumentException if gc is not from // * a screen device; this exception is always thrown when // * GraphicsEnvironment.isHeadless returns // * true // * @see java.awt.GraphicsEnvironment#isHeadless // * @see java.lang.SecurityManager#checkTopLevelWindow // * @see GraphicsConfiguration#getBounds // * @see #isShowing // * @since 1.3 // */ // public Window(Window owner, GraphicsConfiguration gc) { } // /** // * Disposes of the input methods and context, and removes the WeakReference // * which formerly pointed to this Window from the parent's owned Window // * list. // */ // protected void finalize() throws Throwable { } // // /** // * 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. // * @see Component#isDisplayable // * @see Container#removeNotify // * @since JDK1.0 // */ // public void addNotify() { } /** * 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 Component#isDisplayable */ public void pack() { } /** * 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. * @see Component#isDisplayable * @see #toFront * @see Component#setVisible */ public void show() { } // /** // * 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. // *

// * @see #show // * @see #dispose // */ // public void hide() { } /** * 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 modifications between * those actions). *

* Note: When the last displayable window * within the Java virtual machine (VM) is disposed of, the VM may * terminate. See * AWT Threading Issues for more information. * @see Component#isDisplayable * @see #pack * @see #show */ public void dispose() { } // PBP/PP 6214654 /** * 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 if 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 it will also become activated. If this Window is * focused, but it is not a Frame then the first Frame that is an owner of this Window will be activated. * * @see #toBack */ public void toFront() { } /** * 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 #toFront */ public void toBack() { } /** * Returns the toolkit of this frame. * @return the toolkit of this window. * @see Toolkit * @see Toolkit#getDefaultToolkit * @see Component#getToolkit */ public Toolkit getToolkit() { return null; } /** * 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. * @return the warning string for this window. * @see java.lang.SecurityManager#checkTopLevelWindow(java.lang.Object) */ public final String getWarningString() { return null; } /** * 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. * @return the locale that is set for this window. * @see java.util.Locale * @since JDK1.1 */ public Locale getLocale() { return null; } /** * 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. * @see Component#getInputContext * @since 1.2 */ public InputContext getInputContext() { return null; } /** * Set the cursor image to a specified cursor. * @param cursor One of the constants defined * by the Cursor class. If this parameter is null * then the cursor for this window will be set to the type * Cursor.DEFAULT_CURSOR. * @see Component#getCursor * @see Cursor * @since JDK1.1 */ public void setCursor(Cursor cursor) { } // PBP/PP 5029995 -- It was agreed that this addition to PBP was not // necessary /** * Returns the owner of this window. * @since 1.2 */ // public Window getOwner() { return null; } // /** // * Return an array containing all the windows this // * window currently owns. // * @since 1.2 // */ // public Window[] getOwnedWindows() { } /** * 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. * * @param l the window listener * @see #removeWindowListener */ public synchronized void addWindowListener(WindowListener l) { } // /** // * 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. // * // * @param l the window state listener // * @see #removeWindowStateListener // * @see #getWindowStateListeners // * @since 1.4 // */ // public synchronized void addWindowStateListener(WindowStateListener l) { } /** * 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. * * @param l the window focus listener * @see #removeWindowFocusListener * @see #getWindowFocusListeners */ public synchronized void addWindowFocusListener(WindowFocusListener l) { } /** * 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. * * @param l the window listener * @see #addWindowListener */ public synchronized void removeWindowListener(WindowListener l) { } // /** // * 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. // * // * @param l the window state listener // * @see #addWindowStateListener // * @see #getWindowStateListeners // * @since 1.4 // */ // public synchronized void removeWindowStateListener(WindowStateListener l) // { } /** * 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. * * @param l the window focus listener * @see #addWindowFocusListener * @see #getWindowFocusListeners */ public synchronized void removeWindowFocusListener(WindowFocusListener l) { } /** * Returns an array of all the window listeners * registered on this window. * * @return all of this window's WindowListeners * or an empty array if no window * listeners are currently registered * * @see #addWindowListener * @see #removeWindowListener * @since 1.4 */ public synchronized WindowListener[] getWindowListeners() { return null; } /** * Returns an array of all the window focus listeners * registered on this window. * * @return all of this window's WindowFocusListeners * or an empty array if no window focus * listeners are currently registered * * @see #addWindowFocusListener * @see #removeWindowFocusListener * @since 1.4 */ public synchronized WindowFocusListener[] getWindowFocusListeners() {return null; } /** * Returns an array of all the window state listeners * registered on this window. * * @return all of this window's WindowStateListeners * or an empty array if no window state * listeners are currently registered * * @since 1.4 */ // public synchronized WindowStateListener[] getWindowStateListeners() { return null; } // /** // * 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. // * // * @param listenerType the type of listeners requested; this parameter // * should specify an interface that descends from // * java.util.EventListener // * @return an array of all objects registered as // * FooListeners on this window, // * or an empty array if no such // * listeners have been added // * @exception ClassCastException if listenerType // * doesn't specify a class or interface that implements // * java.util.EventListener // * // * @see #getWindowListeners // * @since 1.3 // */ // public EventListener[] getListeners(Class listenerType) { } /** * Processes events on this window. If the event is an * 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. * * @param e the event */ protected void processEvent(AWTEvent e) { } /** * Processes window events occurring on this window by * dispatching them to any registered WindowListener objects. * NOTE: This method will not be called unless window events * are enabled for this component; this happens when one of the * following occurs: *

    *
  • A WindowListener object is registered via * addWindowListener *
  • Window events are enabled via enableEvents *
*

Note that if the event parameter is null * the behavior is unspecified and may result in an * exception. * * @param e the window event * @see Component#enableEvents */ protected void processWindowEvent(WindowEvent e) { } /** * Processes window focus event occuring on this window by * dispatching them to any registered WindowFocusListener objects. * NOTE: this method will not be called unless window focus events * are enabled for this window. This happens when one of the * following occurs: *

    *
  • a WindowFocusListener is registered via * addWindowFocusListener *
  • Window focus events are enabled via enableEvents *
*

Note that if the event parameter is null * the behavior is unspecified and may result in an * exception. * * @param e the window focus event * @see Component#enableEvents */ protected void processWindowFocusEvent(WindowEvent e) { } // /** // * Processes window state event occuring on this window by // * dispatching them to any registered 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: // *

    // *
  • a WindowStateListener is registered via // * addWindowStateListener // *
  • window state events are enabled via enableEvents // *
// *

Note that if the event parameter is null // * the behavior is unspecified and may result in an // * exception. // * // * @param e the window state event // * @see java.awt.Component#enableEvents // * @since 1.4 // */ // protected void processWindowStateEvent(WindowEvent e) { } /** * Returns the child Component of this Window that has focus if this Window * is focused; returns null otherwise. * * @return the child Component with focus, or null if this Window is not * focused * @see #getMostRecentFocusOwner * @see #isFocused */ public Component getFocusOwner() { return null; } /** * Returns the child Component of this Window that will receive the focus * when this Window is focused. If this Window is currently focused, this * method returns the same Component as 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. * * @return the child Component that will receive focus when this Window is * focused * @see #getFocusOwner * @see #isFocused * @see #isFocusableWindow * @since 1.4 */ public Component getMostRecentFocusOwner() { return null; } // PBP/PP 6214654 /** * Returns whether this Window is active. Only a Frame may be * active. The native windowing system may denote the active Window or its * children with special decorations, such as a highlighted title bar. The * active Window is always either the focused Window, or the first Frame that is an owner of the focused Window. * * @return whether this is the active Window. * @see #isFocused * @since 1.4 */ public boolean isActive() { return false; } // PBP/PP 6214654 /** * Returns whether this Window is focused. If there exists a focus owner, * the focused Window is the Window that is, or contains, that focus owner. * If there is no focus owner, then no Window is focused. *

* If the focused Window is a Frame it is also the active * Window. Otherwise, the active Window is the first Frame that * is an owner of the focused Window. * * @return whether this is the focused Window. * @since 1.4 */ public boolean isFocused() { return false; } /** * Gets a focus traversal key for this Window. (See * 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. * * @param id one of KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS, * KeyboardFocusManager.BACKWARD_TRAVERSAL_KEYS, * KeyboardFocusManager.UP_CYCLE_TRAVERSAL_KEYS, or * KeyboardFocusManager.DOWN_CYCLE_TRAVERSAL_KEYS * @return the AWTKeyStroke for the specified key * @see Container#setFocusTraversalKeys * @see KeyboardFocusManager#FORWARD_TRAVERSAL_KEYS * @see KeyboardFocusManager#BACKWARD_TRAVERSAL_KEYS * @see KeyboardFocusManager#UP_CYCLE_TRAVERSAL_KEYS * @see KeyboardFocusManager#DOWN_CYCLE_TRAVERSAL_KEYS * @throws 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_KEYS * @since 1.4 */ public Set getFocusTraversalKeys(int id) { return null; } /** * Does nothing because Windows must always be roots of a focus traversal * cycle. The passed-in value is ignored. * * @param focusCycleRoot this value is ignored * @see #isFocusCycleRoot * @see Container#setFocusTraversalPolicy * @see Container#getFocusTraversalPolicy * @since 1.4 */ public final void setFocusCycleRoot(boolean focusCycleRoot) { } /** * Always returns true because all Windows must be roots of a * focus traversal cycle. * * @return true * @see #setFocusCycleRoot * @see Container#setFocusTraversalPolicy * @see Container#getFocusTraversalPolicy * @since 1.4 */ public final boolean isFocusCycleRoot() { return false; } /** * Always returns null because Windows have no ancestors; they * represent the top of the Component hierarchy. * * @return null * @see Container#isFocusCycleRoot() * @since 1.4 */ public final Container getFocusCycleRootAncestor() { return null; } // PBP/PP 6214654 /** * Returns whether this Window can become the focused Window, that is, * whether this Window or any of its subcomponents can become the focus * owner. For a Frame to be focusable, its focusable Window state * must be set to true. For a Window which is not a Frame to be focusable, its focusable Window state must be set to * true, its nearest owning Frame 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. * * @return true if this Window can be the focused Window; * false otherwise * @see #getFocusableWindowState * @see #setFocusableWindowState * @see #isShowing * @see Component#isFocusable * @since 1.4 */ public final boolean isFocusableWindow() { return false; } /** * Returns whether this Window can become the focused Window if it meets * the other requirements outlined in 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. * * @return whether this Window can be the focused Window * @see #isFocusableWindow * @see #setFocusableWindowState * @see #isShowing * @see Component#setFocusable * @since 1.4 */ public boolean getFocusableWindowState() { return false; } /** * Sets whether this Window can become the focused Window if it meets * the other requirements outlined in 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. * * @param focusableWindowState whether this Window can be the focused * Window * @see #isFocusableWindow * @see #getFocusableWindowState * @see #isShowing * @see Component#setFocusable * @since 1.4 */ public void setFocusableWindowState(boolean focusableWindowState) { } // /** // * Adds a PropertyChangeListener to the listener list. The listener is // * registered for all bound properties of this class, including the // * following: // *

    // *
  • this Window's font ("font")
  • // *
  • this Window's background color ("background")
  • // *
  • this Window's foreground color ("foreground")
  • // *
  • this Window's focusability ("focusable")
  • // *
  • this Window's focus traversal keys enabled state // * ("focusTraversalKeysEnabled")
  • // *
  • this Window's Set of FORWARD_TRAVERSAL_KEYS // * ("forwardFocusTraversalKeys")
  • // *
  • this Window's Set of BACKWARD_TRAVERSAL_KEYS // * ("backwardFocusTraversalKeys")
  • // *
  • this Window's Set of UP_CYCLE_TRAVERSAL_KEYS // * ("upCycleFocusTraversalKeys")
  • // *
  • this Window's Set of DOWN_CYCLE_TRAVERSAL_KEYS // * ("downCycleFocusTraversalKeys")
  • // *
  • this Window's focus traversal policy ("focusTraversalPolicy") // *
  • // *
  • this Window's focusable Window state ("focusableWindowState") // *
  • // *
// * Note that if this Window is inheriting a bound property, then no // * event will be fired in response to a change in the inherited property. // *

// * If listener is null, no exception is thrown and no action is performed. // * // * @param listener the PropertyChangeListener to be added // * // * @see Component#removePropertyChangeListener // * @see #addPropertyChangeListener(java.lang.String,java.beans.PropertyChangeListener) // */ // public void addPropertyChangeListener(PropertyChangeListener listener) { } // /** // * Adds a PropertyChangeListener to the listener list for a specific // * property. The specified property may be user-defined, or one of the // * following: // *

    // *
  • this Window's font ("font")
  • // *
  • this Window's background color ("background")
  • // *
  • this Window's foreground color ("foreground")
  • // *
  • this Window's focusability ("focusable")
  • // *
  • this Window's focus traversal keys enabled state // * ("focusTraversalKeysEnabled")
  • // *
  • this Window's Set of FORWARD_TRAVERSAL_KEYS // * ("forwardFocusTraversalKeys")
  • // *
  • this Window's Set of BACKWARD_TRAVERSAL_KEYS // * ("backwardFocusTraversalKeys")
  • // *
  • this Window's Set of UP_CYCLE_TRAVERSAL_KEYS // * ("upCycleFocusTraversalKeys")
  • // *
  • this Window's Set of DOWN_CYCLE_TRAVERSAL_KEYS // * ("downCycleFocusTraversalKeys")
  • // *
  • this Window's focus traversal policy ("focusTraversalPolicy") // *
  • // *
  • this Window's focusable Window state ("focusableWindowState") // *
  • // *
// * Note that if this Window is inheriting a bound property, then no // * event will be fired in response to a change in the inherited property. // *

// * If listener is null, no exception is thrown and no action is performed. // * // * @param propertyName one of the property names listed above // * @param listener the PropertyChangeListener to be added // * // * @see #addPropertyChangeListener(java.beans.PropertyChangeListener) // * @see Component#removePropertyChangeListener // */ // public void addPropertyChangeListener(String propertyName, // PropertyChangeListener listener) // { } // /** // * @deprecated As of JDK version 1.1 // * replaced by dispatchEvent(AWTEvent). // */ // public boolean postEvent(Event e) { return false; } /** * Checks if this Window is showing on screen. * @see Component#setVisible */ public boolean isShowing() { return false; } // /** // * Applies the ResourceBundle's ComponentOrientation // * to this Window and all components contained within it. // * // * @see ComponentOrientation // * @since 1.2 // * // * @deprecated As of J2SE 1.4, replaced by // * {@link Component#applyComponentOrientation Component.applyComponentOrientation}. // */ // public void applyResourceBundle(ResourceBundle rb) { } // /** // * Loads the ResourceBundle with the given name using the default locale // * and applies its ComponentOrientation // * to this Window and all components contained within it. // * // * @see ComponentOrientation // * @since 1.2 // * // * @deprecated As of J2SE 1.4, replaced by // * {@link Component#applyComponentOrientation Component.applyComponentOrientation}. // */ // public void applyResourceBundle(String rbName) { } // /** // * Gets the AccessibleContext associated with this Window. // * For windows, the AccessibleContext takes the form of an // * AccessibleAWTWindow. // * A new AccessibleAWTWindow instance is created if necessary. // * // * @return an AccessibleAWTWindow that serves as the // * AccessibleContext of this Window // */ // public AccessibleContext getAccessibleContext() { } /** * This method returns the GraphicsConfiguration used by this Window. */ public GraphicsConfiguration getGraphicsConfiguration() { return null; } // /** // * Sets the location of the window relative to the specified // * component. If the component is not currently showing, // * or c is null, the // * window is centered on the screen. If the bottom of the // * component is offscreen, the window is placed to the // * side of the Component that is closest // * to the center of the screen. So if the // * Component is on the right part of the // * screen, the Window is placed to its left, // * and visa versa. // * // * @param c the component in relation to which the window's location // * is determined // * @since 1.4 // */ // public void setLocationRelativeTo(Component c) { } // /** * Creates a new strategy for multi-buffering on this component. * Multi-buffering is useful for rendering performance. This method * attempts to create the best strategy available with the number of * buffers supplied. It will always create a 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. * @param numBuffers number of buffers to create * @exception IllegalArgumentException if numBuffers is less than 1. * @exception IllegalStateException if the component is not displayable * @see #isDisplayable * @see #getBufferStrategy * @since 1.4 */ // public void createBufferStrategy(int numBuffers) { } // /** // * Creates a new strategy for multi-buffering on this component with the // * required buffer capabilities. This is useful, for example, if only // * accelerated memory or page flipping is desired (as specified by the // * buffer capabilities). // *

// * Each time this method // * is called, the existing buffer strategy for this component is discarded. // * @param numBuffers number of buffers to create, including the front buffer // * @param caps the required capabilities for creating the buffer strategy; // * cannot be null // * @exception AWTException if the capabilities supplied could not be // * supported or met; this may happen, for example, if there is not enough // * accelerated memory currently available, or if page flipping is specified // * but not possible. // * @exception IllegalArgumentException if numBuffers is less than 1, or if // * caps is null // * @see #getBufferStrategy // * @since 1.4 // */ // public void createBufferStrategy(int numBuffers, BufferCapabilities caps) // throws AWTException // { } // /** // * @return the buffer strategy used by this component // * @see #createBufferStrategy // * @since 1.4 // */ // public BufferStrategy getBufferStrategy() { return null; } // /** * 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. * Unrecognized keys or values will be ignored. * * @param s the ObjectInputStream to read * @exception HeadlessException if * GraphicsEnvironment.isHeadless returns * true * @see java.awt.GraphicsEnvironment#isHeadless * @see #writeObject */ private void readObject(ObjectInputStream s) throws ClassNotFoundException, IOException, HeadlessException { } // /** * Writes default serializable fields to stream. Writes * a list of serializable WindowListeners and * WindowFocusListeners as optional data. * Writes a list of child windows as optional data. * * @param s the ObjectOutputStream to write * @serialData null terminated sequence of * 0 or more pairs; the pair consists of a String * and and Object; the String * indicates the type of object and is one of the following: * windowListenerK indicating a * WindowListener object; * windowFocusWindowK indicating a * WindowFocusListener object; * ownedWindowK indicating a child * Window object * * @see AWTEventMulticaster#save(java.io.ObjectOutputStream, java.lang.String, java.util.EventListener) * @see Component#windowListenerK * @see Component#windowFocusListenerK * @see Component#ownedWindowK * @see #readObject(ObjectInputStream) */ private void writeObject(ObjectOutputStream s) throws IOException { } // // /** // * This class implements accessibility support for the // * Window class. It provides an implementation of the // * Java Accessibility API appropriate to window user-interface elements. // */ // protected class AccessibleAWTWindow extends Container.AccessibleAWTContainer // { // // protected AccessibleAWTWindow() { } // // /** // * Get the role of this object. // * // * @return an instance of AccessibleRole describing the role of the // * object // * @see javax.accessibility.AccessibleRole // */ // public AccessibleRole getAccessibleRole() { } // // /** // * Get the state of this object. // * // * @return an instance of AccessibleStateSet containing the current // * state set of the object // * @see javax.accessibility.AccessibleState // */ // public AccessibleStateSet getAccessibleStateSet() { } // } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy