org.apache.fop.layoutmgr
Class KnuthSequence
ArrayList
org.apache.fop.layoutmgr.KnuthSequence
public abstract class KnuthSequence
extends ArrayList
KnuthSequence
public KnuthSequence()
Creates a new and empty list.
KnuthSequence
public KnuthSequence(List list)
Creates a new list from an existing list.
list
- The list from which to create the new list.
appendSequence
public abstract boolean appendSequence(KnuthSequence sequence)
Append sequence to this sequence if it can be appended.
sequence
- The sequence that is to be appended.
- whether the sequence was succesfully appended to this sequence.
appendSequence
public abstract boolean appendSequence(KnuthSequence sequence,
boolean keepTogether,
BreakElement breakElement)
Append sequence to this sequence if it can be appended.
sequence
- The sequence that is to be appended.keepTogether
- Whether the two sequences must be kept together.breakElement
- The BreakElement that may be inserted between the two sequences.
- whether the sequence was succesfully appended to this sequence.
appendSequenceOrClose
public boolean appendSequenceOrClose(KnuthSequence sequence)
Append sequence to this sequence if it can be appended.
If that is not possible, close this sequence.
sequence
- The sequence that is to be appended.
- whether the sequence was succesfully appended to this sequence.
appendSequenceOrClose
public boolean appendSequenceOrClose(KnuthSequence sequence,
boolean keepTogether,
BreakElement breakElement)
Append sequence to this sequence if it can be appended.
If that is not possible, close this sequence.
sequence
- The sequence that is to be appended.keepTogether
- Whether the two sequences must be kept together.breakElement
- The BreakElement that may be inserted between the two sequences.
- whether the sequence was succesfully appended to this sequence.
canAppendSequence
public abstract boolean canAppendSequence(KnuthSequence sequence)
Can sequence be appended to this sequence?
sequence
- The sequence that may be appended.
- whether the sequence can be appended to this sequence.
endSequence
public abstract KnuthSequence endSequence()
Finalizes a Knuth sequence.
getElement
public ListElement getElement(int index)
index
- The index of the element to be returned
- the element at index index.
getLast
public ListElement getLast()
- the last element of this sequence.
isInlineSequence
public abstract boolean isInlineSequence()
Is this an inline or a block sequence?
- true if this is an inline sequence
removeLast
public ListElement removeLast()
Remove the last element of this sequence.
startSequence
public void startSequence()
Marks the start of the sequence.
wrapPositions
public void wrapPositions(LayoutManager lm)
Wrap the Positions of the elements of this sequence in a Position for LayoutManager lm.
lm
- The LayoutManager for the Positions that will be created.
Copyright 1999-2007 The Apache Software Foundation. All Rights Reserved.