1 /*
2 * Copyright (c) 1995, 2011, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
450 protected abstract FontPeer getFontPeer(String name, int style);
451
452 // The following method is called by the private method
453 // <code>updateSystemColors</code> in <code>SystemColor</code>.
454
455 /**
456 * Fills in the integer array that is supplied as an argument
457 * with the current system color values.
458 *
459 * @param systemColors an integer array.
460 * @exception HeadlessException if GraphicsEnvironment.isHeadless()
461 * returns true
462 * @see java.awt.GraphicsEnvironment#isHeadless
463 * @since JDK1.1
464 */
465 protected void loadSystemColors(int[] systemColors)
466 throws HeadlessException {
467 GraphicsEnvironment.checkHeadless();
468 }
469
470 /**
471 * Controls whether the layout of Containers is validated dynamically
472 * during resizing, or statically, after resizing is complete.
473 * Use {@code isDynamicLayoutActive()} to detect if this feature enabled
474 * in this program and is supported by this operating system
475 * and/or window manager.
476 * Note that this feature is supported not on all platforms, and
477 * conversely, that this feature cannot be turned off on some platforms.
478 * On these platforms where dynamic layout during resizing is not supported
479 * (or is always supported), setting this property has no effect.
480 * Note that this feature can be set or unset as a property of the
481 * operating system or window manager on some platforms. On such
482 * platforms, the dynamic resize property must be set at the operating
483 * system or window manager level before this method can take effect.
484 * This method does not change support or settings of the underlying
485 * operating system or
486 * window manager. The OS/WM support can be
487 * queried using getDesktopProperty("awt.dynamicLayoutSupported") method.
488 *
489 * @param dynamic If true, Containers should re-layout their
490 * components as the Container is being resized. If false,
491 * the layout will be validated after resizing is completed.
492 * @exception HeadlessException if GraphicsEnvironment.isHeadless()
493 * returns true
494 * @see #isDynamicLayoutSet()
495 * @see #isDynamicLayoutActive()
496 * @see #getDesktopProperty(String propertyName)
497 * @see java.awt.GraphicsEnvironment#isHeadless
498 * @since 1.4
499 */
500 public void setDynamicLayout(boolean dynamic)
501 throws HeadlessException {
502 GraphicsEnvironment.checkHeadless();
503 }
504
505 /**
506 * Returns whether the layout of Containers is validated dynamically
507 * during resizing, or statically, after resizing is complete.
508 * Note: this method returns the value that was set programmatically;
509 * it does not reflect support at the level of the operating system
510 * or window manager for dynamic layout on resizing, or the current
511 * operating system or window manager settings. The OS/WM support can
512 * be queried using getDesktopProperty("awt.dynamicLayoutSupported").
513 *
514 * @return true if validation of Containers is done dynamically,
515 * false if validation is done after resizing is finished.
516 * @exception HeadlessException if GraphicsEnvironment.isHeadless()
517 * returns true
518 * @see #setDynamicLayout(boolean dynamic)
519 * @see #isDynamicLayoutActive()
520 * @see #getDesktopProperty(String propertyName)
521 * @see java.awt.GraphicsEnvironment#isHeadless
522 * @since 1.4
|
1 /*
2 * Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
450 protected abstract FontPeer getFontPeer(String name, int style);
451
452 // The following method is called by the private method
453 // <code>updateSystemColors</code> in <code>SystemColor</code>.
454
455 /**
456 * Fills in the integer array that is supplied as an argument
457 * with the current system color values.
458 *
459 * @param systemColors an integer array.
460 * @exception HeadlessException if GraphicsEnvironment.isHeadless()
461 * returns true
462 * @see java.awt.GraphicsEnvironment#isHeadless
463 * @since JDK1.1
464 */
465 protected void loadSystemColors(int[] systemColors)
466 throws HeadlessException {
467 GraphicsEnvironment.checkHeadless();
468 }
469
470 /**
471 * Controls whether the layout of Containers is validated dynamically
472 * during resizing, or statically, after resizing is complete.
473 * Use {@code isDynamicLayoutActive()} to detect if this feature enabled
474 * in this program and is supported by this operating system
475 * and/or window manager.
476 * Note that this feature is supported not on all platforms, and
477 * conversely, that this feature cannot be turned off on some platforms.
478 * On these platforms where dynamic layout during resizing is not supported
479 * (or is always supported), setting this property has no effect.
480 * Note that this feature can be set or unset as a property of the
481 * operating system or window manager on some platforms. On such
482 * platforms, the dynamic resize property must be set at the operating
483 * system or window manager level before this method can take effect.
484 * This method does not change support or settings of the underlying
485 * operating system or
486 * window manager. The OS/WM support can be
487 * queried using getDesktopProperty("awt.dynamicLayoutSupported") method.
488 *
489 * @param dynamic If true, Containers should re-layout their
490 * components as the Container is being resized. If false,
491 * the layout will be validated after resizing is completed.
492 * @exception HeadlessException if GraphicsEnvironment.isHeadless()
493 * returns true
494 * @see #isDynamicLayoutSet()
495 * @see #isDynamicLayoutActive()
496 * @see #getDesktopProperty(String propertyName)
497 * @see java.awt.GraphicsEnvironment#isHeadless
498 * @since 1.4
499 */
500 public void setDynamicLayout(final boolean dynamic)
501 throws HeadlessException {
502 GraphicsEnvironment.checkHeadless();
503 if (this != getDefaultToolkit()) {
504 getDefaultToolkit().setDynamicLayout(dynamic);
505 }
506 }
507
508 /**
509 * Returns whether the layout of Containers is validated dynamically
510 * during resizing, or statically, after resizing is complete.
511 * Note: this method returns the value that was set programmatically;
512 * it does not reflect support at the level of the operating system
513 * or window manager for dynamic layout on resizing, or the current
514 * operating system or window manager settings. The OS/WM support can
515 * be queried using getDesktopProperty("awt.dynamicLayoutSupported").
516 *
517 * @return true if validation of Containers is done dynamically,
518 * false if validation is done after resizing is finished.
519 * @exception HeadlessException if GraphicsEnvironment.isHeadless()
520 * returns true
521 * @see #setDynamicLayout(boolean dynamic)
522 * @see #isDynamicLayoutActive()
523 * @see #getDesktopProperty(String propertyName)
524 * @see java.awt.GraphicsEnvironment#isHeadless
525 * @since 1.4
|