Enum ECssUnit

java.lang.Object
java.lang.Enum<ECssUnit>
de.xima.fc.css.builder.ECssUnit
All Implemented Interfaces:
Serializable, Comparable<ECssUnit>

public enum ECssUnit extends Enum<ECssUnit>
Enumeration of CSS units.
Author:
XIMA MEDIA GmbH
  • Enum Constant Details

    • CAPITAL_HEIGHT

      public static final ECssUnit CAPITAL_HEIGHT
      CSS unit for the cap-height in the element's font, approximately equal to the height of a capital Latin letter.
    • CAP

      public static final ECssUnit CAP
      Shortcut for CAPITAL_HEIGHT.
    • CENTIMETERS

      public static final ECssUnit CENTIMETERS
      CSS unit centimeters. 1cm = 96px/2.54
    • CM

      public static final ECssUnit CM
      Shortcut for CENTIMETERS.
    • CHARACTER_UNIT

      public static final ECssUnit CHARACTER_UNIT
      CSS unit for the advance measure (advance width or height, whichever is in the inline axis of the element) of the glyph "0" of the element's font.
    • CH

      public static final ECssUnit CH
      Shortcut for CHARACTER_UNIT.
    • DEGREES

      public static final ECssUnit DEGREES
      CSS unit degree.
    • DEG

      public static final ECssUnit DEG
      Shortcut for DEGREES.
    • DOTS_PER_CENTIMETER

      public static final ECssUnit DOTS_PER_CENTIMETER
      CSS unit dots per centimeter.
    • DPCM

      public static final ECssUnit DPCM
      Shortcut for DOTS_PER_CENTIMETER.
    • DOTS_PER_INCH

      public static final ECssUnit DOTS_PER_INCH
      CSS unit dots per inch.
    • DPI

      public static final ECssUnit DPI
      Shortcut for DOTS_PER_INCH.
    • DOTS_PER_PIXEL

      public static final ECssUnit DOTS_PER_PIXEL
      CSS unit dots per pixel.
    • DPPX

      public static final ECssUnit DPPX
      Shortcut for DOTS_PER_PIXEL.
    • DYNAMIC_VIEWPORT_HEIGHT

      public static final ECssUnit DYNAMIC_VIEWPORT_HEIGHT
      CSS unit for 1% of the dynamic viewport's height.
    • DVH

      public static final ECssUnit DVH
    • DYNAMIC_VIEWPORT_WIDTH

      public static final ECssUnit DYNAMIC_VIEWPORT_WIDTH
      CSS unit for 1% of the dynamic viewport's width.
    • DVW

      public static final ECssUnit DVW
    • FONT_SIZE

      public static final ECssUnit FONT_SIZE
      CSS unit for the font size of the parent.
    • EM

      public static final ECssUnit EM
      Shortcut for FONT_SIZE.
    • GRADIANS

      public static final ECssUnit GRADIANS
      CSS unit gradians.
    • GRAD

      public static final ECssUnit GRAD
      Shortcut for GRADIANS.
    • HERTZ

      public static final ECssUnit HERTZ
      CSS unit for Hertz (1/second).
    • HZ

      public static final ECssUnit HZ
      Shortcut for HERTZ.
    • INCHES

      public static final ECssUnit INCHES
      CSS unit inches. 1in = 2.54cm = 96px
    • IN

      public static final ECssUnit IN
      Shortcut for INCHES.
    • INTERNATIONAL_CHARACTER_UNIT

      public static final ECssUnit INTERNATIONAL_CHARACTER_UNIT
      CSS unit for the advance measure (advance width or height, whichever is in the inline axis of the element) of the glyph "水" of the element's font.
    • IC

      public static final ECssUnit IC
    • KILOHERTZ

      public static final ECssUnit KILOHERTZ
      CSS unit for Kilohertz (1000/second).
    • KHZ

      public static final ECssUnit KHZ
      Shortcut for KILOHERTZ.
    • LARGE_VIEWPORT_HEIGHT

      public static final ECssUnit LARGE_VIEWPORT_HEIGHT
      CSS unit for 1% of the large viewport's height.
    • LVH

      public static final ECssUnit LVH
      Shortcut for LARGE_VIEWPORT_HEIGHT.
    • LARGE_VIEWPORT_WIDTH

      public static final ECssUnit LARGE_VIEWPORT_WIDTH
      CSS unit for 1% of the large viewport's width.
    • LVW

      public static final ECssUnit LVW
      Shortcut for LARGE_VIEWPORT_WIDTH.
    • LINE_HEIGHT

      public static final ECssUnit LINE_HEIGHT
      CSS unit for the Line height of the element.
    • LH

      public static final ECssUnit LH
      Shortcut for LINE_HEIGHT.
    • MILLIMETERS

      public static final ECssUnit MILLIMETERS
      CSS unit millimeters. 1mm = 1/10th of 1cm.
    • MM

      public static final ECssUnit MM
      Shortcut for MILLIMETERS.
    • MILLISECONDS

      public static final ECssUnit MILLISECONDS
      CSS unit milliseconds. There are 1000 milliseconds in a second.
    • MS

      public static final ECssUnit MS
      Shortcut for MILLISECONDS.
    • PERCENT

      public static final ECssUnit PERCENT
      CSS unit percent.
    • PICAS

      public static final ECssUnit PICAS
      CSS unit picas. 1pc = 1/6th of 1in.
    • PC

      public static final ECssUnit PC
      Shortcut for PICAS.
    • PIXELS

      public static final ECssUnit PIXELS
      CSS unit pixels. 1px = 1/96th of 1in.
    • PX

      public static final ECssUnit PX
      Shortcut for PIXELS.
    • POINTS

      public static final ECssUnit POINTS
      CSS unit points. 1pt = 1/72th of 1in.
    • PT

      public static final ECssUnit PT
      Shortcut for POINTS.
    • QUARTER_MILLIMETERS

      public static final ECssUnit QUARTER_MILLIMETERS
      CSS unit quarter millimeters. 1Q = 1/40th of 1cm.
    • Q

      public static final ECssUnit Q
      Shortcut for QUARTER_MILLIMETERS.
    • RADIANS

      public static final ECssUnit RADIANS
      CSS unit radians.
    • RAD

      public static final ECssUnit RAD
      Shortcut for RADIANS.
    • ROOT_CAPITAL_HEIGHT

      public static final ECssUnit ROOT_CAPITAL_HEIGHT
      CSS unit for the cap-height in the root element's font, approximately equal to the height of a capital Latin letter.
    • ROOT_CAP

      public static final ECssUnit ROOT_CAP
      Shortcut for ROOT_CAPITAL_HEIGHT.
    • ROOT_CHARACTER_UNIT

      public static final ECssUnit ROOT_CHARACTER_UNIT
      CSS unit for the advance measure (advance width or height, whichever is in the inline axis of the element) of the glyph "0" of the root element's font.
    • RCH

      public static final ECssUnit RCH
      Shortcut for ROOT_CHARACTER_UNIT.
    • ROOT_FONT_SIZE

      public static final ECssUnit ROOT_FONT_SIZE
      CSS unit for the font size of the root element.
    • REM

      public static final ECssUnit REM
      Shortcut for ROOT_FONT_SIZE.
    • ROOT_INTERNATIONAL_CHARACTER_UNIT

      public static final ECssUnit ROOT_INTERNATIONAL_CHARACTER_UNIT
      CSS unit for the advance measure (advance width or height, whichever is in the inline axis of the element) of the glyph "水" of the root element's font.
    • RIC

      public static final ECssUnit RIC
    • ROOT_LINE_HEIGHT

      public static final ECssUnit ROOT_LINE_HEIGHT
      CSS unit for the Line height of the element of the root element.
    • RLH

      public static final ECssUnit RLH
      Shortcut for ROOT_LINE_HEIGHT.
    • ROOT_X_HEIGHT

      public static final ECssUnit ROOT_X_HEIGHT
      CSS unit for the x-height of the root element's font.
    • REX

      public static final ECssUnit REX
      Shortcut for ROOT_X_HEIGHT.
    • SECONDS

      public static final ECssUnit SECONDS
      CSS unit seconds.
    • S

      public static final ECssUnit S
      Shortcut for SECONDS.
    • SMALL_VIEWPORT_HEIGHT

      public static final ECssUnit SMALL_VIEWPORT_HEIGHT
      CSS unit for 1% of the small viewport's height.
    • SVH

      public static final ECssUnit SVH
      Shortcut for SMALL_VIEWPORT_HEIGHT.
    • SMALL_VIEWPORT_WIDTH

      public static final ECssUnit SMALL_VIEWPORT_WIDTH
      CSS unit for 1% of the small viewport's width.
    • SVW

      public static final ECssUnit SVW
      Shortcut for SMALL_VIEWPORT_WIDTH.
    • TURNS

      public static final ECssUnit TURNS
      CSS unit turns (1 turn = 360 degrees).
    • TURN

      public static final ECssUnit TURN
      Shortcut for TURNS.
    • VIEWPORT_BLOCK_AXIS

      public static final ECssUnit VIEWPORT_BLOCK_AXIS
      CSS unit for 1% of the size of the initial containing block in the direction of the root element's block axis.
    • VB

      public static final ECssUnit VB
      Shortcut for VIEWPORT_BLOCK_AXIS.
    • VIEWPORT_INLINE_AXIS

      public static final ECssUnit VIEWPORT_INLINE_AXIS
      CSS unit for 1% of the size of the initial containing block in the direction of the root element's inline axis.
    • VI

      public static final ECssUnit VI
      Shortcut for VIEWPORT_INLINE_AXIS.
    • VIEWPORT_HEIGHT

      public static final ECssUnit VIEWPORT_HEIGHT
      CSS unit 1% of the viewport's height.
    • VH

      public static final ECssUnit VH
      Shortcut for VIEWPORT_HEIGHT.
    • VIEWPORT_MAX

      public static final ECssUnit VIEWPORT_MAX
      CSS unit for 1% of the viewport's large dimension
    • VMAX

      public static final ECssUnit VMAX
      Shortcut for VIEWPORT_MAX.
    • VIEWPORT_MIN

      public static final ECssUnit VIEWPORT_MIN
      CSS unit for 1% of the viewport's smaller dimension
    • VMIN

      public static final ECssUnit VMIN
      Shortcut for VIEWPORT_MIN.
    • VIEWPORT_WIDTH

      public static final ECssUnit VIEWPORT_WIDTH
      CSS unit for 1% of the viewport's width..
    • VW

      public static final ECssUnit VW
      Shortcut for VIEWPORT_WIDTH.
    • X_HEIGHT

      public static final ECssUnit X_HEIGHT
      CSS unit for the x-height of the element's font.
    • EX

      public static final ECssUnit EX
      Shortcut for X_HEIGHT.
  • Method Details

    • values

      public static ECssUnit[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static ECssUnit 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
      NullPointerException - if the argument is null
    • toString

      public String toString()
      Overrides:
      toString in class Enum<ECssUnit>
    • value

      public String value()
      Returns:
      The value that can be used for building CSS strings with this unit.
    • amount

      public String amount(double value)
      Parameters:
      value - Numerical value.
      Returns:
      The value together with the unit, e.g. 10px or 5%.
    • amount

      public String amount(long value)
      Parameters:
      value - Numerical value.
      Returns:
      The value together with the unit, e.g. 10px or 5%.