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

public final Class CharacterCommandHandler

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

This handles simple commands that essentially just stand in for single-character identifiers that don't have any particular meaning when used in MATH mode (e.g. '$').

In TEXT mode, the resulting character is appending to the DOM directly.

In MATH mode, the character is wrapped inside an mi element.

Author
David McKain
Version
$Revision$

Field Summary

Modifier and TypeField and Description
private final String

Constructor Summary

AccessConstructor and Description
public
CharacterCommandHandler(final String outputCharacter)

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

outputCharacterback to summary
private final String outputCharacter

Constructor Detail

CharacterCommandHandlerback to summary
public CharacterCommandHandler(final String outputCharacter)

Method Detail

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

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.