org.extex.engine.typesetter.page
Class PageFactoryNodeVisitor

java.lang.Object
  extended by org.extex.engine.typesetter.page.PageFactoryNodeVisitor
All Implemented Interfaces:
LogEnabled, NodeVisitor<Node,java.lang.Boolean>

public class PageFactoryNodeVisitor
extends java.lang.Object
implements NodeVisitor<Node,java.lang.Boolean>, LogEnabled

This interface describes a NodeVisitor which is able to take a Page, a Context, and a Typesetter.

Version:
$Revision: 5837 $
Author:
Gerd Neugebauer

Constructor Summary
PageFactoryNodeVisitor()
          Creates a new object.
 
Method Summary
 void enableLogging(java.util.logging.Logger log)
          Setter for the logger.
 void reset(Page page, Context context, Typesetter typesetter)
          Reset the internal to start with a new page.
 Node visitAdjust(AdjustNode node, java.lang.Boolean isHMode)
          This method is called when an AdjustNode has been encountered.
 Node visitAfterMath(AfterMathNode node, java.lang.Boolean isHMode)
          This method is called when an AfterMathNode has been encountered.
 Node visitAlignedLeaders(AlignedLeadersNode node, java.lang.Boolean isHMode)
          This method is called when an AlignedLeadersNode has been encountered.
 Node visitBeforeMath(BeforeMathNode node, java.lang.Boolean isHMode)
          This method is called when a BeforeMathNode has been encountered.
 Node visitCenteredLeaders(CenteredLeadersNode node, java.lang.Boolean isHMode)
          This method is called when a CenteredLeadersNode has been encountered.
 Node visitChar(CharNode node, java.lang.Boolean isHMode)
          This method is called when a CharNode has been encountered.
 Node visitDiscretionary(DiscretionaryNode node, java.lang.Boolean isHMode)
          This method is called when a DiscretionaryNode has been encountered.
 Node visitExpandedLeaders(ExpandedLeadersNode node, java.lang.Boolean isHMode)
          This method is called when an ExpandedLeadersNode has been encountered.
 Node visitGlue(GlueNode node, java.lang.Boolean isHMode)
          This method is called when a GlueNode has been encountered.
 Node visitHorizontalList(HorizontalListNode list, java.lang.Boolean isHMode)
          This method is called when a HorizontalListNode has been encountered.
 Node visitInsertion(InsertionNode node, java.lang.Boolean isHMode)
          This method is called when an InsertionNode has been encountered.
 Node visitKern(KernNode node, java.lang.Boolean isHMode)
          This method is called when a KernNode has been encountered.
 Node visitLigature(LigatureNode node, java.lang.Boolean isHMode)
          This method is called when a LigatureNode has been encountered.
 Node visitMark(MarkNode node, java.lang.Boolean isHMode)
          This method is called when a MarkNode has been encountered.
 Node visitPenalty(PenaltyNode node, java.lang.Boolean isHMode)
          This method is called when a PenaltyNode has been encountered.
 Node visitRule(RuleNode node, java.lang.Boolean isHMode)
          This method is called when a RuleNode has been encountered.
 Node visitSpace(SpaceNode node, java.lang.Boolean isHMode)
          This method is called when a SpaceNode has been encountered.
 Node visitVerticalList(VerticalListNode list, java.lang.Boolean isHMode)
          This method is called when a VerticalListNode has been encountered.
 Node visitVirtualChar(VirtualCharNode node, java.lang.Boolean isHMode)
          This method is called when a VirtualCharNode has been encountered.
 Node visitWhatsIt(WhatsItNode node, java.lang.Boolean isHMode)
          This method is called when a WhatsItNode has been encountered.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PageFactoryNodeVisitor

public PageFactoryNodeVisitor()
Creates a new object.

Method Detail

enableLogging

public void enableLogging(java.util.logging.Logger log)
Setter for the logger.

Specified by:
enableLogging in interface LogEnabled
Parameters:
log - the logger to use
See Also:
LogEnabled.enableLogging( java.util.logging.Logger)

reset

public void reset(Page page,
                  Context context,
                  Typesetter typesetter)
Reset the internal to start with a new page.

Parameters:
page - the page
context - the context
typesetter - the typesetter

visitAdjust

public Node visitAdjust(AdjustNode node,
                        java.lang.Boolean isHMode)
                 throws GeneralException
This method is called when an AdjustNode has been encountered.

Specified by:
visitAdjust in interface NodeVisitor<Node,java.lang.Boolean>
Parameters:
node - the first parameter for the visitor is the node visited
isHMode - the second parameter for the visitor
Returns:
the visitor specific value
Throws:
GeneralException - in case of an error
See Also:
NodeVisitor.visitAdjust( org.extex.typesetter.type.node.AdjustNode, java.lang.Object)

visitAfterMath

public Node visitAfterMath(AfterMathNode node,
                           java.lang.Boolean isHMode)
                    throws GeneralException
This method is called when an AfterMathNode has been encountered.

Specified by:
visitAfterMath in interface NodeVisitor<Node,java.lang.Boolean>
Parameters:
node - the first parameter for the visitor is the node visited
isHMode - the second parameter for the visitor
Returns:
the visitor specific value
Throws:
GeneralException - in case of an error
See Also:
NodeVisitor.visitAfterMath( org.extex.typesetter.type.node.AfterMathNode, java.lang.Object)

visitAlignedLeaders

public Node visitAlignedLeaders(AlignedLeadersNode node,
                                java.lang.Boolean isHMode)
                         throws GeneralException
This method is called when an AlignedLeadersNode has been encountered.

Specified by:
visitAlignedLeaders in interface NodeVisitor<Node,java.lang.Boolean>
Parameters:
node - the first parameter for the visitor is the node visited
isHMode - the second parameter for the visitor
Returns:
the visitor specific value
Throws:
GeneralException - in case of an error
See Also:
NodeVisitor.visitAlignedLeaders( org.extex.typesetter.type.node.AlignedLeadersNode, java.lang.Object)

visitBeforeMath

public Node visitBeforeMath(BeforeMathNode node,
                            java.lang.Boolean isHMode)
                     throws GeneralException
This method is called when a BeforeMathNode has been encountered.

Specified by:
visitBeforeMath in interface NodeVisitor<Node,java.lang.Boolean>
Parameters:
node - the first parameter for the visitor is the node visited
isHMode - the second parameter for the visitor
Returns:
the visitor specific value
Throws:
GeneralException - in case of an error
See Also:
NodeVisitor.visitBeforeMath( org.extex.typesetter.type.node.BeforeMathNode, java.lang.Object)

visitCenteredLeaders

public Node visitCenteredLeaders(CenteredLeadersNode node,
                                 java.lang.Boolean isHMode)
                          throws GeneralException
This method is called when a CenteredLeadersNode has been encountered.

Specified by:
visitCenteredLeaders in interface NodeVisitor<Node,java.lang.Boolean>
Parameters:
node - the first parameter for the visitor is the node visited
isHMode - the second parameter for the visitor
Returns:
the visitor specific value
Throws:
GeneralException - in case of an error
See Also:
NodeVisitor.visitCenteredLeaders( org.extex.typesetter.type.node.CenteredLeadersNode, java.lang.Object)

visitChar

public Node visitChar(CharNode node,
                      java.lang.Boolean isHMode)
               throws GeneralException
This method is called when a CharNode has been encountered.

Specified by:
visitChar in interface NodeVisitor<Node,java.lang.Boolean>
Parameters:
node - the first parameter for the visitor is the node visited
isHMode - the second parameter for the visitor
Returns:
the visitor specific value
Throws:
GeneralException - in case of an error
See Also:
NodeVisitor.visitChar( org.extex.typesetter.type.node.CharNode, java.lang.Object)

visitDiscretionary

public Node visitDiscretionary(DiscretionaryNode node,
                               java.lang.Boolean isHMode)
                        throws GeneralException
This method is called when a DiscretionaryNode has been encountered.

Specified by:
visitDiscretionary in interface NodeVisitor<Node,java.lang.Boolean>
Parameters:
node - the first parameter for the visitor is the node visited
isHMode - the second parameter for the visitor
Returns:
the visitor specific value
Throws:
GeneralException - in case of an error
See Also:
NodeVisitor.visitDiscretionary( org.extex.typesetter.type.node.DiscretionaryNode, java.lang.Object)

visitExpandedLeaders

public Node visitExpandedLeaders(ExpandedLeadersNode node,
                                 java.lang.Boolean isHMode)
                          throws GeneralException
This method is called when an ExpandedLeadersNode has been encountered.

Specified by:
visitExpandedLeaders in interface NodeVisitor<Node,java.lang.Boolean>
Parameters:
node - the first parameter for the visitor is the node visited
isHMode - the second parameter for the visitor
Returns:
the visitor specific value
Throws:
GeneralException - in case of an error
See Also:
NodeVisitor.visitExpandedLeaders( org.extex.typesetter.type.node.ExpandedLeadersNode, java.lang.Object)

visitGlue

public Node visitGlue(GlueNode node,
                      java.lang.Boolean isHMode)
               throws GeneralException
This method is called when a GlueNode has been encountered.

Specified by:
visitGlue in interface NodeVisitor<Node,java.lang.Boolean>
Parameters:
node - the first parameter for the visitor is the node visited
isHMode - the second parameter for the visitor
Returns:
the visitor specific value
Throws:
GeneralException - in case of an error
See Also:
NodeVisitor.visitGlue( org.extex.typesetter.type.node.GlueNode, java.lang.Object)

visitHorizontalList

public Node visitHorizontalList(HorizontalListNode list,
                                java.lang.Boolean isHMode)
                         throws GeneralException
This method is called when a HorizontalListNode has been encountered.

Specified by:
visitHorizontalList in interface NodeVisitor<Node,java.lang.Boolean>
Parameters:
list - the first parameter for the visitor is the node visited
isHMode - the second parameter for the visitor
Returns:
the visitor specific value
Throws:
GeneralException - in case of an error
See Also:
NodeVisitor.visitHorizontalList( org.extex.typesetter.type.node.HorizontalListNode, java.lang.Object)

visitInsertion

public Node visitInsertion(InsertionNode node,
                           java.lang.Boolean isHMode)
                    throws GeneralException
This method is called when an InsertionNode has been encountered.

Specified by:
visitInsertion in interface NodeVisitor<Node,java.lang.Boolean>
Parameters:
node - the first parameter for the visitor is the node visited
isHMode - the second parameter for the visitor
Returns:
the visitor specific value
Throws:
GeneralException - in case of an error
See Also:
NodeVisitor.visitInsertion( org.extex.typesetter.type.node.InsertionNode, java.lang.Object)

visitKern

public Node visitKern(KernNode node,
                      java.lang.Boolean isHMode)
               throws GeneralException
This method is called when a KernNode has been encountered.

Specified by:
visitKern in interface NodeVisitor<Node,java.lang.Boolean>
Parameters:
node - the first parameter for the visitor is the node visited
isHMode - the second parameter for the visitor
Returns:
the visitor specific value
Throws:
GeneralException - in case of an error
See Also:
NodeVisitor.visitKern( org.extex.typesetter.type.node.KernNode, java.lang.Object)

visitLigature

public Node visitLigature(LigatureNode node,
                          java.lang.Boolean isHMode)
                   throws GeneralException
This method is called when a LigatureNode has been encountered.

Specified by:
visitLigature in interface NodeVisitor<Node,java.lang.Boolean>
Parameters:
node - the first parameter for the visitor is the node visited
isHMode - the second parameter for the visitor
Returns:
the visitor specific value
Throws:
GeneralException - in case of an error
See Also:
NodeVisitor.visitLigature( org.extex.typesetter.type.node.LigatureNode, java.lang.Object)

visitMark

public Node visitMark(MarkNode node,
                      java.lang.Boolean isHMode)
               throws GeneralException
This method is called when a MarkNode has been encountered.

Specified by:
visitMark in interface NodeVisitor<Node,java.lang.Boolean>
Parameters:
node - the first parameter for the visitor is the node visited
isHMode - the second parameter for the visitor
Returns:
the visitor specific value
Throws:
GeneralException - in case of an error
See Also:
NodeVisitor.visitMark( org.extex.typesetter.type.node.MarkNode, java.lang.Object)

visitPenalty

public Node visitPenalty(PenaltyNode node,
                         java.lang.Boolean isHMode)
                  throws GeneralException
This method is called when a PenaltyNode has been encountered.

Specified by:
visitPenalty in interface NodeVisitor<Node,java.lang.Boolean>
Parameters:
node - the first parameter for the visitor is the node visited
isHMode - the second parameter for the visitor
Returns:
the visitor specific value
Throws:
GeneralException - in case of an error
See Also:
NodeVisitor.visitPenalty( org.extex.typesetter.type.node.PenaltyNode, java.lang.Object)

visitRule

public Node visitRule(RuleNode node,
                      java.lang.Boolean isHMode)
               throws GeneralException
This method is called when a RuleNode has been encountered.

Specified by:
visitRule in interface NodeVisitor<Node,java.lang.Boolean>
Parameters:
node - the first parameter for the visitor is the node visited
isHMode - the second parameter for the visitor
Returns:
the visitor specific value
Throws:
GeneralException - in case of an error
See Also:
NodeVisitor.visitRule( org.extex.typesetter.type.node.RuleNode, java.lang.Object)

visitSpace

public Node visitSpace(SpaceNode node,
                       java.lang.Boolean isHMode)
                throws GeneralException
This method is called when a SpaceNode has been encountered.

Specified by:
visitSpace in interface NodeVisitor<Node,java.lang.Boolean>
Parameters:
node - the first parameter for the visitor is the node visited
isHMode - the second parameter for the visitor
Returns:
the visitor specific value
Throws:
GeneralException - in case of an error
See Also:
NodeVisitor.visitSpace( org.extex.typesetter.type.node.SpaceNode, java.lang.Object)

visitVerticalList

public Node visitVerticalList(VerticalListNode list,
                              java.lang.Boolean isHMode)
                       throws GeneralException
This method is called when a VerticalListNode has been encountered.

Specified by:
visitVerticalList in interface NodeVisitor<Node,java.lang.Boolean>
Parameters:
list - the first parameter for the visitor is the node visited
isHMode - the second parameter for the visitor
Returns:
the visitor specific value
Throws:
GeneralException - in case of an error
See Also:
NodeVisitor.visitVerticalList( org.extex.typesetter.type.node.VerticalListNode, java.lang.Object)

visitVirtualChar

public Node visitVirtualChar(VirtualCharNode node,
                             java.lang.Boolean isHMode)
                      throws GeneralException
This method is called when a VirtualCharNode has been encountered.

Specified by:
visitVirtualChar in interface NodeVisitor<Node,java.lang.Boolean>
Parameters:
node - the first parameter for the visitor is the node visited
isHMode - the second parameter for the visitor
Returns:
the visitor specific value
Throws:
GeneralException - in case of an error
See Also:
NodeVisitor.visitVirtualChar( org.extex.typesetter.type.node.VirtualCharNode, java.lang.Object)

visitWhatsIt

public Node visitWhatsIt(WhatsItNode node,
                         java.lang.Boolean isHMode)
                  throws GeneralException
This method is called when a WhatsItNode has been encountered.

Specified by:
visitWhatsIt in interface NodeVisitor<Node,java.lang.Boolean>
Parameters:
node - the first parameter for the visitor is the node visited
isHMode - the second parameter for the visitor
Returns:
the visitor specific value
Throws:
GeneralException - in case of an error
See Also:
NodeVisitor.visitWhatsIt( org.extex.typesetter.type.node.WhatsItNode, java.lang.Object)