Package com.itextpdf.layout.properties
Class LineHeight
- java.lang.Object
-
- com.itextpdf.layout.properties.LineHeight
-
public class LineHeight extends java.lang.ObjectA 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.
-
-
Field Summary
Fields Modifier and Type Field Description private static intFIXEDprivate static intMULTIPLIEDprivate static intNORMALprivate inttypeprivate floatvalue
-
Constructor Summary
Constructors Modifier Constructor Description privateLineHeight(int type, float value)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static LineHeightcreateFixedValue(float value)Creates aLineHeightwith a fixed value.static LineHeightcreateMultipliedValue(float value)Creates aLineHeightwith multiplied value.static LineHeightcreateNormalValue()Creates a normalLineHeight.floatgetValue()Returns the line height value.booleanisFixedValue()Check if theLineHeightcontains fixed value.booleanisMultipliedValue()Check if theLineHeightcontains multiplied value.booleanisNormalValue()Check if theLineHeightcontains normal value.
-
-
-
Field Detail
-
FIXED
private static final int FIXED
- See Also:
- Constant Field Values
-
MULTIPLIED
private static final int MULTIPLIED
- See Also:
- Constant Field Values
-
NORMAL
private static final int NORMAL
- See Also:
- Constant Field Values
-
type
private int type
-
value
private 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
LineHeightvalue.
-
createFixedValue
public static LineHeight createFixedValue(float value)
Creates aLineHeightwith a fixed value.- Parameters:
value- value to set- Returns:
- created
LineHeightobject
-
createMultipliedValue
public static LineHeight createMultipliedValue(float value)
Creates aLineHeightwith multiplied value. This value must be multiplied by the element's font size.- Parameters:
value- value to set- Returns:
- created
LineHeightobject
-
createNormalValue
public static LineHeight createNormalValue()
Creates a normalLineHeight.- Returns:
- created
LineHeightobject
-
isFixedValue
public boolean isFixedValue()
Check if theLineHeightcontains fixed value.- Returns:
- true if
LineHeightcontains fixed value.
-
isMultipliedValue
public boolean isMultipliedValue()
Check if theLineHeightcontains multiplied value.- Returns:
- true if
LineHeightcontains multiplied value.
-
isNormalValue
public boolean isNormalValue()
Check if theLineHeightcontains normal value.- Returns:
- true if
LineHeightis normal.
-
-