fop 0.90alpha1

org.apache.fop.layoutmgr
Class SpaceResolver

java.lang.Object
  |
  +--org.apache.fop.layoutmgr.SpaceResolver

public class SpaceResolver
extends java.lang.Object

This class resolves spaces and conditional borders and paddings by replacing the UnresolvedListElements descendants by the right combination of KnuthElements on an element list.


Inner Class Summary
 class SpaceResolver.SpaceHandlingBreakPosition
          Position class for break possibilities.
 class SpaceResolver.SpaceHandlingPosition
          Position class for no-break situations.
 
Field Summary
protected static org.apache.commons.logging.Log log
          Logger instance
 
Constructor Summary
SpaceResolver(java.util.List first, BreakElement breakPoss, java.util.List second, boolean isFirst, boolean isLast)
          Main constructor.
 
Method Summary
static void performConditionalsNotification(java.util.List effectiveList, int startElementIndex, int endElementIndex, int lastBreak)
          Inspects an effective element list and notifies all layout managers about the state of the spaces and conditional lengths.
static void resolveElementList(java.util.LinkedList elems)
          Resolves unresolved elements applying the space resolution rules defined in 4.3.1.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static org.apache.commons.logging.Log log
Logger instance
Constructor Detail

SpaceResolver

public SpaceResolver(java.util.List first,
                     BreakElement breakPoss,
                     java.util.List second,
                     boolean isFirst,
                     boolean isLast)
Main constructor.
Parameters:
first - Element list before a break (optional)
breakPoss - Break possibility (optional)
second - Element list after a break (or if no break possibility in vicinity)
isFirst - Resolution at the beginning of a (full) element list
isLast - Resolution at the end of a (full) element list
Method Detail

resolveElementList

public static void resolveElementList(java.util.LinkedList elems)
Resolves unresolved elements applying the space resolution rules defined in 4.3.1.
Parameters:
elems - the element list

performConditionalsNotification

public static void performConditionalsNotification(java.util.List effectiveList,
                                                   int startElementIndex,
                                                   int endElementIndex,
                                                   int lastBreak)
Inspects an effective element list and notifies all layout managers about the state of the spaces and conditional lengths.
Parameters:
effectiveList - the effective element list
startElementIndex - index of the first element in the part to be processed
endElementIndex - index of the last element in the part to be processed
lastBreak - index of the the break possibility just before this part (used to identify a break condition, lastBreak <= 0 represents a no-break condition)

fop 0.90alpha1

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