Package com.itextpdf.layout.properties
Class LineHeight
- java.lang.Object
-
- com.itextpdf.layout.properties.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.
-
-
Field Summary
Fields Modifier and Type Field Description private static int
FIXED
private static int
MULTIPLIED
private static int
NORMAL
private int
type
private float
value
-
Constructor Summary
Constructors Modifier Constructor Description private
LineHeight(int type, float value)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static LineHeight
createFixedValue(float value)
Creates aLineHeight
with a fixed value.static LineHeight
createMultipliedValue(float value)
Creates aLineHeight
with multiplied value.static LineHeight
createNormalValue()
Creates a normalLineHeight
.float
getValue()
Returns the line height value.boolean
isFixedValue()
Check if theLineHeight
contains fixed value.boolean
isMultipliedValue()
Check if theLineHeight
contains multiplied value.boolean
isNormalValue()
Check if theLineHeight
contains 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
LineHeight
value.
-
createFixedValue
public static LineHeight createFixedValue(float value)
Creates aLineHeight
with a fixed value.- Parameters:
value
- value to set- Returns:
- created
LineHeight
object
-
createMultipliedValue
public static LineHeight createMultipliedValue(float value)
Creates aLineHeight
with multiplied value. This value must be multiplied by the element's font size.- Parameters:
value
- value to set- Returns:
- created
LineHeight
object
-
createNormalValue
public static LineHeight createNormalValue()
Creates a normalLineHeight
.- Returns:
- created
LineHeight
object
-
isFixedValue
public boolean isFixedValue()
Check if theLineHeight
contains fixed value.- Returns:
- true if
LineHeight
contains fixed value.
-
isMultipliedValue
public boolean isMultipliedValue()
Check if theLineHeight
contains multiplied value.- Returns:
- true if
LineHeight
contains multiplied value.
-
isNormalValue
public boolean isNormalValue()
Check if theLineHeight
contains normal value.- Returns:
- true if
LineHeight
is normal.
-
-