org.apache.fop.layoutmgr
Class ElementListUtils
java.lang.Object
|
+--org.apache.fop.layoutmgr.ElementListUtils
- public class ElementListUtils
- extends java.lang.Object
Utilities for Knuth element lists.
Method Summary |
static int |
calcContentLength(java.util.List elems)
Calculates the content length of the given element list. |
static int |
calcContentLength(java.util.List elems,
int start,
int end)
Calculates the content length of the given element list. |
static boolean |
endsWithForcedBreak(java.util.LinkedList elems)
Indicates whether the given element list ends with a forced break. |
static void |
removeLegalBreaks(java.util.LinkedList elements)
Removes all legal breaks in an element list. |
static boolean |
removeLegalBreaks(java.util.LinkedList elements,
MinOptMax constraint)
Removes all legal breaks in an element list. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ElementListUtils
public ElementListUtils()
removeLegalBreaks
public static void removeLegalBreaks(java.util.LinkedList elements)
- Removes all legal breaks in an element list.
- Parameters:
elements
- the element list
removeLegalBreaks
public static boolean removeLegalBreaks(java.util.LinkedList elements,
MinOptMax constraint)
- Removes all legal breaks in an element list. A constraint can be specified to limit the
range in which the breaks are removed. Legal breaks occuring before at least
constraint.opt space is filled will be removed.
- Parameters:
elements
- the element listconstraint
- min/opt/max value to restrict the range in which the breaks are removed.- Returns:
- true if the opt constraint is bigger than the list contents
calcContentLength
public static int calcContentLength(java.util.List elems,
int start,
int end)
- Calculates the content length of the given element list. Warning: It doesn't take any
stretch and shrink possibilities into account.
- Parameters:
elems
- the element liststart
- element at which to startend
- element at which to stop- Returns:
- the content length
calcContentLength
public static int calcContentLength(java.util.List elems)
- Calculates the content length of the given element list. Warning: It doesn't take any
stretch and shrink possibilities into account.
- Parameters:
elems
- the element list- Returns:
- the content length
endsWithForcedBreak
public static boolean endsWithForcedBreak(java.util.LinkedList elems)
- Indicates whether the given element list ends with a forced break.
- Parameters:
elems
- the element list- Returns:
- true if the list ends with a forced break
Copyright 1999-2005 The Apache Software Foundation. All Rights Reserved.