Class ValidationPercentBaseContext

java.lang.Object
org.apache.fop.datatypes.ValidationPercentBaseContext
All Implemented Interfaces:
PercentBaseContext

public final class ValidationPercentBaseContext extends Object implements PercentBaseContext
This base context is used during validation when the actual base values are still unknown but should still already be checked. The actual value returned is not so important in this case. But it's important that zero and non-zero values can be distinguished.

Example: A table with collapsing border model has no padding. The Table FO should be able to check if non-zero values (even percentages) have been specified.

  • Method Details

    • getBaseLength

      public int getBaseLength(int lengthBase, FObj fobj)
      Returns the value for the given lengthBase. Returns the base length for the given length base. Length base should be one of the constants defined in LengthBase.
      Specified by:
      getBaseLength in interface PercentBaseContext
      Parameters:
      lengthBase - Indicates which type of the base length value is to be returned
      fobj - The FO object against which the percentage should be evaluated
      Returns:
      The base length value of the given kind
    • getPseudoContext

      public static PercentBaseContext getPseudoContext()
      Returns:
      a base context for validation purposes. See class description.