org.apache.fop.datatypes

Class ValidationPercentBaseContext

Implemented Interfaces:
PercentBaseContext

public final class ValidationPercentBaseContext
extends java.lang.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 Summary

int
getBaseLength(int lengthBase, FObj fobj)
Returns the value for the given lengthBase.
static PercentBaseContext
getPseudoContext()

Method Details

getBaseLength

public int getBaseLength(int lengthBase,
                         FObj fobj)
Returns the value for the given lengthBase.
Specified by:
getBaseLength in interface PercentBaseContext

getPseudoContext

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

Copyright 1999-2007 The Apache Software Foundation. All Rights Reserved.