Module javafx.graphics
Package javafx.print

# Enum Class Printer.MarginType

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

All Implemented Interfaces:
  `Serializable`, `Comparable<Printer.MarginType>`, `Constable`

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

- ## Nested Class Summary

  ## Nested classes/interfaces declared in class java.lang.Enum

  `Enum.EnumDesc<E extends Enum<E>>`

- ## Enum Constant Summary

  Enum Constants
  Enum Constant
  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

  Modifier and Type
  Method
  Description
  `static Printer.MarginType`
  `valueOf(String name)`
  Returns the enum constant of this class with the specified name.
  `static Printer.MarginType[]`
  `values()`
  Returns an array containing the constants of this enum class, in the order they are declared.

  ### Methods declared in class java.lang.Enum

  `clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

  ### Methods declared in class java.lang.Object

  `getClass, notify, notifyAll, wait, wait, wait`

- ## Enum Constant Details

  - ### 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 Details

  - ### values

    public static Printer.MarginType[] values()
    Returns an array containing the constants of this enum class, in the order they are declared.
    Returns:
      an array containing the constants of this enum class, in the order they are declared

  - ### valueOf

    public static Printer.MarginType valueOf(String name)
    Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified name
      `NullPointerException` - if the argument is null