All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class weblab.gauge.Meter

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----java.awt.Panel
                           |
                           +----weblab.gauge.Meter

public abstract class Meter
extends Panel
The base class for all Meter objects. Derived from sample codes by Liam Relihan.


Variable Index

 o caption
 o captionFont
 o highestValue
 o lowestValue
 o numbersFont
 o offScreenGraphics
 o offScreenImage
 o offScreenSize
 o panelColor
 o scaleGrad
 o value

Constructor Index

 o Meter()
Constructor for Meter class.
 o Meter(double, double, double, double)
Constructor for Meter class.

Method Index

 o drawMeter(Graphics)
draws the gauge in the background.
 o getCaption()
 o getCaptionFont()
 o getHighestValue()
 o getLowestValueValue()
 o getMaximum()
get the maximum value that the meter can indicate
 o getMinimum()
get the minimum value that the meter can indicate
 o getMinimumSize()
 o getNumbersFont()
 o getPanelColor()
 o getPreferredSize()
 o getScaleGrad()
 o getValue()
 o paint(Graphics)
paint the meter on the foreground
 o setCaption(String)
sets the caption
 o setCaptionFont(Font)
sets the caption Font
 o setHighestValue(double)
 o setLowestValueValue(double)
 o setNumbersFont(Font)
sets the font of the readings
 o setPanelColor(Color)
sets the panel color
 o setRange(int, int)
set the valid range of the meter
 o setScaleGrad(double)
 o setValue(double)
set the value that meter should indicate
 o update(Graphics)
redefines inherited method to exclude screen clear

Variables

 o lowestValue
 protected double lowestValue
 o highestValue
 protected double highestValue
 o scaleGrad
 protected double scaleGrad
 o value
 protected double value
 o panelColor
 protected Color panelColor
 o caption
 protected String caption
 o captionFont
 protected Font captionFont
 o numbersFont
 protected Font numbersFont
 o offScreenImage
 protected Image offScreenImage
 o offScreenSize
 protected Dimension offScreenSize
 o offScreenGraphics
 protected Graphics offScreenGraphics

Constructors

 o Meter
 public Meter()
Constructor for Meter class. use default property values.

 o Meter
 public Meter(double lo,
              double hi,
              double grad,
              double val)
Constructor for Meter class.

Methods

 o setRange
 public void setRange(int theMinimum,
                      int theMaximum)
set the valid range of the meter

 o setHighestValue
 public void setHighestValue(double hi)
 o getHighestValue
 public double getHighestValue()
 o setLowestValueValue
 public void setLowestValueValue(double hi)
 o getLowestValueValue
 public double getLowestValueValue()
 o setScaleGrad
 public void setScaleGrad(double g)
 o getScaleGrad
 public double getScaleGrad()
 o setValue
 public void setValue(double theValue)
set the value that meter should indicate

 o getValue
 public double getValue()
 o getMinimum
 public double getMinimum()
get the minimum value that the meter can indicate

 o getMaximum
 public double getMaximum()
get the maximum value that the meter can indicate

 o setPanelColor
 public void setPanelColor(Color theColor)
sets the panel color

 o getPanelColor
 public Color getPanelColor()
 o setCaption
 public void setCaption(String theCaption)
sets the caption

 o getCaption
 public String getCaption()
 o setCaptionFont
 public void setCaptionFont(Font theFont)
sets the caption Font

 o getCaptionFont
 public Font getCaptionFont()
 o setNumbersFont
 public void setNumbersFont(Font theFont)
sets the font of the readings

 o getNumbersFont
 public Font getNumbersFont()
 o paint
 public synchronized void paint(Graphics g)
paint the meter on the foreground

Overrides:
paint in class Container
 o update
 public void update(Graphics g)
redefines inherited method to exclude screen clear

Overrides:
update in class Component
 o drawMeter
 protected abstract void drawMeter(Graphics g)
draws the gauge in the background. This allows the reduction of flicker.

 o getMinimumSize
 public abstract Dimension getMinimumSize()
Overrides:
getMinimumSize in class Container
 o getPreferredSize
 public abstract Dimension getPreferredSize()
Overrides:
getPreferredSize in class Container

All Packages  Class Hierarchy  This Package  Previous  Next  Index