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

public final Class ModeDelegatingHandler

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

Trivial "meta"-builder that delegates to a CommandHandler depending on whether we are in MATH or TEXT mode.

This is useful for things like \\underline

Author
David McKain
Version
$Revision$

Field Summary

Modifier and TypeField and Description
private final CommandHandler
private final CommandHandler

Constructor Summary

AccessConstructor and Description
public
ModeDelegatingHandler(final CommandHandler textModeBuilder, final CommandHandler mathModeBuilder)

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

mathModeBuilderback to summary
private final CommandHandler mathModeBuilder
textModeBuilderback to summary
private final CommandHandler textModeBuilder

Constructor Detail

ModeDelegatingHandlerback to summary
public ModeDelegatingHandler(final CommandHandler textModeBuilder, final CommandHandler mathModeBuilder)

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