Enum Class LengthUnit

java.lang.Object
java.lang.Enum<LengthUnit>
eu.webtoolkit.jwt.LengthUnit
All Implemented Interfaces:
Serializable, Comparable<LengthUnit>, Constable

public enum LengthUnit extends Enum<LengthUnit>
CSS length unit type.
  • Enum Constant Details

    • FontEm

      public static final LengthUnit FontEm
      The relative font size (em)
    • FontEx

      public static final LengthUnit FontEx
      The height of an 'x' in the font (ex)
    • Pixel

      public static final LengthUnit Pixel
      Pixel, relative to canvas resolution (px)
    • Inch

      public static final LengthUnit Inch
      Inch (in)
    • Centimeter

      public static final LengthUnit Centimeter
      Centimeter (cm)
    • Millimeter

      public static final LengthUnit Millimeter
      Millimeter (mm)
    • Point

      public static final LengthUnit Point
      Point (1/72 Inch) (pt)
    • Pica

      public static final LengthUnit Pica
      Pica (12 Point) (pc)
    • Percentage

      public static final LengthUnit Percentage
      Percentage (meaning context-sensitive) (%)
    • ViewportWidth

      public static final LengthUnit ViewportWidth
      A percentage of the viewport's width (vw)

      Note: Internet Explorer only supports vw since version 9

    • ViewportHeight

      public static final LengthUnit ViewportHeight
      A percentage of the viewport's height (vh)

      Note: Internet Explorer only supports vh since version 9

    • ViewportMin

      public static final LengthUnit ViewportMin
      A percentage of the viewport's smaller dimension (vmin)

      Note: Internet Explorer only supports vmin since version 9

    • ViewportMax

      public static final LengthUnit ViewportMax
      A percentage of the viewport's larger dimension (vmax)

      Note: Not supported on Internet Explorer

  • Method Details

    • values

      public static LengthUnit[] 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 LengthUnit 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
    • getValue

      public int getValue()
      Returns the numerical representation of this enum.