jfig.utils
Class SimpleLatexParser.CharBox

java.lang.Object
  extended byjfig.utils.SimpleLatexParser.Box
      extended byjfig.utils.SimpleLatexParser.CharBox
Enclosing class:
SimpleLatexParser

class SimpleLatexParser.CharBox
extends SimpleLatexParser.Box

a Box that holds a single character or a string of characters of the specified font.


Field Summary
protected  int a
           
protected  int colorIndex
           
protected  int d
           
protected  int fontIndex
           
protected  SimpleLatexParser.Box next
           
protected  int ptSize
           
protected  java.lang.String s
           
protected  int w
           
protected  int x
           
protected  int y
           
 
Constructor Summary
SimpleLatexParser.CharBox(java.lang.String s, int fontIndex, int ptSize, int colorIndex)
           
 
Method Summary
 void append(SimpleLatexParser.Box child)
           
 void convertToFig(FigCompound parent)
          construct a FIG object from this Box and all its child boxes and put those as members into the specified FigCompound group object.
 void dump(java.io.PrintStream PS)
           
 int getA()
           
 java.awt.Point getAbutmentPoint()
           
 java.awt.Rectangle getBounds()
           
 int getD()
           
 FigRectangle getFigRectangle(FigCompound parent, int colorIndex, int layer)
          construct a FigRectangle at 2400dpi world-coordinates from our Box coordinates, and put it as a member into the specified FigCompound group object.
 SimpleLatexParser.Box getNextBox()
           
 int getW()
           
 int getX()
           
 int getY()
           
 void measure()
          measures our string "s" and updates w,a,d
 void move(int dx, int dy)
           
 void setA(int a)
           
 void setD(int d)
           
 void setNextBox(SimpleLatexParser.Box box)
           
 void setOrigin(java.awt.Point p)
           
 void setW(int w)
           
 void setX(int x)
           
 void setY(int y)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

fontIndex

protected int fontIndex

ptSize

protected int ptSize

colorIndex

protected int colorIndex

s

protected java.lang.String s

x

protected int x

y

protected int y

w

protected int w

a

protected int a

d

protected int d

next

protected SimpleLatexParser.Box next
Constructor Detail

SimpleLatexParser.CharBox

public SimpleLatexParser.CharBox(java.lang.String s,
                                 int fontIndex,
                                 int ptSize,
                                 int colorIndex)
Method Detail

measure

public void measure()
measures our string "s" and updates w,a,d

Overrides:
measure in class SimpleLatexParser.Box

append

public void append(SimpleLatexParser.Box child)
Overrides:
append in class SimpleLatexParser.Box

toString

public java.lang.String toString()
Overrides:
toString in class SimpleLatexParser.Box

convertToFig

public void convertToFig(FigCompound parent)
Description copied from class: SimpleLatexParser.Box
construct a FIG object from this Box and all its child boxes and put those as members into the specified FigCompound group object. Check the display_boxes flag to decide whether to generate bounding boxes, too.

Overrides:
convertToFig in class SimpleLatexParser.Box

move

public void move(int dx,
                 int dy)

getX

public int getX()

getY

public int getY()

getW

public int getW()

getA

public int getA()

getD

public int getD()

setX

public void setX(int x)

setY

public void setY(int y)

setW

public void setW(int w)

setA

public void setA(int a)

setD

public void setD(int d)

getNextBox

public SimpleLatexParser.Box getNextBox()

setNextBox

public void setNextBox(SimpleLatexParser.Box box)

getBounds

public java.awt.Rectangle getBounds()

getAbutmentPoint

public java.awt.Point getAbutmentPoint()

setOrigin

public void setOrigin(java.awt.Point p)

dump

public void dump(java.io.PrintStream PS)

getFigRectangle

public FigRectangle getFigRectangle(FigCompound parent,
                                    int colorIndex,
                                    int layer)
construct a FigRectangle at 2400dpi world-coordinates from our Box coordinates, and put it as a member into the specified FigCompound group object.