fmrisc.Communication
Class PrettyMathML

java.lang.Object
  extended by fmrisc.Communication.PrettyMathML

public final class PrettyMathML
extends java.lang.Object

Conversion of AST to HTML/MathML presentation markup (pretty-printed).


Field Summary
static int WIDTH
           
 
Constructor Summary
PrettyMathML(org.w3c.dom.Document document)
          Create converter that creates DOM nodes in the specified document.
PrettyMathML(org.w3c.dom.Document document, int width)
          Create converter that creates DOM nodes in the specified document.
 
Method Summary
 void appendDecl(org.w3c.dom.Node parent, Declaration object)
          Convert declaration to DOM representation of HTML/MathML markup.
 void appendExp(org.w3c.dom.Node parent, Expression exp)
          Convert expression to DOM representation of HTML/MathML markup.
 void appendTypedIdentifier(org.w3c.dom.Node parent, TypedIdentifier object)
          Convert typed identifier to DOM representation of HTML/MathML markup.
 void changeLevel(boolean increase, fmrisc.Communication.PrettyMathML.Parent parent)
          Change indentation level.
 void newLine(fmrisc.Communication.PrettyMathML.Parent parent)
          Start new (non-overflow)line and indent it appropriately.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

WIDTH

public static final int WIDTH
See Also:
Constant Field Values
Constructor Detail

PrettyMathML

public PrettyMathML(org.w3c.dom.Document document,
                    int width)
Create converter that creates DOM nodes in the specified document.

Parameters:
width - the maximum line width (suggestion, not a hard bound).
document - the document in which to create the DOM nodes.

PrettyMathML

public PrettyMathML(org.w3c.dom.Document document)
Create converter that creates DOM nodes in the specified document.

Parameters:
document - the document in which to create the DOM nodes.
Method Detail

appendDecl

public void appendDecl(org.w3c.dom.Node parent,
                       Declaration object)
Convert declaration to DOM representation of HTML/MathML markup.

Parameters:
parent - the node to which the representation is appended.
object - the declaration to be converted.

appendExp

public void appendExp(org.w3c.dom.Node parent,
                      Expression exp)
Convert expression to DOM representation of HTML/MathML markup.

Parameters:
parent - the node to which the representation is appended.
exp - the expression to convert.

appendTypedIdentifier

public void appendTypedIdentifier(org.w3c.dom.Node parent,
                                  TypedIdentifier object)
Convert typed identifier to DOM representation of HTML/MathML markup.

Parameters:
parent - the node to which the representation is appended.
object - the typed identifier to be converted.

changeLevel

public void changeLevel(boolean increase,
                        fmrisc.Communication.PrettyMathML.Parent parent)
Change indentation level.

Parameters:
increase - true if level is increased (decreased otherwise)
parent - the parent node

newLine

public void newLine(fmrisc.Communication.PrettyMathML.Parent parent)
Start new (non-overflow)line and indent it appropriately.

Parameters:
parent - the parent node.