Enum ECssUnit

    • Enum Constant Detail

      • 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.
      • CENTIMETERS

        public static final ECssUnit CENTIMETERS
        CSS unit centimeters. 1cm = 96px/2.54
      • 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.
      • DEGREES

        public static final ECssUnit DEGREES
        CSS unit degree.
      • DOTS_PER_CENTIMETER

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

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

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

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

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

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

        public static final ECssUnit GRADIANS
        CSS unit gradians.
      • HERTZ

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

        public static final ECssUnit INCHES
        CSS unit inches. 1in = 2.54cm = 96px
      • 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.
      • KILOHERTZ

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

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

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

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

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

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

        public static final ECssUnit PERCENT
        CSS unit percent.
      • PICAS

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

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

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

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

        public static final ECssUnit RADIANS
        CSS unit 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_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.
      • ROOT_FONT_SIZE

        public static final ECssUnit ROOT_FONT_SIZE
        CSS unit for the font size of the root element.
      • 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.
      • ROOT_LINE_HEIGHT

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

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

        public static final ECssUnit SECONDS
        CSS unit seconds.
      • SMALL_VIEWPORT_HEIGHT

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

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

        public static final ECssUnit TURNS
        CSS unit turns (1 turn = 360 degrees).
      • 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.
      • 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.
      • VIEWPORT_HEIGHT

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

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

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

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

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

      • values

        public static ECssUnit[] 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 (ECssUnit c : ECssUnit.values())
            System.out.println(c);
        
        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
      • 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%.