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

java.lang.Object
  extended byde.dante.extex.typesetter.type.node.AbstractNode
      extended byde.dante.extex.typesetter.type.node.CharNode
All Implemented Interfaces:
Node, java.io.Serializable
Direct Known Subclasses:
LigatureNode, VirtualCharNode

public class CharNode
extends AbstractNode

This is the Node which carries a single character.

Version:
$Revision: 1.22 $
Author:
Gerd Neugebauer, Michael Niedermair
See Also:
"TeX – The Program [134]", 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
CharNode(TypesettingContext context, UnicodeChar uc)
          Creates a new object.
 
Method Summary
 int countChars()
          This method determines the number of characters contained in a node.
 UnicodeChar getCharacter()
          Getter for character.
 CharNode[] getChars()
          Getter for the array of characters enclosed in this node.
 Glyph getGlyph()
          Deprecated. Try to avoid this method
 int getSpaceFactor()
          Getter for the space factor.
 TypesettingContext getTypesettingContext()
          Getter for typesetting context.
 void toString(java.lang.StringBuffer sb, java.lang.String prefix, int breadth, int depth)
          This method puts the printable representation into the string buffer.
 void toText(java.lang.StringBuffer sb, java.lang.String prefix)
          Puts a text representation of the object into a 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, atShipping, computeAdjustment, getDepth, getHeight, getLocalizer, getVerticalSize, getWidth, maxDepth, maxHeight, maxWidth, setDepth, setHeight, setWidth, spreadHeight, spreadWidth, toString, toText
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

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

See Also:
Constant Field Values
Constructor Detail

CharNode

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

Parameters:
context - the typesetting context
uc - the Unicode character
Method Detail

countChars

public int countChars()
Description copied from interface: Node
This method determines the number of characters contained in a node.

Specified by:
countChars in interface Node
Overrides:
countChars in class AbstractNode
See Also:
Node.countChars()

getCharacter

public UnicodeChar getCharacter()
Getter for character.

Returns:
the character.

getChars

public CharNode[] getChars()
Description copied from interface: Node
Getter for the array of characters enclosed in this node.

Specified by:
getChars in interface Node
Overrides:
getChars in class AbstractNode
See Also:
Node.getChars()

getGlyph

public Glyph getGlyph()
Deprecated. Try to avoid this method

Getter for glyph.

Returns:
the glyph

getSpaceFactor

public int getSpaceFactor()
Getter for the space factor.

Returns:
the space factor

getTypesettingContext

public TypesettingContext getTypesettingContext()
Getter for typesetting context.

Returns:
the typesetting context.

toString

public void toString(java.lang.StringBuffer sb,
                     java.lang.String prefix,
                     int breadth,
                     int depth)
Description copied from interface: Node
This method puts the printable representation into the string buffer. 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 AbstractNode
See Also:
"TeX – The Program [174]", Node.toString( java.lang.StringBuffer, java.lang.String, int, int)

toText

public void toText(java.lang.StringBuffer sb,
                   java.lang.String prefix)
Description copied from class: AbstractNode
Puts a text representation of the object into a string buffer.

Specified by:
toText in interface Node
Overrides:
toText in class AbstractNode
Parameters:
sb - the output string buffer
prefix - the string prepended to each line of the resulting text
See Also:
"TeX – The Program [174]", Node.toText( java.lang.StringBuffer, java.lang.String)

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.

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)