Class LineHeight


  • public class LineHeight
    extends java.lang.Object
    A property corresponding to the css line-height property and used to set the height of a line box in the HTML mode. On block-level elements, it specifies the minimum height of line boxes within the element. On non-replaced inline elements, it specifies the height that is used to calculate line box height.
    • Constructor Detail

      • LineHeight

        private LineHeight​(int type,
                           float value)
    • Method Detail

      • getValue

        public float getValue()
        Returns the line height value. The meaning of the returned value depends on the type of line height.
        Returns:
        the LineHeight value.
      • createFixedValue

        public static LineHeight createFixedValue​(float value)
        Creates a LineHeight with a fixed value.
        Parameters:
        value - value to set
        Returns:
        created LineHeight object
      • createMultipliedValue

        public static LineHeight createMultipliedValue​(float value)
        Creates a LineHeight with multiplied value. This value must be multiplied by the element's font size.
        Parameters:
        value - value to set
        Returns:
        created LineHeight object
      • isFixedValue

        public boolean isFixedValue()
        Check if the LineHeight contains fixed value.
        Returns:
        true if LineHeight contains fixed value.
      • isMultipliedValue

        public boolean isMultipliedValue()
        Check if the LineHeight contains multiplied value.
        Returns:
        true if LineHeight contains multiplied value.
      • isNormalValue

        public boolean isNormalValue()
        Check if the LineHeight contains normal value.
        Returns:
        true if LineHeight is normal.