org.apache.fop.datatypes

Class SimplePercentBaseContext

Implemented Interfaces:
PercentBaseContext

public class SimplePercentBaseContext
extends java.lang.Object
implements PercentBaseContext

Class to implement a simple lookup context for a single percent base value.

Constructor Summary

SimplePercentBaseContext(PercentBaseContext parentContext, int lengthBase, int lengthBaseValue)

Method Summary

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

Constructor Details

SimplePercentBaseContext

public SimplePercentBaseContext(PercentBaseContext parentContext,
                                int lengthBase,
                                int lengthBaseValue)
Parameters:
parentContext - the context to be used for all percentages other than lengthBase
lengthBase - the particular percentage length base for which this context provides a value
lengthBaseValue - the value to be returned for requests to the given lengthBase

Method Details

getBaseLength

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

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