de.dante.extex.typesetter.type.noad
Class MathGlyph

java.lang.Object
  extended byde.dante.extex.typesetter.type.noad.MathGlyph
All Implemented Interfaces:
Noad, java.io.Serializable

public class MathGlyph
extends java.lang.Object
implements Noad, java.io.Serializable

This class provides a container for a mathematical glyph.

Version:
$Revision: 1.19 $
Author:
Gerd Neugebauer
See Also:
Serialized Form

Field Summary
protected static long serialVersionUID
          The constant serialVersionUID contains the id for serialization.
 
Constructor Summary
MathGlyph(int family, UnicodeChar character)
          Creates a new object.
 
Method Summary
 UnicodeChar getCharacter()
          Getter for character.
 int getFamily()
          Getter for family.
 MathSpacing getSpacingClass()
          Getter for spacing class.
 Noad getSubscript()
          Getter for the subscript.
 Noad getSuperscript()
          Getter for the superscript.
 void setSubscript(Noad subscript)
          Setter for the subscript.
 void setSuperscript(Noad superscript)
          Setter for the superscript.
 java.lang.String toString()
           
 void toString(java.lang.StringBuffer sb)
          Produce a printable representation of the noad in a StringBuffer.
 void toString(java.lang.StringBuffer sb, int depth)
          Produce a printable representation to a certain depth of the noad.
 void typeset(Noad previousNoad, NoadList noads, int index, NodeList list, MathContext mathContext, java.util.logging.Logger logger)
          Translate a Noad into a NodeList.
 
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

MathGlyph

public MathGlyph(int family,
                 UnicodeChar character)
Creates a new object.

Parameters:
family - the math family of the glyph
character - the character in the font
Method Detail

getCharacter

public UnicodeChar getCharacter()
Getter for character.

Returns:
the character.

getFamily

public int getFamily()
Getter for family.

Returns:
the family.

getSubscript

public Noad getSubscript()
Description copied from interface: Noad
Getter for the subscript.

Specified by:
getSubscript in interface Noad
Returns:
the subscript.
See Also:
Noad.getSubscript()

getSuperscript

public Noad getSuperscript()
Description copied from interface: Noad
Getter for the superscript.

Specified by:
getSuperscript in interface Noad
Returns:
the superscript.
See Also:
Noad.getSuperscript()

setSubscript

public void setSubscript(Noad subscript)
Description copied from interface: Noad
Setter for the subscript.

Specified by:
setSubscript in interface Noad
Parameters:
subscript - the subscript to set.
See Also:
Noad.setSubscript( de.dante.extex.typesetter.type.noad.Noad)

setSuperscript

public void setSuperscript(Noad superscript)
Description copied from interface: Noad
Setter for the superscript.

Specified by:
setSuperscript in interface Noad
Parameters:
superscript - the superscript to set.
See Also:
Noad.setSuperscript( de.dante.extex.typesetter.type.noad.Noad)

toString

public java.lang.String toString()
See Also:
Object.toString()

toString

public void toString(java.lang.StringBuffer sb)
Description copied from interface: Noad
Produce a printable representation of the noad in a StringBuffer.

Specified by:
toString in interface Noad
Parameters:
sb - the string buffer
See Also:
Noad.toString( java.lang.StringBuffer)

toString

public void toString(java.lang.StringBuffer sb,
                     int depth)
Produce a printable representation to a certain depth of the noad.

Specified by:
toString in interface Noad
Parameters:
sb - the string buffer
depth - the depth to which the full information should be given
See Also:
"TTP [691]", Noad.toString( java.lang.StringBuffer, int)

typeset

public void typeset(Noad previousNoad,
                    NoadList noads,
                    int index,
                    NodeList list,
                    MathContext mathContext,
                    java.util.logging.Logger logger)
             throws TypesetterException,
                    ConfigurationException
Description copied from interface: Noad
Translate a Noad into a NodeList.

Specified by:
typeset in interface Noad
Parameters:
previousNoad - the previous noad
noads - the list of noads currently processed
index - the index of the current node in the list
list - the list to add the nodes to. This list contains the Nodes previously typeset. Thus it can be used to look back
mathContext - the context to consider
logger - the logger for debugging and tracing information
Throws:
ConfigurationException - in case of a configuration problem
TypesetterException - in case of a problem
See Also:
Noad.typeset( de.dante.extex.typesetter.type.noad.Noad, de.dante.extex.typesetter.type.noad.NoadList, int, de.dante.extex.typesetter.type.NodeList, de.dante.extex.typesetter.type.noad.util.MathContext, java.util.logging.Logger)

getSpacingClass

public MathSpacing getSpacingClass()
Description copied from interface: Noad
Getter for spacing class.

Specified by:
getSpacingClass in interface Noad
Returns:
the spacing class
See Also:
Noad.getSpacingClass()