Spec-Zone.ru › OpenJavaFX 8
javafx.print

Enum Printer.MarginType

java.lang.Object
  • java.lang.Enum<Printer.MarginType>
    • javafx.print.Printer.MarginType

All Implemented Interfaces:

Serializable, Comparable<Printer.MarginType>

Enclosing class:

Printer



public static enum Printer.MarginType
extends Enum<Printer.MarginType>
The MarginType is used to determine the printable area of a PageLayout.

Since:

JavaFX 8.0

  • Enum Constant Summary

    Enum Constants
    Enum Constant and Description
    DEFAULT
    This requests a default 0.75 inch margin on all sides.
    EQUAL
    Choose the largest of the four hardware margins, and use that for all for margins, so that the margins are equal on all sides.
    EQUAL_OPPOSITES
    Similar to EQUAL, but it chooses the larger of the left/right hardware margins and top/bottom hardware margins separately, so that the top and bottom margins are equal, and the left and right margins are equal.
    HARDWARE_MINIMUM
    Request margins are set to be the smallest on each side that the hardware allows.
  • Method Summary

    All MethodsStatic MethodsConcrete Methods
    Modifier and Type Method and Description
    static Printer.MarginType valueOf(String name)
    Returns the enum constant of this type with the specified name.
    static Printer.MarginType[] values()
    Returns an array containing the constants of this enum type, in the order they are declared.
    • Methods inherited from class java.lang.Enum

      clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
    • Methods inherited from class java.lang.Object

      getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Detail

    • DEFAULT

      public static final Printer.MarginType DEFAULT
      This requests a default 0.75 inch margin on all sides. This is considered to be a common default and is supported by all known printers. However this may be adjusted if the paper is too small, to ensure that the margins are not more than 50% of the smaller dimension. Applications that do expect to deal with such small media should likely be specifying the required margins explicitly. In the unlikely event the hardware margin is larger than 0.75" it will be adjusted to that same hardware minimum on all sides.
    • HARDWARE_MINIMUM

      public static final Printer.MarginType HARDWARE_MINIMUM
      Request margins are set to be the smallest on each side that the hardware allows. This creates the greatest printable area but the margins may not be aesthetic if they are too small, or there is significant variation on the different sides of the paper.

      This is is also useful for an application that wants to know this so it can construct a new PageLayout that fits within these margins.

    • EQUAL

      public static final Printer.MarginType EQUAL
      Choose the largest of the four hardware margins, and use that for all for margins, so that the margins are equal on all sides.
    • EQUAL_OPPOSITES

      public static final Printer.MarginType EQUAL_OPPOSITES
      Similar to EQUAL, but it chooses the larger of the left/right hardware margins and top/bottom hardware margins separately, so that the top and bottom margins are equal, and the left and right margins are equal.
  • Method Detail

    • values

      public static Printer.MarginType[] values()
      Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
      for (Printer.MarginType c : Printer.MarginType.values())
          System.out.println(c);

      Returns:

      an array containing the constants of this enum type, in the order they are declared

    • valueOf

      public static Printer.MarginType valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

      Parameters:

      name - the name of the enum constant to be returned.

      Returns:

      the enum constant with the specified name

      Throws:

      IllegalArgumentException - if this enum type has no constant with the specified name

© 2008, 2025, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from JavaFX API Documentation.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Java, JavaFX and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API