Package org.scilab.forge.jlatexmath
Class Atom
- java.lang.Object
-
- org.scilab.forge.jlatexmath.Atom
-
- All Implemented Interfaces:
java.lang.Cloneable
- Direct Known Subclasses:
AccentedAtom
,BigDelimiterAtom
,BigOperatorAtom
,BoldAtom
,BreakMarkAtom
,CedillaAtom
,CharSymbol
,ColorAtom
,CumulativeScriptsAtom
,DdotsAtom
,DynamicAtom
,EmptyAtom
,FBoxAtom
,FcscoreAtom
,FencedAtom
,FractionAtom
,GeoGebraLogoAtom
,GraphicsAtom
,HlineAtom
,IddotsAtom
,IJAtom
,ItAtom
,JavaFontRenderingAtom
,LapedAtom
,LaTeXAtom
,LCaronAtom
,MathAtom
,MatrixAtom
,MiddleAtom
,MulticolumnAtom
,MultlineAtom
,NthRoot
,OgonekAtom
,OverlinedAtom
,OverUnderDelimiter
,PhantomAtom
,RaiseAtom
,ReflectAtom
,ResizeAtom
,RomanAtom
,RotateAtom
,RowAtom
,RuleAtom
,ScaleAtom
,ScriptsAtom
,SmallCapAtom
,SmashedAtom
,SpaceAtom
,SsAtom
,StrikeThroughAtom
,StyleAtom
,tcaronAtom
,TextCircledAtom
,TextStyleAtom
,TStrokeAtom
,TtAtom
,TypedAtom
,UnderOverArrowAtom
,UnderOverAtom
,UnderscoreAtom
,VCenteredAtom
,VdotsAtom
,VlineAtom
,VRowAtom
,XArrowAtom
public abstract class Atom extends java.lang.Object implements java.lang.Cloneable
An abstract superclass for all logical mathematical constructions that can be a part of a TeXFormula. All subclasses must implement the abstractcreateBox(TeXEnvironment)
method that transforms this logical unit into a concrete box (that can be painted). They also must define their type, used for determining what glue to use between adjacent atoms in a "row construction". That can be one single type by asigning one of the type constants to thetype
field. But they can also be defined as having two types: a "left type" and a "right type". This can be done by implementing the methodsgetLeftType()
andgetRightType()
. The left type will then be used for determining the glue between this atom and the previous one (in a row, if any) and the right type for the glue between this atom and the following one (in a row, if any).- Author:
- Kurt Vermeulen
-
-
Field Summary
Fields Modifier and Type Field Description int
alignment
int
type
The type of the atom (default value: ordinary atom)int
type_limits
-
Constructor Summary
Constructors Constructor Description Atom()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description Atom
clone()
abstract Box
createBox(TeXEnvironment env)
Convert this atom into aBox
, using properties set by "parent" atoms, like the TeX style, the last used font, color settings, ...int
getLeftType()
Get the type of the leftermost child atom.int
getRightType()
Get the type of the rightermost child atom.
-
-
-
Method Detail
-
createBox
public abstract Box createBox(TeXEnvironment env)
Convert this atom into aBox
, using properties set by "parent" atoms, like the TeX style, the last used font, color settings, ...- Parameters:
env
- the current environment settings- Returns:
- the resulting box.
-
getLeftType
public int getLeftType()
Get the type of the leftermost child atom. Most atoms have no child atoms, so the "left type" and the "right type" are the same: the atom's type. This also is the default implementation. But Some atoms are composed of child atoms put one after another in a horizontal row. These atoms must override this method.- Returns:
- the type of the leftermost child atom
-
getRightType
public int getRightType()
Get the type of the rightermost child atom. Most atoms have no child atoms, so the "left type" and the "right type" are the same: the atom's type. This also is the default implementation. But Some atoms are composed of child atoms put one after another in a horizontal row. These atoms must override this method.- Returns:
- the type of the rightermost child atom
-
clone
public Atom clone()
- Overrides:
clone
in classjava.lang.Object
-
-