org.extex.typesetter
Interface ListMaker

All Known Subinterfaces:
NoadConsumer, TokenDelegateListMaker, Typesetter
All Known Implementing Classes:
AbstractListMaker, DisplaymathListMaker, HAlignListMaker, HorizontalListMaker, InnerVerticalListMaker, MathListMaker, NullTypesetterImpl, RestrictedHorizontalListMaker, TypesetterImpl, VerticalListMaker

public interface ListMaker

This interface describes the capabilities of a list maker.

Version:
$Revision: 4404 $
Author:
Gerd Neugebauer
See Also:
"TeX – The Program [211]"

Method Summary
 void add(FixedGlue g)
          Add a glue node to the list.
 void add(Node node)
          Add an arbitrary node to the internal list of nodes gathered so far.
 void addAndAdjust(NodeList list, TypesetterOptions options)
          Add a node list to the current list maker and adjust the spacing between the elements of the list.
 void addSpace(TypesettingContext typesettingContext, FixedCount spacefactor)
          Add a space node to the list.
 void afterParagraph(ParagraphObserver observer)
          Register an observer to be invoked at the end of the paragraph.
 NodeList complete(TypesetterOptions context)
          Close the node list.
 Node getLastNode()
          Access the last node on the list.
 Locator getLocator()
          Getter for the locator.
 Mode getMode()
          Getter for the current mode.
 FixedDimen getPrevDepth()
          Getter for the previous depth parameter.
 long getSpacefactor()
          Getter for the space factor.
 void leftBrace()
          Notification method to deal the case that a left brace has been encountered.
 void par()
          Emit a new paragraph.
 void removeLastNode()
          Removes the last node from the list.
 void rightBrace()
          Notification method to deal the case that a right brace has been encountered.
 void setPrevDepth(FixedDimen pd)
          Setter for the previous depth parameter.
 void setSpacefactor(FixedCount sf)
          Setter for the space factor.
 void showlist(java.lang.StringBuffer sb, long depth, long breadth)
          Print the status for \showlists.
 

Method Detail

add

void add(Node node)
         throws TypesetterException,
                ConfigurationException
Add an arbitrary node to the internal list of nodes gathered so far. The node should not be one of the special nodes treated by methods of their own.

Parameters:
node - the node to add
Throws:
TypesetterException - in case of an error
ConfigurationException - in case of a configuration error

addAndAdjust

void addAndAdjust(NodeList list,
                  TypesetterOptions options)
                  throws TypesetterException,
                         ConfigurationException
Add a node list to the current list maker and adjust the spacing between the elements of the list.

Parameters:
list - the list
options - the options to use
Throws:
TypesetterException - in case of an error
ConfigurationException - in case of a configuration error

add

void add(FixedGlue g)
         throws TypesetterException
Add a glue node to the list.

Parameters:
g - the glue to add
Throws:
TypesetterException - in case of an error

addSpace

void addSpace(TypesettingContext typesettingContext,
              FixedCount spacefactor)
              throws TypesetterException,
                     ConfigurationException
Add a space node to the list.

Parameters:
typesettingContext - the typesetting context for the space
spacefactor - the space factor to use for this space or null to indicate that the default space factor should be used.
Throws:
TypesetterException - in case of an error
ConfigurationException - in case of a configuration error

afterParagraph

void afterParagraph(ParagraphObserver observer)
Register an observer to be invoked at the end of the paragraph.

Parameters:
observer - the observer to register

complete

NodeList complete(TypesetterOptions context)
                  throws TypesetterException,
                         ConfigurationException
Close the node list. This means that everything is done to ship the closed node list to the document writer. Nevertheless the invoking application might decide not to modify the node list and continue processing. In the other case some nodes might be taken from the node list returned by this method. Then the processing has to continue with the reduced node list.

Parameters:
context - the typesetter options mapping a fragment of the interpreter context
Returns:
the node list enclosed in this instance
Throws:
TypesetterException - in case of an error
ConfigurationException - in case of a configuration error

getLastNode

Node getLastNode()
Access the last node on the list.

Returns:
the last node in the current list or null if the list is empty

getLocator

Locator getLocator()
Getter for the locator.

Returns:
the locator

getMode

Mode getMode()
Getter for the current mode.

Returns:
the mode which is one of the values defined in Mode.

getPrevDepth

FixedDimen getPrevDepth()
                        throws TypesetterUnsupportedException
Getter for the previous depth parameter.

Returns:
the previous depth
Throws:
TypesetterUnsupportedException - in case of an error

getSpacefactor

long getSpacefactor()
                    throws TypesetterUnsupportedException
Getter for the space factor.

Returns:
the space factor
Throws:
TypesetterUnsupportedException - in case of an error

leftBrace

void leftBrace()
Notification method to deal the case that a left brace has been encountered.


par

void par()
         throws TypesetterException,
                ConfigurationException
Emit a new paragraph. This might be a noop under certain circumstances.

Throws:
TypesetterException - in case of an error
ConfigurationException - in case of a configuration error

removeLastNode

void removeLastNode()
Removes the last node from the list. If the list is empty then nothing is done.


rightBrace

void rightBrace()
                throws TypesetterException
Notification method to deal the case that a right brace has been encountered.

Throws:
TypesetterException - in case of an error

setPrevDepth

void setPrevDepth(FixedDimen pd)
                  throws TypesetterUnsupportedException
Setter for the previous depth parameter.

Parameters:
pd - the previous depth parameter
Throws:
TypesetterUnsupportedException - in case of an error

setSpacefactor

void setSpacefactor(FixedCount sf)
                    throws TypesetterUnsupportedException,
                           InvalidSpacefactorException
Setter for the space factor.

Parameters:
sf - the space factor to set
Throws:
TypesetterUnsupportedException - in case of an error
InvalidSpacefactorException - in case of an invalid space factor

showlist

void showlist(java.lang.StringBuffer sb,
              long depth,
              long breadth)
Print the status for \showlists.

Parameters:
sb - the target buffer
depth - the depth of the list display
breadth - the breadth of the list display