de.dante.extex.typesetter.type.node
Class AlignedLeadersNode

java.lang.Object
  extended byde.dante.extex.typesetter.type.node.AbstractNode
      extended byde.dante.extex.typesetter.type.node.AbstractExpandableNode
          extended byde.dante.extex.typesetter.type.node.AlignedLeadersNode
All Implemented Interfaces:
Node, java.io.Serializable, SkipNode

public class AlignedLeadersNode
extends AbstractExpandableNode
implements SkipNode

This node represents an aligned leaders node as used by the primitive \leaders.

Version:
$Revision: 1.16 $
Author:
Gerd Neugebauer, Michael Niedermair
See Also:
"TeX – The Program [149]", Serialized Form

Field Summary
protected static long serialVersionUID
          The constant serialVersionUID contains the id for serialization.
 
Fields inherited from class de.dante.extex.typesetter.type.node.AbstractNode
NO_CHARS
 
Constructor Summary
AlignedLeadersNode(Node node, FixedGlue glue, boolean horizontal)
          Creates a new object.
 
Method Summary
 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.
 Node getRepeat()
          Getter for the repeated construction.
 void toString(java.lang.StringBuffer sb, java.lang.String prefix, int breadth, int depth)
          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.AbstractExpandableNode
addDepthTo, addHeightTo, addWidthTo, getSize, setSize, spreadHeight, spreadWidth
 
Methods inherited from class de.dante.extex.typesetter.type.node.AbstractNode
advanceDepth, advanceHeight, advanceWidth, computeAdjustment, countChars, getChars, getDepth, getHeight, getLocalizer, getVerticalSize, getWidth, maxDepth, maxHeight, maxWidth, setDepth, setHeight, setWidth, toString, toText, 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, countChars, getChars, getDepth, getHeight, getVerticalSize, getWidth, setDepth, setHeight, setWidth, spreadHeight, spreadWidth, toText
 

Field Detail

serialVersionUID

protected static final long serialVersionUID
The constant serialVersionUID contains the id for serialization.

See Also:
Constant Field Values
Constructor Detail

AlignedLeadersNode

public AlignedLeadersNode(Node node,
                          FixedGlue glue,
                          boolean horizontal)
Creates a new object.

Parameters:
node - the node or node list to stretch or repeat
glue - the desired size
horizontal - the indicator for the stretchability mode
Method Detail

getRepeat

public Node getRepeat()
Getter for the repeated construction.

Returns:
the repeated node

atShipping

public Node atShipping(Context context,
                       Typesetter typesetter,
                       NodeVisitor visitor,
                       boolean inHMode)
                throws GeneralException
Description copied from interface: Node
This method performs any action which are required to executed at the time of shipping the node to the DocumentWriter. It is a NOOP in the abstract base class and should be overwritten by sub-classes if required.

Specified by:
atShipping in interface Node
Overrides:
atShipping in class AbstractNode
Parameters:
context - the interpreter context
typesetter - the typesetter
visitor - 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 types
inHMode - true iff the container is a horizontal list. Otherwise the container is a vertical list
Returns:
the node to be used instead of the current one in the output list. If the value is null then the node is deleted. If the value is the node itself then it is preserved.
Throws:
GeneralException - in case of an error
See Also:
AbstractNode.atShipping( de.dante.extex.interpreter.context.Context, de.dante.extex.typesetter.Typesetter, de.dante.extex.typesetter.type.NodeVisitor, boolean)

toString

public void toString(java.lang.StringBuffer sb,
                     java.lang.String prefix,
                     int breadth,
                     int depth)
This method puts the printable representation into the string buffer. This is meant to produce a short form only as it is used in error messages to the user.

Specified by:
toString in interface Node
Overrides:
toString in class AbstractNode
Parameters:
sb - the output string buffer
prefix - the prefix string inserted at the beginning of each line
breadth - the breadth
depth - the depth
See Also:
"TeX – The Program [190]", Node.toString( java.lang.StringBuffer, java.lang.String, int, int)

visit

public java.lang.Object visit(NodeVisitor visitor,
                              java.lang.Object value)
                       throws GeneralException
Description copied from interface: Node
This method provides an entry point for the visitor pattern.

Specified by:
visit in interface Node
Parameters:
visitor - the visitor to apply
value - the argument for the visitor
Returns:
the result of the method invocation of the visitor
Throws:
GeneralException - in case of an error
See Also:
Node.visit( de.dante.extex.typesetter.type.NodeVisitor, java.lang.Object)