|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.dante.extex.typesetter.type.node.AbstractNode
de.dante.extex.typesetter.type.node.GenericNodeList
Abstract base class for all NodeList
s.
Field Summary |
Fields inherited from class de.dante.extex.typesetter.type.node.AbstractNode |
NO_CHARS |
Constructor Summary | |
GenericNodeList()
Creates a new object. |
|
GenericNodeList(Node node)
Creates a new object. |
Method Summary | |
void |
add(int index,
Node node)
Add a node to the node list at a given position. |
void |
add(Node node)
Add a node to the node list. |
void |
addSkip(FixedGlue glue)
Add some glue to the node list. |
Node |
atShipping(Context context,
Typesetter typesetter,
NodeVisitor visitor,
boolean inHMode)
This method performs any action which are required to executed at the time of shipping the node to the DocumentWriter. |
void |
clear()
Remove all nodes from the list. |
NodeList |
copy()
Clone the current object. |
int |
countChars()
This method determines the number of characters contained in a node. |
boolean |
empty()
Test whether the node list is empty. |
Node |
get(int index)
Getter for a node at a given position. |
CharNode[] |
getChars()
Getter for the array of characters enclosed in this node. |
Dimen |
getMove()
Getter for the move value of the node list. |
Dimen |
getShift()
Getter for the shift value of the node list. |
Dimen |
getTargetDepth()
Getter for targetDepth. |
Dimen |
getTargetHeight()
Getter for targetHeight. |
Dimen |
getTargetWidth()
Getter for targetWidth. |
NodeIterator |
iterator()
Get a new iterator for all nodes in the list. |
Node |
remove(int index)
Remove an element at a given position. |
void |
setMove(FixedDimen d)
Setter for the move value of the node list. |
void |
setShift(FixedDimen d)
Setter for the shift value of the node list. |
void |
setTargetDepth(FixedDimen depth)
Setter for the target depth. |
void |
setTargetHeight(FixedDimen height)
Setter for the target height. |
void |
setTargetWidth(FixedDimen width)
Setter for the target width. |
int |
size()
Return the size of the NodeList . |
java.lang.String |
toString()
This method returns the printable representation. |
void |
toString(java.lang.StringBuffer sb,
java.lang.String prefix,
int breadth,
int depth)
Print the node possibly truncated in breadth and depth. |
java.lang.String |
toText()
Provides a string representation of the current instance. |
void |
toText(java.lang.StringBuffer sb,
java.lang.String prefix)
This method puts the printable representation into the string buffer. |
java.lang.Object |
visit(NodeVisitor visitor,
java.lang.Object value)
This method provides an entry point for the visitor pattern. |
Methods inherited from class de.dante.extex.typesetter.type.node.AbstractNode |
addDepthTo, addHeightTo, addWidthTo, advanceDepth, advanceHeight, advanceWidth, computeAdjustment, getDepth, getHeight, getLocalizer, getVerticalSize, getWidth, maxDepth, maxHeight, maxWidth, setDepth, setHeight, setWidth, spreadHeight, spreadWidth, toText |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface de.dante.extex.typesetter.type.Node |
addDepthTo, addHeightTo, addWidthTo, getDepth, getHeight, getVerticalSize, getWidth, setDepth, setHeight, setWidth, spreadHeight, spreadWidth |
Constructor Detail |
public GenericNodeList()
public GenericNodeList(Node node)
node
- the node to add initiallyMethod Detail |
public void add(int index, Node node)
NodeList
add
in interface NodeList
index
- the position of insertionnode
- the node to addNodeList.add(int,
de.dante.extex.typesetter.type.Node)
public void add(Node node)
NodeList
add
in interface NodeList
node
- the node to addNodeList.add(
de.dante.extex.typesetter.type.Node)
public void addSkip(FixedGlue glue)
NodeList
addSkip
in interface NodeList
glue
- the glue to addNodeList.addSkip(
de.dante.extex.interpreter.type.glue.FixedGlue)
public Node atShipping(Context context, Typesetter typesetter, NodeVisitor visitor, boolean inHMode) throws GeneralException
Node
atShipping
in interface Node
atShipping
in class AbstractNode
context
- the interpreter contexttypesetter
- the typesettervisitor
- the node visitor to be invoked when the node is hit. Note
that each node in the output page is visited this way. Thus there is no
need to implement a node traversal for the NodeList typesinHMode
- true
iff the container is a horizontal list.
Otherwise the container is a vertical list
null
then the node is deleted. If
the value is the node itself then it is preserved.
GeneralException
- in case of an errorNode.atShipping(
de.dante.extex.interpreter.context.Context,
de.dante.extex.typesetter.Typesetter,
de.dante.extex.typesetter.type.NodeVisitor,
boolean)
public void clear()
NodeList
clear
in interface NodeList
NodeList.clear()
public NodeList copy()
NodeList
copy
in interface NodeList
NodeList.copy()
public int countChars()
Node
countChars
in interface Node
countChars
in class AbstractNode
Node.countChars()
public boolean empty()
true
, if the NodeList
is empty,
otherwise false
.public Node get(int index)
NodeList
get
in interface NodeList
index
- the position
null
if index
is out of boundsNodeList.get(int)
public CharNode[] getChars()
Node
getChars
in interface Node
getChars
in class AbstractNode
Node.getChars()
public Dimen getMove()
NodeList
getMove
in interface NodeList
NodeList.getMove()
public Dimen getShift()
NodeList
getShift
in interface NodeList
NodeList.getShift()
public Dimen getTargetDepth()
public Dimen getTargetHeight()
public Dimen getTargetWidth()
public NodeIterator iterator()
NodeList
iterator
in interface NodeList
NodeList.iterator()
public Node remove(int index)
NodeList
remove
in interface NodeList
index
- the position
NodeList.remove(int)
public void setMove(FixedDimen d)
NodeList
setMove
in interface NodeList
d
- the move valueNodeList.setMove(
de.dante.extex.interpreter.type.dimen.FixedDimen)
public void setShift(FixedDimen d)
NodeList
setShift
in interface NodeList
d
- the amount to be shiftedNodeList.setShift(
de.dante.extex.interpreter.type.dimen.FixedDimen)
public void setTargetDepth(FixedDimen depth)
depth
- the target depth to set.public void setTargetHeight(FixedDimen height)
height
- the target height to set.public void setTargetWidth(FixedDimen width)
width
- the target width to set.public int size()
NodeList
.
size
in interface NodeList
NodeList
public java.lang.String toString()
AbstractNode
toString
in class AbstractNode
Object.toString()
public void toString(java.lang.StringBuffer sb, java.lang.String prefix, int breadth, int depth)
NodeList
toString
in interface NodeList
toString
in class AbstractNode
Node.toString(java.lang.StringBuffer,
java.lang.String, int, int)
public java.lang.String toText()
public void toText(java.lang.StringBuffer sb, java.lang.String prefix)
Node
toText
in interface Node
toText
in class AbstractNode
sb
- the output string bufferprefix
- the string prepended to each line of the resulting textNode.toText(java.lang.StringBuffer,
java.lang.String)
public java.lang.Object visit(NodeVisitor visitor, java.lang.Object value) throws GeneralException
Node
visit
in interface Node
visitor
- the visitor to applyvalue
- the argument for the visitor
GeneralException
- in case of an errorNode.visit(
de.dante.extex.typesetter.type.NodeVisitor,
java.lang.Object)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |