Package com.itextpdf.layout.properties
Class Leading
- java.lang.Object
-
- com.itextpdf.layout.properties.Leading
-
public class Leading extends java.lang.Object
A specialized class that specifies the leading, "the vertical distance between the baselines of adjacent lines of text" (ISO-32000-1, section 9.3.5). Allows to use either an absolute (constant) leading value, or one determined by font size. Pronounce as 'ledding' (cfr. Led Zeppelin). This class is meant to be used as the value for theProperty.LEADING
key in anIPropertyContainer
.
-
-
Field Summary
Fields Modifier and Type Field Description static int
FIXED
A leading type independent of font size.static int
MULTIPLIED
A leading type related to the font size and the resulting bounding box.protected int
type
protected float
value
-
Constructor Summary
Constructors Constructor Description Leading(int type, float value)
Creates a Leading object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
int
getType()
Gets the calculation type of the Leading object.float
getValue()
Gets the value to be used as the basis for the leading calculation.int
hashCode()
-
-
-
Field Detail
-
FIXED
public static final int FIXED
A leading type independent of font size.- See Also:
- Constant Field Values
-
MULTIPLIED
public static final int MULTIPLIED
A leading type related to the font size and the resulting bounding box.- See Also:
- Constant Field Values
-
type
protected int type
-
value
protected float value
-
-
Constructor Detail
-
Leading
public Leading(int type, float value)
Creates a Leading object.- Parameters:
type
- a constant type that defines the calculation of actual leading distance. EitherFIXED
orMULTIPLIED
value
- to be used as a basis for the leading calculation.
-
-
Method Detail
-
getType
public int getType()
Gets the calculation type of the Leading object.- Returns:
- the calculation type. Either
FIXED
orMULTIPLIED
-
getValue
public float getValue()
Gets the value to be used as the basis for the leading calculation.- Returns:
- a calculation value
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-