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.
-
caption
-
-
captionFont
-
-
highestValue
-
-
lowestValue
-
-
numbersFont
-
-
offScreenGraphics
-
-
offScreenImage
-
-
offScreenSize
-
-
panelColor
-
-
scaleGrad
-
-
value
-
-
Meter()
-
Constructor for Meter class.
-
Meter(double, double, double, double)
-
Constructor for Meter class.
-
drawMeter(Graphics)
-
draws the gauge in the background.
-
getCaption()
-
-
getCaptionFont()
-
-
getHighestValue()
-
-
getLowestValueValue()
-
-
getMaximum()
- get the maximum value that the meter can indicate
-
getMinimum()
-
get the minimum value that the meter can indicate
-
getMinimumSize()
-
-
getNumbersFont()
-
-
getPanelColor()
-
-
getPreferredSize()
-
-
getScaleGrad()
-
-
getValue()
-
-
paint(Graphics)
- paint the meter on the foreground
-
setCaption(String)
- sets the caption
-
setCaptionFont(Font)
- sets the caption Font
-
setHighestValue(double)
-
-
setLowestValueValue(double)
-
-
setNumbersFont(Font)
-
sets the font of the readings
-
setPanelColor(Color)
- sets the panel color
-
setRange(int, int)
- set the valid range of the meter
-
setScaleGrad(double)
-
-
setValue(double)
-
set the value that meter should indicate
-
update(Graphics)
- redefines inherited method to exclude screen clear
lowestValue
protected double lowestValue
highestValue
protected double highestValue
scaleGrad
protected double scaleGrad
value
protected double value
panelColor
protected Color panelColor
caption
protected String caption
captionFont
protected Font captionFont
numbersFont
protected Font numbersFont
offScreenImage
protected Image offScreenImage
offScreenSize
protected Dimension offScreenSize
offScreenGraphics
protected Graphics offScreenGraphics
Meter
public Meter()
- Constructor for Meter class. use default property values.
Meter
public Meter(double lo,
double hi,
double grad,
double val)
- Constructor for Meter class.
setRange
public void setRange(int theMinimum,
int theMaximum)
- set the valid range of the meter
setHighestValue
public void setHighestValue(double hi)
getHighestValue
public double getHighestValue()
setLowestValueValue
public void setLowestValueValue(double hi)
getLowestValueValue
public double getLowestValueValue()
setScaleGrad
public void setScaleGrad(double g)
getScaleGrad
public double getScaleGrad()
setValue
public void setValue(double theValue)
- set the value that meter should indicate
getValue
public double getValue()
getMinimum
public double getMinimum()
- get the minimum value that the meter can indicate
getMaximum
public double getMaximum()
- get the maximum value that the meter can indicate
setPanelColor
public void setPanelColor(Color theColor)
- sets the panel color
getPanelColor
public Color getPanelColor()
setCaption
public void setCaption(String theCaption)
- sets the caption
getCaption
public String getCaption()
setCaptionFont
public void setCaptionFont(Font theFont)
- sets the caption Font
getCaptionFont
public Font getCaptionFont()
setNumbersFont
public void setNumbersFont(Font theFont)
- sets the font of the readings
getNumbersFont
public Font getNumbersFont()
paint
public synchronized void paint(Graphics g)
- paint the meter on the foreground
- Overrides:
- paint in class Container
update
public void update(Graphics g)
- redefines inherited method to exclude screen clear
- Overrides:
- update in class Component
drawMeter
protected abstract void drawMeter(Graphics g)
- draws the gauge in the background. This allows the reduction of
flicker.
getMinimumSize
public abstract Dimension getMinimumSize()
- Overrides:
- getMinimumSize in class Container
getPreferredSize
public abstract Dimension getPreferredSize()
- Overrides:
- getPreferredSize in class Container
All Packages Class Hierarchy This Package Previous Next Index