All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class utils.GUI.DoubleGraphicsDisplay

java.lang.Object
   |
   +----utils.GUI.DoubleGraphicsDisplay

public class DoubleGraphicsDisplay
extends Object
a class which allows one to draw formatted doubles onto a component. cf. DoubleTextDisplay


Variable Index

 o EMPTY

Constructor Index

 o DoubleGraphicsDisplay(double, int)
 o DoubleGraphicsDisplay(double, int, int)
 o DoubleGraphicsDisplay(int)
 o DoubleGraphicsDisplay(int, int)

Method Index

 o draw(Graphics)
 o getExtent()
 o getHeight()
 o getLLCorner()
 o getSigFigs()
 o getValue()
 o getWidth()
 o measure(Font)
establishes various internal variables, which are needed to draw the value
 o setLLCorner(int, int)
sets the position of the lower left corner.
 o setLLCorner(Point)
 o setValue(double)
sets the value to display

Variables

 o EMPTY
 public static final String EMPTY

Constructors

 o DoubleGraphicsDisplay
 public DoubleGraphicsDisplay(double v,
                              int sigfig,
                              int size)
Parameters:
v - -- the value to display
sigfig - -- number of significant figures to display
size - --- maximum number of charaters in the display
 o DoubleGraphicsDisplay
 public DoubleGraphicsDisplay(double v,
                              int sigfig)
 o DoubleGraphicsDisplay
 public DoubleGraphicsDisplay(int sigfig)
 o DoubleGraphicsDisplay
 public DoubleGraphicsDisplay(int sigfig,
                              int size)

Methods

 o getSigFigs
 public int getSigFigs()
Returns:
s the number of significant figures in display
 o measure
 public void measure(Font abs)
establishes various internal variables, which are needed to draw the value

 o getHeight
 public int getHeight()
 o getWidth
 public int getWidth()
 o getExtent
 public Dimension getExtent()
 o draw
 public void draw(Graphics g)
 o setValue
 public void setValue(double v)
sets the value to display

 o getValue
 public double getValue()
 o setLLCorner
 public void setLLCorner(int x,
                         int y)
sets the position of the lower left corner. used to move the display around

 o setLLCorner
 public void setLLCorner(Point q)
 o getLLCorner
 public Point getLLCorner()

All Packages  Class Hierarchy  This Package  Previous  Next  Index