public abstract class KnuthSequence
extends java.util.ArrayList
Knuth elements
.Constructor and Description |
---|
KnuthSequence()
Creates a new and empty list.
|
KnuthSequence(java.util.List list)
Creates a new list from an existing list.
|
Modifier and Type | Method and Description |
---|---|
abstract boolean |
appendSequence(KnuthSequence sequence)
Append sequence to this sequence if it can be appended.
|
abstract boolean |
appendSequence(KnuthSequence sequence,
boolean keepTogether,
BreakElement breakElement)
Append sequence to this sequence if it can be appended.
|
boolean |
appendSequenceOrClose(KnuthSequence sequence)
Append sequence to this sequence if it can be appended.
|
boolean |
appendSequenceOrClose(KnuthSequence sequence,
boolean keepTogether,
BreakElement breakElement)
Append sequence to this sequence if it can be appended.
|
abstract boolean |
canAppendSequence(KnuthSequence sequence)
Can sequence be appended to this sequence?
|
abstract KnuthSequence |
endSequence()
Finalizes a Knuth sequence.
|
ListElement |
getElement(int index) |
protected int |
getFirstBoxIndex() |
protected int |
getFirstBoxIndex(int startIndex)
Get the position index of the first box in this sequence,
starting at the given index.
|
ListElement |
getLast() |
abstract boolean |
isInlineSequence()
Is this an inline or a block sequence?
|
ListElement |
removeLast()
Remove the last element of this sequence.
|
void |
startSequence()
Marks the start of the sequence.
|
java.lang.String |
toString() |
void |
wrapPositions(LayoutManager lm)
Wrap the Positions of the elements of this sequence in a Position for LayoutManager lm.
|
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeRange, retainAll, set, size, subList, toArray, toArray, trimToSize
public KnuthSequence()
public KnuthSequence(java.util.List list)
list
- The list from which to create the new list.public void startSequence()
public abstract KnuthSequence endSequence()
public abstract boolean canAppendSequence(KnuthSequence sequence)
sequence
- The sequence that may be appended.public abstract boolean appendSequence(KnuthSequence sequence, boolean keepTogether, BreakElement breakElement)
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.public abstract boolean appendSequence(KnuthSequence sequence)
sequence
- The sequence that is to be appended.public boolean appendSequenceOrClose(KnuthSequence sequence)
sequence
- The sequence that is to be appended.public boolean appendSequenceOrClose(KnuthSequence sequence, boolean keepTogether, BreakElement breakElement)
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.public void wrapPositions(LayoutManager lm)
lm
- The LayoutManager for the Positions that will be created.public ListElement getLast()
public ListElement removeLast()
public ListElement getElement(int index)
index
- The index of the element to be returnedprotected int getFirstBoxIndex()
protected int getFirstBoxIndex(int startIndex)
startIndex
, the starting index itself is returned.startIndex
- the starting index for the lookuppublic abstract boolean isInlineSequence()
public java.lang.String toString()
toString
in class java.util.AbstractCollection
Copyright 1999-2012 The Apache Software Foundation. All Rights Reserved.