Top Description Fields Constructors Methods
uk.ac.ed.ph.snuggletex.dombuilding

public final Class MathVariantMapHandler

extends Object
implements CommandHandler
Class Inheritance
All Implemented Interfaces
uk.ac.ed.ph.snuggletex.dombuilding.CommandHandler
Imports
uk.ac.ed.ph.snuggletex.internal.util.ArrayListStack, uk.ac.ed.ph.snuggletex.definitions.MathVariantMap, uk.ac.ed.ph.snuggletex.internal.DOMBuilder, .SnuggleParseException, uk.ac.ed.ph.snuggletex.tokens.CommandToken, org.w3c.dom.Element

This handles changes to the current "mathvariant" caused by things like \\mathcal and friends.

Because these commands' argument may consist of multiple tokens, we manage the application of these "styles" within DOMBuilder so all this handler does is push/pop a variant to the appropriate Stack.

Author
David McKain
Version
$Revision$

Field Summary

Modifier and TypeField and Description
private final MathVariantMap

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
handleCommand(DOMBuilder builder, Element parentElement, CommandToken token)

Implements uk.ac.ed.ph.snuggletex.dombuilding.CommandHandler.handleCommand.

Called when a CommandToken is being handled by the DOMBuilder.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

characterMapback to summary
private final MathVariantMap characterMap

Resulting MathVariantMap

Constructor Detail

MathVariantMapHandlerback to summary
public MathVariantMapHandler(final MathVariantMap characterMap)

Method Detail

handleCommandback to summary
public void handleCommand(DOMBuilder builder, Element parentElement, CommandToken token) throws SnuggleParseException

Implements uk.ac.ed.ph.snuggletex.dombuilding.CommandHandler.handleCommand.

Doc from uk.ac.ed.ph.snuggletex.dombuilding.CommandHandler.handleCommand.

Called when a CommandToken is being handled by the DOMBuilder.

Exceptions
SnuggleParseException:
to indicate a client error