org.scilab.forge.jlatexmath
Class SpaceAtom
java.lang.Object
org.scilab.forge.jlatexmath.Atom
org.scilab.forge.jlatexmath.SpaceAtom
- All Implemented Interfaces:
- java.lang.Cloneable
public class SpaceAtom
- extends Atom
An atom representing whitespace. The dimension values can be set using different
unit types.
Constructor Summary |
SpaceAtom()
|
SpaceAtom(int type)
|
SpaceAtom(int unit,
float width,
float height,
float depth)
|
SpaceAtom(int widthUnit,
float width,
int heightUnit,
float height,
int depthUnit,
float depth)
|
Method Summary |
static void |
checkUnit(int unit)
Check if the given unit is valid |
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 float |
getFactor(int unit,
TeXEnvironment env)
|
static float[] |
getLength(java.lang.String lgth)
|
static int |
getUnit(java.lang.String unit)
|
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SpaceAtom
public SpaceAtom()
SpaceAtom
public SpaceAtom(int type)
SpaceAtom
public SpaceAtom(int unit,
float width,
float height,
float depth)
throws InvalidUnitException
- Throws:
InvalidUnitException
SpaceAtom
public SpaceAtom(int widthUnit,
float width,
int heightUnit,
float height,
int depthUnit,
float depth)
throws InvalidUnitException
- Throws:
InvalidUnitException
checkUnit
public static void checkUnit(int unit)
throws InvalidUnitException
- Check if the given unit is valid
- Parameters:
unit
- the unit's integer representation (a constant)
- Throws:
InvalidUnitException
- if the given integer value does not represent
a valid unit
getUnit
public static int getUnit(java.lang.String unit)
getLength
public static float[] getLength(java.lang.String lgth)
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.
getFactor
public static float getFactor(int unit,
TeXEnvironment env)