org.apache.fop.layoutmgr
Class MinOptMaxUtil
java.lang.Object
org.apache.fop.layoutmgr.MinOptMaxUtil
public class MinOptMaxUtil
extends java.lang.Object
Utilities for MinOptMax and LengthRangeProperty.
extendMinimum
public static void extendMinimum(MinOptMax mom,
int len,
boolean optToLen)
Extend the minimum length to the given length.
mom
- the min/opt/max traitlen
- the new minimum lengthoptToLen
- if set adjusts the optimum length to be the smaller of the
minimum length and the given length
fixAfterMinChanged
public static void fixAfterMinChanged(MinOptMax mom)
After a calculation on a MinOptMax, this can be called to set opt to
a new effective value.
mom
- MinOptMax to adjust
restrict
public static void restrict(MinOptMax mom,
LengthRangeProperty lr,
PercentBaseContext context)
Restricts a MinOptMax using the values from a LengthRangeProperty.
mom
- MinOptMax to restrictlr
- restricting sourcecontext
- Percentage evaluation context
toMinOptMax
public static MinOptMax toMinOptMax(LengthRangeProperty prop,
PercentBaseContext context)
Converts a LengthRangeProperty to a MinOptMax.
prop
- LengthRangePropertycontext
- Percentage evaluation context
- the requested MinOptMax instance
Copyright 1999-2007 The Apache Software Foundation. All Rights Reserved.