|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.extex.typesetter.impl.ListMakerFactory
org.extex.typesetter.impl.TypesetterImpl
public class TypesetterImpl
This is a reference implementation of the
Typesetter interface.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.extex.typesetter.impl.ListMakerFactory |
|---|
ListMakerFactory.CC |
| Constructor Summary | |
|---|---|
TypesetterImpl()
Creates a new object and initializes it to receive material. |
|
| Method Summary | |
|---|---|
void |
add(FixedGlue glue)
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 |
buildParagraph(HorizontalListNode nodes)
Invoke the paragraph builder on a list of nodes. |
void |
clearShipoutMark()
Clear the internal state about ship-outs. |
NodeList |
complete(TypesetterOptions context)
Close the node list. |
void |
cr(Context context,
TypesettingContext tc,
UnicodeChar uc)
Process a carriage return. |
void |
enableLogging(java.util.logging.Logger theLogger)
Setter for the logger. |
void |
endParagraph()
End the current paragraph. |
ListMaker |
ensureHorizontalMode(Locator locator)
Switch to horizontal mode if necessary. |
void |
finish()
Instructs the typesetter to perform any actions necessary for cleaning up everything at the end of processing. |
BackendDriver |
getBackendDriver()
Getter for back-end. |
Node |
getLastNode()
Access the last node on the list. |
ListMaker |
getListMaker()
Getter for the current list maker. |
Locator |
getLocator()
Getter for the locator. |
ListManager |
getManager()
Getter for the manager of the list maker stack. |
Mode |
getMode()
Getter for the current mode. |
NodeFactory |
getNodeFactory()
Getter for the NodeFactory. |
TypesetterOptions |
getOptions()
Getter for the options object. |
FixedDimen |
getPrevDepth()
Getter for the previous depth parameter. |
long |
getSpacefactor()
Getter for the space factor. |
boolean |
isShipoutMark()
Query the ship-out mark. |
void |
leftBrace()
Notification method to deal the case that a left brace has been encountered. |
boolean |
letter(UnicodeChar uc,
TypesettingContext tc,
Context context,
TokenSource source,
Locator locator)
Add a letter to the current list or treat it in some other appropriate way. |
void |
mathShift(Context context,
TokenSource source,
Token t)
Treat a math shift character. |
void |
par()
Emit a new paragraph. |
TokenDelegateListMaker |
pop()
Discard the top of the stack of list makers. |
void |
push(ListMaker listMaker)
Push a new element to the stack of list makers. |
ListMaker |
pushListMaker(ListMakerType type,
Locator locator)
Push a list maker onto the stack and return the old value. |
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 |
setBackend(BackendDriver driver)
Setter for the back-end driver. |
void |
setNodeFactory(NodeFactory nodeFactory)
Setter for the node factory. |
void |
setOptions(TypesetterOptions options)
Setter for the typesetter specific options. |
void |
setOutputRoutine(OutputRoutine output)
Setter for the output routine. |
void |
setPageBuilder(PageBuilder pageBuilder)
Setter for the page builder. |
void |
setParagraphBuilder(ParagraphBuilder parBuilder)
Setter for paragraph builder. |
void |
setPrevDepth(FixedDimen pd)
Setter for the previous depth parameter. |
void |
setSpacefactor(FixedCount sf)
Setter for the space factor. |
void |
shipout(NodeList nodes)
This is the entry point for the document writer. |
void |
showlist(java.lang.StringBuffer sb,
long depth,
long breadth)
Print the status for \showlists. |
void |
showlists(java.lang.StringBuffer sb,
long depth,
long breadth)
This method produces a diagnostic representation of the current lists in a StringBuffer. |
void |
subscriptMark(Context context,
TokenSource source,
Typesetter typesetter,
Token t)
Treat a subscript mark. |
void |
superscriptMark(Context context,
TokenSource source,
Typesetter typesetter,
Token t)
Treat a superscript mark. |
void |
tab(Context context,
TokenSource source,
Token t)
Treat a alignment tab character. |
java.lang.String |
toString()
|
| Methods inherited from class org.extex.typesetter.impl.ListMakerFactory |
|---|
createListMaker |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public TypesetterImpl()
| Method Detail |
|---|
public void add(FixedGlue glue)
throws TypesetterException
add in interface ListMakerglue - the glue to add
TypesetterException - in case of an errorListMaker.add( org.extex.core.glue.FixedGlue)
public void add(Node node)
throws TypesetterException
add in interface ListMakernode - the node to add
TypesetterException - in case of an error
ConfigurationException - in case of a configuration errorListMaker.add( org.extex.typesetter.type.Node)
public void addAndAdjust(NodeList list,
TypesetterOptions options)
throws TypesetterException
addAndAdjust in interface ListMakerlist - the listoptions - the options to use
TypesetterException - in case of an error
ConfigurationException - in case of a configuration errorListMaker.addAndAdjust(
org.extex.typesetter.type.NodeList,
org.extex.typesetter.TypesetterOptions)
public void addSpace(TypesettingContext typesettingContext,
FixedCount spacefactor)
throws TypesetterException
addSpace in interface ListMakertypesettingContext - the typesetting context for the spacespacefactor - the space factor to use for this space or
null to indicate that the default space factor
should be used.
TypesetterException - in case of an error
ConfigurationException - in case of a configuration errorListMaker.addSpace(
org.extex.typesetter.tc.TypesettingContext,
FixedCount)public void afterParagraph(ParagraphObserver observer)
afterParagraph in interface ListMakerobserver - the observer to registerListMaker.afterParagraph( ParagraphObserver)
public NodeList buildParagraph(HorizontalListNode nodes)
throws TypesetterException
buildParagraph in interface ListManagernodes - the nodes to make a paragraph from
TypesetterException - in case of an errorListManager.buildParagraph(
org.extex.typesetter.type.node.HorizontalListNode)public void clearShipoutMark()
false.
clearShipoutMark in interface TypesetterisShipoutMark(),
Typesetter.clearShipoutMark()
public NodeList complete(TypesetterOptions context)
throws TypesetterException
complete in interface ListMakercontext - the typesetter options mapping a fragment of the
interpreter context
TypesetterException - in case of an error
ConfigurationException - in case of a configuration errorListMaker.complete(
org.extex.typesetter.TypesetterOptions)
public void cr(Context context,
TypesettingContext tc,
UnicodeChar uc)
throws TypesetterException
cr in interface TokenDelegateListMakercontext - the interpreter contexttc - the typesetting contextuc - the character
TypesetterException - in case of an errorTokenDelegateListMaker.cr(
org.extex.interpreter.context.Context,
org.extex.typesetter.tc.TypesettingContext,
org.extex.core.UnicodeChar)public void enableLogging(java.util.logging.Logger theLogger)
enableLogging in interface LogEnabledtheLogger - the logger to useLogEnabled.enableLogging(
java.util.logging.Logger)
public void endParagraph()
throws TypesetterException
endParagraph in interface ListManagerTypesetterException - in case of an error
ConfigurationException - in case of an configuration problemListManager.endParagraph()
public ListMaker ensureHorizontalMode(Locator locator)
throws TypesetterException
ensureHorizontalMode in interface ListManagerensureHorizontalMode in interface Typesetterlocator - the locator
TypesetterException - in case of an errorListManager.ensureHorizontalMode(
org.extex.core.Locator)
public void finish()
throws TypesetterException
finish in interface TypesetterTypesetterException - in case of an error
ConfigurationException - in case of an configuration problemTypesetter.finish()public BackendDriver getBackendDriver()
getBackendDriver in interface TypesetterTypesetter.getBackendDriver()public Node getLastNode()
getLastNode in interface ListMakernull if the
list is emptyListMaker.getLastNode()public ListMaker getListMaker()
getListMaker in interface Typesetternull if the stack is emptyTypesetter.getListMaker()public Locator getLocator()
getLocator in interface ListMakerListMaker.getLocator()public ListManager getManager()
getManager in interface TypesetterTypesetter.getManager()public Mode getMode()
getMode in interface ListMakerMode.ListMaker.getMode()public NodeFactory getNodeFactory()
getNodeFactory in interface ListManagergetNodeFactory in interface TypesetterTypesetter.getNodeFactory()public TypesetterOptions getOptions()
getOptions in interface ListManagerListManager.getOptions()
public FixedDimen getPrevDepth()
throws TypesetterUnsupportedException
getPrevDepth in interface ListMakerTypesetterUnsupportedException - in case of an errorListMaker.getPrevDepth()
public long getSpacefactor()
throws TypesetterUnsupportedException
getSpacefactor in interface ListMakerTypesetterUnsupportedException - in case of an errorListMaker.getSpacefactor()public boolean isShipoutMark()
clearShipoutMark() can be used to reset the
ship-out mark to false. Initially the ship-out mark is
false.
isShipoutMark in interface Typesettertrue iff there has been an invocation to the
method shipout() since the last
clearingTypesetter.isShipoutMark()public void leftBrace()
leftBrace in interface ListMaker
public boolean letter(UnicodeChar uc,
TypesettingContext tc,
Context context,
TokenSource source,
Locator locator)
throws TypesetterException
letter in interface TokenDelegateListMakeruc - the charactertc - the typesetting contextcontext - the interpreter contextsource - the source for new tokenslocator - the locator
true iff the character has been discarded because
it is not defined in the current font.
TypesetterException - in case of an errorTokenDelegateListMaker.letter(
org.extex.core.UnicodeChar,
org.extex.typesetter.tc.TypesettingContext,
org.extex.interpreter.context.Context,
org.extex.interpreter.TokenSource, org.extex.core.Locator)
public void mathShift(Context context,
TokenSource source,
Token t)
throws TypesetterException,
HelpingException
mathShift in interface TokenDelegateListMakercontext - the interpreter contextsource - the source for new tokenst - the actual math shift character token
TypesetterException - in case of an error
HelpingException - in case of an errorTokenDelegateListMaker.mathShift(
org.extex.interpreter.context.Context,
org.extex.interpreter.TokenSource,
org.extex.scanner.type.token.Token)
public void par()
throws TypesetterException
par in interface ListMakerTypesetterException - in case of an error
ConfigurationException - in case of a configuration errorListMaker.par()
public TokenDelegateListMaker pop()
throws TypesetterException
pop in interface ListManagerTypesetterException - in case of an errorListManager.pop()
public void push(ListMaker listMaker)
throws TypesetterException
push in interface ListManagerpush in interface TypesetterlistMaker - the new element to push
TypesetterException - in case of an errorListManager.push(
org.extex.typesetter.ListMaker)
public ListMaker pushListMaker(ListMakerType type,
Locator locator)
throws java.lang.UnsupportedOperationException,
TypesetterException
pushListMaker in interface Typesettertype - the type of the list makerlocator - the locator
java.lang.UnsupportedOperationException - in case that the type is now known
TypesetterException - in case of an error in the typesetterTypesetter.pushListMaker(
org.extex.typesetter.ListMakerType, org.extex.core.Locator)public void removeLastNode()
removeLastNode in interface ListMakerListMaker.removeLastNode()
public void rightBrace()
throws TypesetterException
rightBrace in interface ListMakerTypesetterException - in case of an errorListMaker.rightBrace()public void setBackend(BackendDriver driver)
setBackend in interface Typesetterdriver - the new back-end driverTypesetter.setBackend(org.extex.backend.BackendDriver)public void setNodeFactory(NodeFactory nodeFactory)
setNodeFactory in interface TypesetternodeFactory - the node factoryTypesetter.setNodeFactory(
org.extex.typesetter.type.node.factory.NodeFactory)public void setOptions(TypesetterOptions options)
setOptions in interface Typesetteroptions - the options to useTypesetter.setOptions(
org.extex.typesetter.TypesetterOptions)public void setOutputRoutine(OutputRoutine output)
setOutputRoutine in interface Typesetteroutput - the output routineTypesetter.setOutputRoutine(
org.extex.typesetter.output.OutputRoutine)public void setPageBuilder(PageBuilder pageBuilder)
setPageBuilder in interface TypesetterpageBuilder - the new page builderTypesetter.setPageBuilder(
org.extex.typesetter.pageBuilder.PageBuilder)public void setParagraphBuilder(ParagraphBuilder parBuilder)
setParagraphBuilder in interface TypesetterparBuilder - the paragraph builder to set.
public void setPrevDepth(FixedDimen pd)
throws TypesetterUnsupportedException
setPrevDepth in interface ListMakerpd - the previous depth parameter
TypesetterUnsupportedException - in case of an errorListMaker.setPrevDepth(
org.extex.core.dimen.FixedDimen)
public void setSpacefactor(FixedCount sf)
throws TypesetterUnsupportedException,
InvalidSpacefactorException
setSpacefactor in interface ListMakersetSpacefactor in interface ListManagersf - the space factor to set
TypesetterUnsupportedException - in case of an error
InvalidSpacefactorException - in case of an invalid space factorListMaker.setSpacefactor(
org.extex.core.count.FixedCount)
public void shipout(NodeList nodes)
throws TypesetterException
shipout in interface Typesetternodes - the nodes to send
TypesetterException - in case of an errorTypesetter.shipout(
org.extex.typesetter.type.NodeList)
public void showlist(java.lang.StringBuffer sb,
long depth,
long breadth)
ListMaker
showlist in interface ListMakersb - the target bufferdepth - the depth of the list displaybreadth - the breadth of the list displayListMaker.showlist(java.lang.StringBuffer,
long, long)
public void showlists(java.lang.StringBuffer sb,
long depth,
long breadth)
showlists in interface Typesettersb - the target string bufferdepth - the depth for the displaybreadth - the breadth of the displayTypesetter.showlists(java.lang.StringBuffer,
long, long)
public void subscriptMark(Context context,
TokenSource source,
Typesetter typesetter,
Token t)
throws TypesetterException,
HelpingException
subscriptMark in interface TokenDelegateListMakercontext - the interpreter contextsource - the source for new tokenstypesetter - the typesettert - the actual sub mark token
TypesetterException - in case of an error
HelpingException - in case of an errorTokenDelegateListMaker.subscriptMark(
org.extex.interpreter.context.Context,
org.extex.interpreter.TokenSource, org.extex.typesetter.Typesetter,
org.extex.scanner.type.token.Token)
public void superscriptMark(Context context,
TokenSource source,
Typesetter typesetter,
Token t)
throws TypesetterException,
HelpingException
superscriptMark in interface TokenDelegateListMakercontext - the interpreter contextsource - the source for new tokenstypesetter - the typesettert - the actual super mark token
TypesetterException - in case of an error
HelpingException - in case of an errorTokenDelegateListMaker.superscriptMark(
org.extex.interpreter.context.Context,
org.extex.interpreter.TokenSource, org.extex.typesetter.Typesetter,
org.extex.scanner.type.token.Token)
public void tab(Context context,
TokenSource source,
Token t)
throws TypesetterException
tab in interface TokenDelegateListMakercontext - the interpreter contextsource - the source for new tokenst - the actual tab token
TypesetterException - in case of an errorTokenDelegateListMaker.tab(
org.extex.interpreter.context.Context,
org.extex.interpreter.TokenSource,
org.extex.scanner.type.token.Token)public java.lang.String toString()
toString in class java.lang.ObjectObject.toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||