Class Dummy

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

public class Dummy extends 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 Details

    • Dummy

      public Dummy(Atom a)
      Creates a new Dummy for the given atom.
      Parameters:
      a - an atom
  • Method Details

    • 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)