org.scilab.forge.jlatexmath
Class SymbolAtom

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

public class SymbolAtom
extends CharSymbol

A box representing a symbol (a non-alphanumeric character).


Field Summary
static java.util.Map<java.lang.String,SymbolAtom> symbols
           
 
Fields inherited from class org.scilab.forge.jlatexmath.Atom
type, type_limits
 
Constructor Summary
SymbolAtom(java.lang.String name, int type, boolean del)
          Constructs a new symbol.
SymbolAtom(SymbolAtom s, int type)
           
 
Method Summary
static void addSymbolAtom(SymbolAtom sym)
           
 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, ...
static SymbolAtom get(java.lang.String name)
          Looks up the name in the table and returns the corresponding SymbolAtom representing the symbol (if it's found).
 CharFont getCharFont(TeXFont tf)
          Get the CharFont-object that uniquely identifies the character that is represented by this atom.
 java.lang.String getName()
           
 boolean isDelimiter()
           
 
Methods inherited from class org.scilab.forge.jlatexmath.CharSymbol
isMarkedAsTextSymbol, markAsTextSymbol, removeMark
 
Methods inherited from class org.scilab.forge.jlatexmath.Atom
clone, getLeftType, getRightType
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

symbols

public static java.util.Map<java.lang.String,SymbolAtom> symbols
Constructor Detail

SymbolAtom

public SymbolAtom(SymbolAtom s,
                  int type)
           throws InvalidSymbolTypeException
Throws:
InvalidSymbolTypeException

SymbolAtom

public SymbolAtom(java.lang.String name,
                  int type,
                  boolean del)
Constructs a new symbol. This used by "TeXSymbolParser" and the symbol types are guaranteed to be valid.

Parameters:
name - symbol name
type - symbol type constant
del - whether the symbol is a delimiter
Method Detail

addSymbolAtom

public static void addSymbolAtom(SymbolAtom sym)

get

public static SymbolAtom get(java.lang.String name)
                      throws SymbolNotFoundException
Looks up the name in the table and returns the corresponding SymbolAtom representing the symbol (if it's found).

Parameters:
name - the name of the symbol
Returns:
a SymbolAtom representing the found symbol
Throws:
SymbolNotFoundException - if no symbol with the given name was found

isDelimiter

public boolean isDelimiter()
Returns:
true if this symbol can act as a delimiter to embrace formulas

getName

public java.lang.String getName()

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.

getCharFont

public CharFont getCharFont(TeXFont tf)
Description copied from class: CharSymbol
Get the CharFont-object that uniquely identifies the character that is represented by this atom.

Specified by:
getCharFont in class CharSymbol
Parameters:
tf - the TeXFont containing all font related information
Returns: