org.extex.typesetter.type.node
Class LigatureNode

java.lang.Object
  extended by org.extex.typesetter.type.node.AbstractNode
      extended by org.extex.typesetter.type.node.CharNode
          extended by org.extex.typesetter.type.node.LigatureNode
All Implemented Interfaces:
java.io.Serializable, Node

public class LigatureNode
extends CharNode
implements Node

The ligature node represents a ligature of several characters. Ligatures can be build among characters from one common font only. The information where and how to build ligatures comes from the font. The original characters are contained in this node to be restored when required.

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

Field Summary
protected static long serialVersionUID
          The constant serialVersionUID contains the id for serialization.
 
Fields inherited from class org.extex.typesetter.type.node.AbstractNode
NO_CHARS
 
Constructor Summary
LigatureNode(TypesettingContext context, UnicodeChar uc, CharNode left, CharNode right)
          Creates a new object.
 
Method Summary
 int countChars()
          This method determines the number of characters contained in a node.
 CharNode[] getChars()
          Getter for the array of characters enclosed in this node.
 CharNode getLeft()
          Getter for left node.
 CharNode getRight()
          Getter for right node.
 void toString(java.lang.StringBuffer sb, java.lang.String prefix, int breadth, int depth)
          This method returns the printable representation.
 java.lang.Object visit(NodeVisitor visitor, java.lang.Object value)
          This method provides an entry point for the visitor pattern.
 
Methods inherited from class org.extex.typesetter.type.node.CharNode
getCharacter, getSpaceFactor, getTypesettingContext, toText
 
Methods inherited from class org.extex.typesetter.type.node.AbstractNode
addDepthTo, addHeightTo, addWidthTo, advanceNaturalDepth, advanceNaturalHeight, advanceNaturalWidth, atShipping, clone, computeAdjustment, getDepth, getHeight, getLocalizer, getNaturalDepth, getNaturalHeight, getNaturalWidth, getVerticalSize, getWidth, maxDepth, maxHeight, maxWidth, setDepth, setHeight, setWidth, spreadHeight, spreadWidth, toString, toText
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.extex.typesetter.type.Node
addDepthTo, addHeightTo, addWidthTo, atShipping, getDepth, getHeight, getNaturalDepth, getNaturalHeight, getNaturalWidth, 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

LigatureNode

public LigatureNode(TypesettingContext context,
                    UnicodeChar uc,
                    CharNode left,
                    CharNode right)
Creates a new object.

Parameters:
context - the typesetting context
uc - the Unicode character
left - the first node for the ligature
right - the second node for the ligature
See Also:
"TeX – The Program [144]"
Method Detail

countChars

public int countChars()
This method determines the number of characters contained in a node.

Specified by:
countChars in interface Node
Overrides:
countChars in class CharNode
Returns:
the number of characters contained
See Also:
Node.countChars()

getChars

public CharNode[] getChars()
Getter for the array of characters enclosed in this node.

Specified by:
getChars in interface Node
Overrides:
getChars in class CharNode
Returns:
the array of characters
See Also:
Node.getChars()

getLeft

public CharNode getLeft()
Getter for left node.

Returns:
the left node

getRight

public CharNode getRight()
Getter for right node.

Returns:
the right node

toString

public void toString(java.lang.StringBuffer sb,
                     java.lang.String prefix,
                     int breadth,
                     int depth)
This method returns the printable representation. This is meant to produce a exhaustive form as it is used in tracing output to the log file.

Specified by:
toString in interface Node
Overrides:
toString in class CharNode
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 [193]", Node.toString( java.lang.StringBuffer, java.lang.String, int, int)

visit

public java.lang.Object visit(NodeVisitor visitor,
                              java.lang.Object value)
                       throws GeneralException
This method provides an entry point for the visitor pattern.

Specified by:
visit in interface Node
Overrides:
visit in class CharNode
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( org.extex.typesetter.type.NodeVisitor, java.lang.Object)