org.scilab.forge.jlatexmath
Class Dummy

java.lang.Object
  extended by org.scilab.forge.jlatexmath.Dummy

public class Dummy
extends java.lang.Object

Used by RowAtom. The "textSymbol"-property and the type of an atom can change (according to the TeX-algorithms used). Or this atom can be replaced by a ligature, (if it was a CharAtom). But atoms cannot be changed, otherwise different boxes could be made from the same TeXFormula, and that is not desired! This "dummy atom" makes sure that changes to an atom (during the createBox-method of a RowAtom) will be reset.


Constructor Summary
Dummy(Atom a)
          Creates a new Dummy for the given atom.
 
Method Summary
 void changeAtom(FixedCharAtom a)
          Changes this atom into the given "ligature atom".
 Box createBox(TeXEnvironment rs)
           
 CharFont getCharFont(TeXFont tf)
          This method will only be called if isCharSymbol returns true.
 int getLeftType()
           
 int getRightType()
           
 int getType()
          Changes the type of the atom
 boolean isCharSymbol()
           
 boolean isKern()
           
 void markAsTextSymbol()
           
 void setPreviousAtom(Dummy prev)
           
 void setType(int t)
          Changes the type of the atom
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Dummy

public Dummy(Atom a)
Creates a new Dummy for the given atom.

Parameters:
a - an atom
Method Detail

setType

public void setType(int t)
Changes the type of the atom

Parameters:
t - the new type

getType

public int getType()
Changes the type of the atom

Parameters:
t - the new type

getLeftType

public int getLeftType()
Returns:
the changed type, or the old left type if it hasn't been changed

getRightType

public int getRightType()
Returns:
the changed type, or the old right type if it hasn't been changed

isCharSymbol

public boolean isCharSymbol()

getCharFont

public CharFont getCharFont(TeXFont tf)
This method will only be called if isCharSymbol returns true.


changeAtom

public void changeAtom(FixedCharAtom a)
Changes this atom into the given "ligature atom".

Parameters:
a - the ligature atom

createBox

public Box createBox(TeXEnvironment rs)

markAsTextSymbol

public void markAsTextSymbol()

isKern

public boolean isKern()

setPreviousAtom

public void setPreviousAtom(Dummy prev)