Lines Matching defs:Window

65  * A <code>Window</code> object is a top-level window with no borders and no
72 * In a multi-screen environment, you can create a <code>Window</code>
73 * on a different screen device by constructing the <code>Window</code>
74 * with {@link #Window(Window, GraphicsConfiguration)}. The
92 * calling <code>getLocationOnScreen</code> on a <code>Window</code> returns
97 * The following code sets the location of a <code>Window</code>
101 * into account, the <code>Window</code> location would be set
107 * Window w = new Window(Window owner, GraphicsConfiguration gc);
114 * <code>Window</code>s, <code>Frame</code>s, and <code>Dialog</code>s)
121 * geometry in order to place and size the <code>Window</code> in a way
127 * reflect the actual geometry of the Window on screen until the last
133 * {@code Window} arbitrarily, but the window management system may
135 * {@code Window} is made visible. One or more {@code ComponentEvent}s
148 public class Window extends Container implements Accessible {
169 * This is the default type for objects of the {@code Window} class or
211 * {@code Window} can't display icon but it's
234 * An Integer value representing the Window State.
243 * A boolean value representing Window always-on-top state
254 * of all Window instances can be obtained from AppContext object.
258 private static final IdentityArrayList<Window> allWindows = new IdentityArrayList<Window>();
266 transient Vector<WeakReference<Window>> ownedWindowList =
267 new Vector<WeakReference<Window>>();
274 private transient WeakReference<Window> weakThis;
313 * Indicates whether this Window can become the focused Window.
372 private static final PlatformLogger log = PlatformLogger.getLogger("java.awt.Window");
406 new GetPropertyAction("java.awt.Window.locationByPlatform"));
437 Window(GraphicsConfiguration gc) {
443 final WeakReference<Window> owner;
446 WindowDisposerRecord(AppContext context, Window victim) {
447 owner = new WeakReference<Window>(victim.getOwner());
452 Window parent = owner.get();
458 Window.removeFromWindowList(ac, weakThis);
480 weakThis = new WeakReference<Window>(this);
534 Window() throws HeadlessException {
561 public Window(Frame owner) {
569 * <code>Window</code> as its owner. This window will not be focusable
579 * @param owner the <code>Window</code> to act as owner or
593 public Window(Window owner) {
601 * <code>Window</code> and a <code>GraphicsConfiguration</code>
602 * of a screen device. The Window will not be focusable unless
629 public Window(Window owner, GraphicsConfiguration gc) {
634 private void ownedInit(Window owner) {
650 synchronized (Window.class) {
750 * Makes this Window displayable by creating the connection to its
787 * Causes this Window to be sized to fit the preferred size
795 * the preferred size. The Window is validated after its
877 * the requested data, so that the {@code Window} object is placed and sized
899 * the requested data, so that the {@code Window} object is placed and sized
916 * the requested data, so that the {@code Window} object is placed and sized
929 * the requested data, so that the {@code Window} object is placed and sized
978 * Shows or hides this {@code Window} depending on the value of parameter
984 * <li> The {@code Window} meets the requirements outlined in the
986 * <li> The {@code Window}'s {@code autoRequestFocus} property is of the {@code true} value.
987 * <li> Native windowing system allows the {@code Window} to get focused.
995 * @param b if {@code true}, makes the {@code Window} visible,
996 * otherwise hides the {@code Window}.
997 * If the {@code Window} and/or its owner
999 * {@code Window} will be validated prior to being made visible.
1000 * If the {@code Window} is already visible, this will bring the
1001 * {@code Window} to the front.<p>
1002 * If {@code false}, hides this {@code Window}, its subcomponents, and all
1004 * The {@code Window} and its subcomponents can be made visible again
1008 * @see java.awt.Window#toFront
1009 * @see java.awt.Window#dispose
1010 * @see java.awt.Window#setAutoRequestFocus
1011 * @see java.awt.Window#isFocusableWindow
1018 * Makes the Window visible. If the Window and/or its owner
1020 * Window will be validated prior to being made visible.
1021 * If the Window is already visible, this will bring the Window
1045 Window child = ownedWindowList.elementAt(i).get();
1071 static void updateChildFocusableWindowState(Window w) {
1076 Window child = w.ownedWindowList.elementAt(i).get();
1093 * Hide this Window, its subcomponents, and all of its owned children.
1094 * The Window and its subcomponents can be made visible again
1106 Window child = ownedWindowList.elementAt(i).get();
1125 * <code>Window</code>, its subcomponents, and all of its owned
1130 * The <code>Window</code> and its subcomponents can be made displayable
1133 * <code>Window</code> and its subcomponents will be identical to the
1134 * states of these objects at the point where the <code>Window</code>
1172 if (gd.getFullScreenWindow() == Window.this) {
1182 Window child = (Window) (((WeakReference)
1228 * It's overridden here because parent == owner in Window,
1241 * If this Window is visible, brings this Window to the front and may make
1242 * it the focused Window.
1244 * Places this Window at the top of the stacking order and shows it in
1246 * Window is not visible. Some platforms do not allow Windows which own
1250 * whether a Window in this VM is already focused. Every attempt will be
1251 * made to move this Window as high as possible in the stacking order;
1253 * Window above all other windows in every situation.
1255 * Developers must never assume that this Window is the focused or active
1256 * Window until this Window receives a WINDOW_GAINED_FOCUS or WINDOW_ACTIVATED
1258 * method will <b>probably</b> focus this Window (if it is not already focused)
1271 * If this method causes this Window to be focused, and this Window is a
1272 * Frame or a Dialog, it will also become activated. If this Window is
1274 * Dialog that is an owner of this Window will be activated.
1302 * If this Window is visible, sends this Window to the back and may cause
1303 * it to lose focus or activation if it is the focused or active Window.
1305 * Places this Window at the bottom of the stacking order and shows it
1307 * Window is not visible. Some platforms do not allow Windows which are
1309 * be made to move this Window as low as possible in the stacking order;
1311 * Window below all other windows in every situation.
1315 * never assume that this Window is no longer the focused or active Window
1316 * until this Window receives a WINDOW_LOST_FOCUS or WINDOW_DEACTIVATED
1318 * this method will <b>probably</b> cause this Window to lose focus. In
1319 * that case, the next highest, focusable Window in this VM will receive
1389 "Java Applet Window"));
1450 public Window getOwner() {
1453 final Window getOwner_NoClientCode() {
1454 return (Window)parent;
1462 public Window[] getOwnedWindows() {
1465 final Window[] getOwnedWindows_NoClientCode() {
1466 Window realCopy[];
1476 Window fullCopy[] = new Window[fullSize];
1521 static IdentityArrayList<Window> getAllWindows() {
1523 IdentityArrayList<Window> v = new IdentityArrayList<Window>();
1529 static IdentityArrayList<Window> getAllUnblockedWindows() {
1531 IdentityArrayList<Window> unblocked = new IdentityArrayList<Window>();
1533 Window w = allWindows.get(i);
1542 private static Window[] getWindows(AppContext appContext) {
1543 synchronized (Window.class) {
1544 Window realCopy[];
1545 Vector<WeakReference<Window>> windowList =
1546 (Vector<WeakReference<Window>>)appContext.get(Window.class);
1550 Window fullCopy[] = new Window[fullSize];
1552 Window w = windowList.get(i).get();
1563 realCopy = new Window[0];
1570 * Returns an array of all {@code Window}s, both owned and ownerless,
1572 * If called from an applet, the array includes only the {@code Window}s
1582 * @see Window#getOwnerlessWindows
1586 public static Window[] getWindows() {
1591 * Returns an array of all {@code Window}s created by this application
1593 * {@code Dialog}s and {@code Window}s.
1594 * If called from an applet, the array includes only the {@code Window}s
1604 * @see Window#getWindows()
1608 public static Window[] getOwnerlessWindows() {
1609 Window[] allWindows = Window.getWindows();
1612 for (Window w : allWindows) {
1618 Window[] ownerless = new Window[ownerlessCount];
1620 for (Window w : allWindows) {
1629 Window getDocumentRoot() {
1631 Window w = this;
1657 * @see java.awt.Window#getModalExclusionType
1698 * @see java.awt.Window#setModalExclusionType
1712 Window owner = getOwner_NoClientCode();
1717 Vector<Window> childHierarchy = new Vector<Window>();
1718 Window[] ownedWindows = getOwnedWindows();
1724 Window w = childHierarchy.get(k);
1731 Window[] wOwned = w.getOwnedWindows();
1908 * upon this <code>Window</code>.
1918 * <code>Window</code> <code>w</code>
2034 * <li>Window events are enabled via <code>enableEvents</code>
2083 * <li>Window focus events are enabled via <code>enableEvents</code>
2198 * {@link Window#isAlwaysOnTopSupported()}. If always-on-top mode
2276 * Returns the child Component of this Window that has focus if this Window
2279 * @return the child Component with focus, or null if this Window is not
2292 * Returns the child Component of this Window that will receive the focus
2293 * when this Window is focused. If this Window is currently focused, this
2295 * this Window is not focused, then the child Component that most recently
2297 * requested focus, and this is a focusable Window, then this Window's
2299 * requested focus, and this is a non-focusable Window, null is returned.
2301 * @return the child Component that will receive focus when this Window is
2325 * Returns whether this Window is active. Only a Frame or a Dialog may be
2326 * active. The native windowing system may denote the active Window or its
2328 * active Window is always either the focused Window, or the first Frame or
2329 * Dialog that is an owner of the focused Window.
2331 * @return whether this is the active Window.
2341 * Returns whether this Window is focused. If there exists a focus owner,
2342 * the focused Window is the Window that is, or contains, that focus owner.
2343 * If there is no focus owner, then no Window is focused.
2345 * If the focused Window is a Frame or a Dialog it is also the active
2346 * Window. Otherwise, the active Window is the first Frame or Dialog that
2347 * is an owner of the focused Window.
2349 * @return whether this is the focused Window.
2359 * Gets a focus traversal key for this Window. (See <code>
2362 * If the traversal key has not been explicitly set for this Window,
2363 * then this Window's parent's traversal key is returned. If the
2364 * traversal key has not been explicitly set for any of this Window's
2443 * Returns whether this Window can become the focused Window, that is,
2444 * whether this Window or any of its subcomponents can become the focus
2445 * owner. For a Frame or Dialog to be focusable, its focusable Window state
2446 * must be set to <code>true</code>. For a Window which is not a Frame or
2447 * Dialog to be focusable, its focusable Window state must be set to
2451 * neither this Window nor any of its subcomponents can become the focus
2454 * @return <code>true</code> if this Window can be the focused Window;
2463 // If a Window/Frame/Dialog was made non-focusable, then it is always
2474 // A Window must have at least one Component in its root focus
2480 // A Window's nearest owning Frame or Dialog must be showing on the
2482 for (Window owner = getOwner(); owner != null;
2494 * Returns whether this Window can become the focused Window if it meets
2501 * met in order for a Window to be focusable.
2503 * By default, all Windows have a focusable Window state of
2506 * @return whether this Window can be the focused Window
2518 * Sets whether this Window can become the focused Window if it meets
2520 * this Window's focusable Window state is set to <code>false</code>, then
2522 * Window's focusable Window state is set to <code>true</code>, then
2525 * met in order for a Window to be focusable.
2527 * Setting a Window's focusability state to <code>false</code> is the
2528 * standard mechanism for an application to identify to the AWT a Window
2530 * a non-focusable Window.
2532 * Setting the focusability state on a visible <code>Window</code>
2534 * change may happen only when the <code>Window</code> becomes
2536 * across platforms, set the <code>Window</code>'s focusable state
2537 * when the <code>Window</code> is invisible and then show it.
2539 * @param focusableWindowState whether this Window can be the focused
2540 * Window
2560 for (Window owner = getOwner();
2620 * <li>this Window's font ("font")</li>
2621 * <li>this Window's background color ("background")</li>
2622 * <li>this Window's foreground color ("foreground")</li>
2623 * <li>this Window's focusability ("focusable")</li>
2624 * <li>this Window's focus traversal keys enabled state
2626 * <li>this Window's Set of FORWARD_TRAVERSAL_KEYS
2628 * <li>this Window's Set of BACKWARD_TRAVERSAL_KEYS
2630 * <li>this Window's Set of UP_CYCLE_TRAVERSAL_KEYS
2632 * <li>this Window's Set of DOWN_CYCLE_TRAVERSAL_KEYS
2634 * <li>this Window's focus traversal policy ("focusTraversalPolicy")
2636 * <li>this Window's focusable Window state ("focusableWindowState")
2638 * <li>this Window's always-on-top state("alwaysOnTop")</li>
2640 * Note that if this Window is inheriting a bound property, then no
2659 * <li>this Window's font ("font")</li>
2660 * <li>this Window's background color ("background")</li>
2661 * <li>this Window's foreground color ("foreground")</li>
2662 * <li>this Window's focusability ("focusable")</li>
2663 * <li>this Window's focus traversal keys enabled state
2665 * <li>this Window's Set of FORWARD_TRAVERSAL_KEYS
2667 * <li>this Window's Set of BACKWARD_TRAVERSAL_KEYS
2669 * <li>this Window's Set of UP_CYCLE_TRAVERSAL_KEYS
2671 * <li>this Window's Set of DOWN_CYCLE_TRAVERSAL_KEYS
2673 * <li>this Window's focus traversal policy ("focusTraversalPolicy")
2675 * <li>this Window's focusable Window state ("focusableWindowState")
2677 * <li>this Window's always-on-top state("alwaysOnTop")</li>
2679 * Note that if this Window is inheriting a bound property, then no
2698 * {@code Window} objects are the validate roots, and, therefore, they
2736 * Checks if this Window is showing on screen.
2788 void connectOwnedWindow(Window child) {
2794 synchronized (Window.class) {
2795 Vector<WeakReference<Window>> windowList = (Vector<WeakReference<Window>>)appContext.get(Window.class);
2797 windowList = new Vector<WeakReference<Window>>();
2798 appContext.put(Window.class, windowList);
2805 synchronized (Window.class) {
2806 Vector<WeakReference<Window>> windowList = (Vector<WeakReference<Window>>)context.get(Window.class);
2818 * Window type.
2887 * <code>Window</code> object
2917 Window child = ownedWindowList.elementAt(i).get();
2963 // later releases, we'll rely on the Window's initial focusable
2999 connectOwnedWindow((Window) s.readObject());
3078 * Gets the AccessibleContext associated with this Window.
3084 * AccessibleContext of this Window
3096 * <code>Window</code> class. It provides an implementation of the
3146 log.finer("+ Window.setGraphicsConfiguration(): new GC is \n+ " + getGraphicsConfiguration_NoClientCode() + "\n+ this is " + this);
3199 * the requested data, so that the {@code Window} object is placed and sized
3217 Window componentWindow = SunToolkit.getContainingWindow(c);
3370 * Sets whether this Window should appear at the default location for the
3372 * <code>getLocation</code>) the next time the Window is made visible.
3379 * "java.awt.Window.locationByPlatform" to "true", though calls to this method
3384 * this property of the Window.
3405 * @param locationByPlatform <code>true</code> if this Window should appear
3426 * Returns <code>true</code> if this Window will appear at the default location
3427 * for the native windowing system the next time this Window is made visible.
3428 * This method always returns <code>false</code> if the Window is showing on the
3431 * @return whether this Window will appear at the default location
3452 * the requested data, so that the {@code Window} object is placed and sized
3486 * the requested data, so that the {@code Window} object is placed and sized
3522 * @see Window#setOpacity(float)
3548 * GraphicsDevice#setFullScreenWindow(Window)})
3556 * alpha component of their color (see {@link Window#setBackground(Color)}) and the
3572 * @see Window#getOpacity
3573 * @see Window#setBackground(Color)
3574 * @see Window#setShape(Shape)
3620 * @see Window#setShape(Shape)
3647 * GraphicsDevice#setFullScreenWindow(Window)})
3656 * alpha component of their color (see {@link Window#setBackground(Color)}) and the
3670 * @see Window#getShape()
3671 * @see Window#setBackground(Color)
3672 * @see Window#setOpacity(float)
3712 * @see Window#setBackground(Color)
3713 * @see Window#isOpaque
3741 * GraphicsDevice#setFullScreenWindow(Window)})
3786 * @see Window#getBackground
3787 * @see Window#isOpaque
3788 * @see Window#setOpacity(float)
3789 * @see Window#setShape(Shape)
3839 * @see Window#getBackground
3840 * @see Window#setBackground(Color)
3976 wx = Window.limit(wx,
3979 wy = Window.limit(wy,
3990 wx = Window.limit(wx,
3994 wy = Window.limit(wy,
4004 public float getOpacity(Window window) {
4007 public void setOpacity(Window window, float opacity) {
4010 public Shape getShape(Window window) {
4013 public void setShape(Window window, Shape shape) {
4016 public void setOpaque(Window window, boolean opaque) {
4024 public void updateWindow(Window window) {
4028 public Dimension getSecurityWarningSize(Window window) {
4033 public void setSecurityWarningSize(Window window, int width, int height)
4039 public void setSecurityWarningPosition(Window window,
4055 public Point2D calculateSecurityWarningPosition(Window window,
4061 public void setLWRequestStatus(Window changed, boolean status) {
4065 public boolean isAutoRequestFocus(Window w) {
4069 public boolean isTrayIconWindow(Window w) {
4073 public void setTrayIconWindow(Window w, boolean isTrayIconWindow) {
4083 } // class Window