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

java.lang.Object
  extended byde.dante.extex.typesetter.type.noad.ChoiceNoad
All Implemented Interfaces:
Noad

public class ChoiceNoad
extends java.lang.Object
implements Noad

This noad provides a switch construction depending on the current style.

Version:
$Revision: 1.17 $
Author:
Gerd Neugebauer
See Also:
"TTP [689]"

Constructor Summary
ChoiceNoad(Noad displayMath, Noad textMath, Noad scriptMath, Noad scriptscriptMath)
          Creates a new object.
 
Method Summary
 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.
 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, toString, wait, wait, wait
 

Constructor Detail

ChoiceNoad

public ChoiceNoad(Noad displayMath,
                  Noad textMath,
                  Noad scriptMath,
                  Noad scriptscriptMath)
Creates a new object.

Parameters:
displayMath - the noads used in display style
textMath - the noads used in text style
scriptMath - the noads used in script style
scriptscriptMath - the noads used in scriptscript style
Method Detail

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()

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 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)
Description copied from interface: Noad
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 [695]", 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:
"TTP [731]", 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)