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

public final Class TabularHandler

extends Object
implements CommandHandler, EnvironmentHandler
Class Inheritance
All Implemented Interfaces
uk.ac.ed.ph.snuggletex.dombuilding.EnvironmentHandler, uk.ac.ed.ph.snuggletex.dombuilding.CommandHandler
Imports
uk.ac.ed.ph.snuggletex.SnuggleLogicException, uk.ac.ed.ph.snuggletex.definitions.CoreErrorCode, .CorePackageDefinitions, uk.ac.ed.ph.snuggletex.internal.DOMBuilder, .SnuggleParseException, uk.ac.ed.ph.snuggletex.tokens.ArgumentContainerToken, .CommandToken, .EnvironmentToken, .ErrorToken, .FlowToken, .TokenType, java.util.ArrayList, .List, org.w3c.dom.Element

Handles the (rather complex) tabular environment. It also handles the \\hline command. FIXME: This is legal inside $\mbox{...}$ so needs to output MathML in this case. Eeek!!! FIXME: No support for \vline and friends!!!
Author
David McKain
Version
$Revision$

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected static int[]

Returns:

{ rowCount, columnCount } pair
computeTableDimensions
(ArgumentContainerToken
content of the tabular environment.
tableContent
)

Computes the dimensions of the table by looking at its content.

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

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

The command matched here is \\hline.

public void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

TabularHandlerback to summary
public TabularHandler()

Method Detail

computeTableDimensionsback to summary
protected static int[] computeTableDimensions(ArgumentContainerToken tableContent)

Computes the dimensions of the table by looking at its content.

Parameters
tableContent:ArgumentContainerToken

content of the tabular environment.

Returns:int[]

{ rowCount, columnCount } pair

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

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

The command matched here is \\hline.

This case will have been dealt with explicitly by the tabular environment when used correctly so, if we end up here, then client has made a boo-boo.

Exceptions
SnuggleParseException:

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

to indicate a client error

handleEnvironmentback to summary
public void handleEnvironment(DOMBuilder builder, Element parentElement, EnvironmentToken token) throws SnuggleParseException

Implements uk.ac.ed.ph.snuggletex.dombuilding.EnvironmentHandler.handleEnvironment.

Doc from uk.ac.ed.ph.snuggletex.dombuilding.EnvironmentHandler.handleEnvironment.

Called when a CommandToken is being handled by the DOMBuilder.