Package com.itextpdf.layout.properties
Class Leading
- java.lang.Object
-
- com.itextpdf.layout.properties.Leading
-
public class Leading extends java.lang.ObjectA 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.LEADINGkey in anIPropertyContainer.
-
-
Field Summary
Fields Modifier and Type Field Description static intFIXEDA leading type independent of font size.static intMULTIPLIEDA leading type related to the font size and the resulting bounding box.protected inttypeprotected floatvalue
-
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 booleanequals(java.lang.Object obj)intgetType()Gets the calculation type of the Leading object.floatgetValue()Gets the value to be used as the basis for the leading calculation.inthashCode()
-
-
-
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. EitherFIXEDorMULTIPLIEDvalue- 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
FIXEDorMULTIPLIED
-
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:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-