Class Leading

java.lang.Object
com.itextpdf.layout.properties.Leading

public class Leading extends 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 the Property.LEADING key in an IPropertyContainer.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    A leading type independent of font size.
    static final int
    A leading type related to the font size and the resulting bounding box.
    protected int
     
    protected float
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    Leading(int type, float value)
    Creates a Leading object.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    equals(Object obj)
     
    int
    Gets the calculation type of the Leading object.
    float
    Gets the value to be used as the basis for the leading calculation.
    int
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • FIXED

      public static final int FIXED
      A leading type independent of font size.
      See Also:
    • MULTIPLIED

      public static final int MULTIPLIED
      A leading type related to the font size and the resulting bounding box.
      See Also:
    • type

      protected int type
    • value

      protected float value
  • Constructor Details

    • Leading

      public Leading (int type, float value)
      Creates a Leading object.
      Parameters:
      type - a constant type that defines the calculation of actual leading distance. Either FIXED or MULTIPLIED
      value - to be used as a basis for the leading calculation.
  • Method Details

    • getType

      public int getType()
      Gets the calculation type of the Leading object.
      Returns:
      the calculation type. Either FIXED or MULTIPLIED
    • 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 (Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object