org.extex.typesetter.listMaker
Class InnerVerticalListMaker

java.lang.Object
  extended by org.extex.typesetter.listMaker.AbstractListMaker
      extended by org.extex.typesetter.listMaker.InnerVerticalListMaker
All Implemented Interfaces:
ListMaker, TokenDelegateListMaker
Direct Known Subclasses:
VerticalListMaker

public class InnerVerticalListMaker
extends AbstractListMaker

This is the derived class for a list maker in inner vertical list mode.

Version:
$Revision: 5837 $
Author:
Gerd Neugebauer

Constructor Summary
InnerVerticalListMaker(ListManager manager, Locator locator)
          Creates a new object.
 
Method Summary
 void add(FixedGlue g)
          Add a glue node to the list.
 void add(Node n)
          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.
 void cr(Context context, TypesettingContext tc, UnicodeChar uc)
          Process a carriage return.
 Node getLastNode()
          Access the last node on the list.
 Mode getMode()
          Getter for the current mode.
 FixedDimen getPrevDepth()
          Getter for the previous depth parameter.
 boolean letter(UnicodeChar symbol, TypesettingContext tc, Context context, TokenSource source, Locator locator)
          Add a letter to the current list or treat it in some other appropriate way.
 void par()
          \par s are silently ignored in vertical mode.
 void removeLastNode()
          Removes the last node from the list.
 void setPrevDepth(FixedDimen pd)
          Setter for the previous depth parameter.
 void showlist(java.lang.StringBuffer sb, long l, long m)
          Print the status for \showlists.
 java.lang.String toString()
          Get the string representation of this object for debugging purposes.
 
Methods inherited from class org.extex.typesetter.listMaker.AbstractListMaker
getLocalizer, getLocator, getManager, getMyLocalizer, getSpacefactor, leftBrace, mathShift, rightBrace, setSpacefactor, subscriptMark, superscriptMark, tab
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

InnerVerticalListMaker

public InnerVerticalListMaker(ListManager manager,
                              Locator locator)
Creates a new object.

Parameters:
manager - the manager to ask for global changes
locator - the locator
Method Detail

add

public void add(Node n)
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:
n - the node to add
See Also:
ListMaker.add( org.extex.typesetter.type.Node)

addAndAdjust

public 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
See Also:
ListMaker.addAndAdjust( org.extex.typesetter.type.NodeList, org.extex.typesetter.TypesetterOptions)

add

public 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
See Also:
ListMaker.add( org.extex.core.glue.FixedGlue)

addSpace

public void addSpace(TypesettingContext typesettingContext,
                     FixedCount spacefactor)
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.
See Also:
ListMaker.addSpace( org.extex.typesetter.tc.TypesettingContext, FixedCount)

afterParagraph

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

Parameters:
observer - the observer to register
See Also:
ListMaker.afterParagraph(ParagraphObserver)

complete

public NodeList complete(TypesetterOptions context)
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
See Also:
ListMaker.complete(TypesetterOptions)

cr

public void cr(Context context,
               TypesettingContext tc,
               UnicodeChar uc)
        throws TypesetterException
Process a carriage return.

Parameters:
context - the interpreter context
tc - the typesetting context
uc - the character
Throws:
TypesetterException - in case of an error
See Also:
TokenDelegateListMaker.cr( org.extex.interpreter.context.Context, org.extex.typesetter.tc.TypesettingContext, org.extex.core.UnicodeChar)

getLastNode

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

Returns:
the last node in the current list or null if the list is empty
See Also:
ListMaker.getLastNode()

getMode

public Mode getMode()
Getter for the current mode.

Specified by:
getMode in interface ListMaker
Specified by:
getMode in class AbstractListMaker
Returns:
the mode which is one of the values defined in Mode.
See Also:
ListMaker.getMode()

getPrevDepth

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

Specified by:
getPrevDepth in interface ListMaker
Overrides:
getPrevDepth in class AbstractListMaker
Returns:
the previous depth
Throws:
TypesetterUnsupportedException - in case of an error
See Also:
ListMaker.getPrevDepth()

letter

public boolean letter(UnicodeChar symbol,
                      TypesettingContext tc,
                      Context context,
                      TokenSource source,
                      Locator locator)
               throws TypesetterException
Add a letter to the current list or treat it in some other appropriate way.

Parameters:
symbol - the character
tc - the typesetting context
context - the interpreter context
source - the source for new tokens
locator - the locator
Returns:
true iff the character has been discarded because it is not defined in the current font.
Throws:
TypesetterException - in case of an error
See Also:
TokenDelegateListMaker.letter( org.extex.core.UnicodeChar, org.extex.typesetter.tc.TypesettingContext, org.extex.interpreter.context.Context, org.extex.interpreter.TokenSource, org.extex.core.Locator)

par

public void par()
         throws TypesetterException,
                ConfigurationException
\par s are silently ignored in vertical mode. 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
See Also:
ListMaker.par()

removeLastNode

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

See Also:
ListMaker.removeLastNode()

setPrevDepth

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

Specified by:
setPrevDepth in interface ListMaker
Overrides:
setPrevDepth in class AbstractListMaker
Parameters:
pd - the previous depth parameter
See Also:
ListMaker.setPrevDepth( org.extex.core.dimen.FixedDimen)

showlist

public void showlist(java.lang.StringBuffer sb,
                     long l,
                     long m)
Print the status for \showlists.

Parameters:
sb - the target buffer
l - the depth of the list display
m - the breadth of the list display
See Also:
ListMaker.showlist( java.lang.StringBuffer, long, long)

toString

public java.lang.String toString()
Get the string representation of this object for debugging purposes.

Overrides:
toString in class AbstractListMaker
Returns:
the string representation
See Also:
Object.toString()