Enum Class MarginUnit

java.lang.Object
java.lang.Enum<MarginUnit>
com.deltawalker.script.MarginUnit
All Implemented Interfaces:
Serializable, Comparable<MarginUnit>, Constable

public enum MarginUnit extends Enum<MarginUnit>
Defines the units of measurement for the margins of printed pages.
Since:
2.0
  • Enum Constant Details

    • CENTIMETER

      public static final MarginUnit CENTIMETER
      Centimeters.
    • INCH

      public static final MarginUnit INCH
      Inches (2.54 centimeters).
  • Method Details

    • values

      public static MarginUnit[] 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 MarginUnit 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
    • fromString

      public static MarginUnit fromString(String text)
      Returns the unit whose toString() is the specified text: CENTIMETER for "cm", otherwise INCH.
      Parameters:
      text - "cm" or "inch"
      Returns:
      the matching unit
    • toString

      public String toString()
      Returns the short name of this unit: "cm" or "inch".
      Overrides:
      toString in class Enum<MarginUnit>
      Returns:
      the short name of this unit