org.scilab.forge.jlatexmath
Class FencedAtom

java.lang.Object
  extended by org.scilab.forge.jlatexmath.Atom
      extended by org.scilab.forge.jlatexmath.FencedAtom
All Implemented Interfaces:
java.lang.Cloneable

public class FencedAtom
extends Atom

An atom representing a base atom surrounded with delimiters that change their size according to the height of the base.


Field Summary
 
Fields inherited from class org.scilab.forge.jlatexmath.Atom
type, type_limits
 
Constructor Summary
FencedAtom(Atom base, SymbolAtom l, MiddleAtom m, SymbolAtom r)
           
FencedAtom(Atom base, SymbolAtom l, SymbolAtom r)
          Creates a new FencedAtom from the given base and delimiters
 
Method Summary
 Box createBox(TeXEnvironment env)
          Convert this atom into a Box, using properties set by "parent" atoms, like the TeX style, the last used font, color settings, ...
 int getLeftType()
          Get the type of the leftermost child atom.
 int getRightType()
          Get the type of the rightermost child atom.
 
Methods inherited from class org.scilab.forge.jlatexmath.Atom
clone
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FencedAtom

public FencedAtom(Atom base,
                  SymbolAtom l,
                  SymbolAtom r)
Creates a new FencedAtom from the given base and delimiters

Parameters:
base - the base to be surrounded with delimiters
l - the left delimiter
r - the right delimiter

FencedAtom

public FencedAtom(Atom base,
                  SymbolAtom l,
                  MiddleAtom m,
                  SymbolAtom r)
Method Detail

getLeftType

public int getLeftType()
Description copied from class: Atom
Get the type of the leftermost child atom. Most atoms have no child atoms, so the "left type" and the "right type" are the same: the atom's type. This also is the default implementation. But Some atoms are composed of child atoms put one after another in a horizontal row. These atoms must override this method.

Overrides:
getLeftType in class Atom
Returns:
the type of the leftermost child atom

getRightType

public int getRightType()
Description copied from class: Atom
Get the type of the rightermost child atom. Most atoms have no child atoms, so the "left type" and the "right type" are the same: the atom's type. This also is the default implementation. But Some atoms are composed of child atoms put one after another in a horizontal row. These atoms must override this method.

Overrides:
getRightType in class Atom
Returns:
the type of the rightermost child atom

createBox

public Box createBox(TeXEnvironment env)
Description copied from class: Atom
Convert this atom into a Box, using properties set by "parent" atoms, like the TeX style, the last used font, color settings, ...

Specified by:
createBox in class Atom
Parameters:
env - the current environment settings
Returns:
the resulting box.