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

public final Class MatrixHandler

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

Handles the AMSLaTeX cases and the various matrix environments.

This can only be used in MATH mode and generates a mtable as a result, wrapped inside an mfenced for the matrix/cases delimiters as required.

Author
David McKain
Version
$Revision$

Field Summary

Modifier and TypeField and Description
private final String
closer

Fence Closer, which may be blank.

private final int
maxColumns

Maximum number of allowed columns.

private final String
opener

Fence Opener, which may be blank.

Constructor Summary

AccessConstructor and Description
public
public
MatrixHandler(final String opener, final String closer)

public
MatrixHandler(int maxColumns, final String opener, final String closer)

Method Summary

Modifier and TypeMethod and Description
public void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

closerback to summary
private final String closer

Fence Closer, which may be blank. null indicates "no opener and closer"

maxColumnsback to summary
private final int maxColumns

Maximum number of allowed columns. (Used for cases environment, which is always 2 columns) Zero signifies no restriction.

openerback to summary
private final String opener

Fence Opener, which may be blank. null indicates "no opener and closer"

Constructor Detail

MatrixHandlerback to summary
public MatrixHandler()
MatrixHandlerback to summary
public MatrixHandler(final String opener, final String closer)
MatrixHandlerback to summary
public MatrixHandler(int maxColumns, final String opener, final String closer)

Method Detail

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.