fop 0.95

org.apache.fop.layoutmgr
Class MinOptMaxUtil

java.lang.Object
  extended by org.apache.fop.layoutmgr.MinOptMaxUtil

public class MinOptMaxUtil
extends java.lang.Object

Utilities for MinOptMax and LengthRangeProperty.


Constructor Summary
MinOptMaxUtil()
           
 
Method Summary
static void extendMinimum(MinOptMax mom, int len)
          Extends the minimum length to the given length if necessary, and adjusts opt and max accordingly.
static void fixAfterMinChanged(MinOptMax mom)
          After a calculation on a MinOptMax, this can be called to set opt to a new effective value.
static void restrict(MinOptMax mom, LengthRangeProperty lr, PercentBaseContext context)
          Restricts a MinOptMax using the values from a LengthRangeProperty.
static MinOptMax toMinOptMax(LengthRangeProperty prop, PercentBaseContext context)
          Converts a LengthRangeProperty to a MinOptMax.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MinOptMaxUtil

public MinOptMaxUtil()
Method Detail

restrict

public static void restrict(MinOptMax mom,
                            LengthRangeProperty lr,
                            PercentBaseContext context)
Restricts a MinOptMax using the values from a LengthRangeProperty.

Parameters:
mom - MinOptMax to restrict
lr - restricting source
context - Percentage evaluation context

extendMinimum

public static void extendMinimum(MinOptMax mom,
                                 int len)
Extends the minimum length to the given length if necessary, and adjusts opt and max accordingly.

Parameters:
mom - the min/opt/max trait
len - the new minimum 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.

Parameters:
mom - MinOptMax to adjust

toMinOptMax

public static MinOptMax toMinOptMax(LengthRangeProperty prop,
                                    PercentBaseContext context)
Converts a LengthRangeProperty to a MinOptMax.

Parameters:
prop - LengthRangeProperty
context - Percentage evaluation context
Returns:
the requested MinOptMax instance

fop 0.95

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