Class LengthPairProperty

java.lang.Object
org.apache.fop.fo.properties.Property
org.apache.fop.fo.properties.LengthPairProperty
All Implemented Interfaces:
CompoundDatatype, Constants

public class LengthPairProperty extends Property implements CompoundDatatype
Superclass for properties wrapping a LengthPair value
  • Constructor Details

    • LengthPairProperty

      public LengthPairProperty()
      Creates a new LengthPairProperty with empty values.
    • LengthPairProperty

      public LengthPairProperty(Property ipd, Property bpd)
      Creates a new LengthPairProperty.
      Parameters:
      ipd - inline-progression-dimension
      bpd - block-progression-dimension
    • LengthPairProperty

      public LengthPairProperty(Property len)
      Creates a new LengthPairProperty which sets both bpd and ipd to the same value.
      Parameters:
      len - length for both dimensions
  • Method Details

    • setComponent

      public void setComponent(int cmpId, Property cmpnValue, boolean bIsDefault)
      Sets a component of the compound datatype.
      Specified by:
      setComponent in interface CompoundDatatype
      Parameters:
      cmpId - ID of the component
      cmpnValue - value of the component
      bIsDefault - Indicates if it's the default value
    • getComponent

      public Property getComponent(int cmpId)
      Returns a component of the compound datatype.
      Specified by:
      getComponent in interface CompoundDatatype
      Parameters:
      cmpId - ID of the component
      Returns:
      the value of the component
    • getIPD

      public Property getIPD()
      Returns:
      Property holding the ipd length
    • getBPD

      public Property getBPD()
      Returns:
      Property holding the bpd length
    • toString

      public String toString()
      Overrides:
      toString in class Property
    • getLengthPair

      public LengthPairProperty getLengthPair()
      Description copied from class: Property
      This method expects to be overridden by subclasses
      Overrides:
      getLengthPair in class Property
      Returns:
      this.lengthPair
    • getObject

      public Object getObject()
      Description copied from class: Property
      This method expects to be overridden by subclasses
      Overrides:
      getObject in class Property
      Returns:
      this.lengthPair cast as an Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object