Class LengthRangeProperty

java.lang.Object
org.apache.fop.fo.properties.Property
org.apache.fop.fo.properties.LengthRangeProperty
All Implemented Interfaces:
CompoundDatatype, Constants
Direct Known Subclasses:
SpaceProperty

public class LengthRangeProperty extends Property implements CompoundDatatype
Superclass for properties that contain LengthRange values
  • Constructor Details

    • LengthRangeProperty

      public LengthRangeProperty()
  • Method Details

    • toMinOptMax

      public MinOptMax toMinOptMax(PercentBaseContext context)
      Converts this LengthRangeProperty to a MinOptMax.
      Parameters:
      context - Percentage evaluation context
      Returns:
      the requested MinOptMax instance
    • 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
    • setMinimum

      protected void setMinimum(Property minimum, boolean bIsDefault)
      Set minimum value to min.
      Parameters:
      minimum - A Length value specifying the minimum value for this LengthRange.
      bIsDefault - If true, this is set as a "default" value and not a user-specified explicit value.
    • setMaximum

      protected void setMaximum(Property max, boolean bIsDefault)
      Set maximum value to max if it is >= optimum or optimum isn't set.
      Parameters:
      max - A Length value specifying the maximum value for this
      bIsDefault - If true, this is set as a "default" value and not a user-specified explicit value.
    • setOptimum

      protected void setOptimum(Property opt, boolean bIsDefault)
      Set the optimum value.
      Parameters:
      opt - A Length value specifying the optimum value for this
      bIsDefault - If true, this is set as a "default" value and not a user-specified explicit value.
    • getMinimum

      public Property getMinimum(PercentBaseContext context)
      Parameters:
      context - Percentage evaluation context
      Returns:
      minimum length
    • getMaximum

      public Property getMaximum(PercentBaseContext context)
      Parameters:
      context - Percentage evaluation context
      Returns:
      maximum length
    • getOptimum

      public Property getOptimum(PercentBaseContext context)
      Parameters:
      context - Percentage evaluation context
      Returns:
      optimum length
    • toString

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

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

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

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

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