org.scilab.forge.jlatexmath
Class FractionAtom

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

public class FractionAtom
extends Atom

An atom representing a fraction.


Field Summary
 
Fields inherited from class org.scilab.forge.jlatexmath.Atom
type, type_limits
 
Constructor Summary
FractionAtom(Atom num, Atom den)
          Uses the default thickness for the fraction line
FractionAtom(Atom num, Atom den, boolean rule)
          Uses the default thickness for the fraction line
FractionAtom(Atom num, Atom den, boolean noDef, int unit, float t)
          Depending on noDef, the given thickness and unit will be used (<-> the default thickness).
FractionAtom(Atom num, Atom den, boolean rule, int numAlign, int denomAlign)
          Uses the default thickness for the fraction line.
FractionAtom(Atom num, Atom den, float defFactor, int numAlign, int denomAlign)
          The thickness of the fraction line will be "defFactor" times the default thickness.
FractionAtom(Atom num, Atom den, int unit, float t)
          The thickness of the fraction line is determined by the given value "t" in the given unit.
FractionAtom(Atom num, Atom den, int unit, float t, int numAlign, int denomAlign)
          The thickness of the fraction line is determined by the given value "t" in the given unit.
 
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, ...
 
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
 

Constructor Detail

FractionAtom

public FractionAtom(Atom num,
                    Atom den)
Uses the default thickness for the fraction line

Parameters:
num - the numerator
den - the denominator

FractionAtom

public FractionAtom(Atom num,
                    Atom den,
                    boolean rule)
Uses the default thickness for the fraction line

Parameters:
num - the numerator
den - the denominator
rule - whether the fraction line should be drawn

FractionAtom

public FractionAtom(Atom num,
                    Atom den,
                    boolean noDef,
                    int unit,
                    float t)
             throws InvalidUnitException
Depending on noDef, the given thickness and unit will be used (<-> the default thickness).

Parameters:
num - the numerator
den - the denominator
noDef - whether the default thickness should not be used for the fraction line
unit - a unit constant for the line thickness
t - the thickness of the fraction line (in the given unit)
Throws:
InvalidUnitException - if the given integer is not a valid unit constant

FractionAtom

public FractionAtom(Atom num,
                    Atom den,
                    boolean rule,
                    int numAlign,
                    int denomAlign)
Uses the default thickness for the fraction line.

Parameters:
num - the numerator
den - the denominator
rule - whether the fraction line should be drawn
numAlign - alignment of the numerator
denomAlign - alignment of the denominator

FractionAtom

public FractionAtom(Atom num,
                    Atom den,
                    float defFactor,
                    int numAlign,
                    int denomAlign)
The thickness of the fraction line will be "defFactor" times the default thickness.

Parameters:
num - the numerator
den - the denominator
defFactor - the thickness of the fraction line relative to the default thickness
numAlign - alignment of the numerator
denomAlign - alignment of the denominator

FractionAtom

public FractionAtom(Atom num,
                    Atom den,
                    int unit,
                    float t,
                    int numAlign,
                    int denomAlign)
The thickness of the fraction line is determined by the given value "t" in the given unit.

Parameters:
num - the numerator
den - the denominator
unit - a unit constant for the line thickness
t - the thickness of the fraction line (in the given unit)
numAlign - alignment of the numerator
denomAlign - alignment of the denominator

FractionAtom

public FractionAtom(Atom num,
                    Atom den,
                    int unit,
                    float t)
The thickness of the fraction line is determined by the given value "t" in the given unit.

Parameters:
num - the numerator
den - the denominator
unit - a unit constant for the line thickness
t - the thickness of the fraction line (in the given unit)
Method Detail

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.