jcontrol.ui.vole.meter
Class DigitalMeter

java.lang.Object
  extended by jcontrol.ui.vole.Component
      extended by jcontrol.ui.vole.meter.DigitalMeter

public class DigitalMeter
extends Component

The class DigitalMeter draws decimal values with a specified font and a specified number of digits. Several display parameters are user controllable.

(c) Copyright 2003-2007 DOMOLOGIC GmbH


Field Summary
 
Fields inherited from class jcontrol.ui.vole.Component
eventQueue, focusOwner, font, g, height, listener, parent, visible, width, x, y
 
Constructor Summary
DigitalMeter(int x, int y, int digits, int decimals)
          Creates a new DigitalMeter at the specified x- and y-coordinates.
 
Method Summary
 void paint()
          Draws the digital meter outline and value.
 void setValue(int value)
          Sets the value to display on the LCDMeter.
 boolean transferFocus()
          DigitalMeter never gains the input focus.
 
Methods inherited from class jcontrol.ui.vole.Component
getBounds, getParent, isVisible, onActionEvent, onKeyEvent, remove, removeFocus, requestFocus, setBounds, setFont, setGraphics, setParent, setVisible, validate
 
Methods inherited from class java.lang.Object
clone, equals, getClass, notifyAll, toString, wait
 

Constructor Detail

DigitalMeter

public DigitalMeter(int x,
                    int y,
                    int digits,
                    int decimals)
Creates a new DigitalMeter at the specified x- and y-coordinates. The font used for writing the current meter value can be set by using the method setFont. The width and height of the DigitalMeter are calculated automatically and depend on the used font and the number of digits.

Parameters:
x - The x-coordinate for the upper left of the bounding box.
y - The y-coordinate for the upper left of the bounding box.
digits - The number of digits.
Method Detail

setValue

public void setValue(int value)
Sets the value to display on the LCDMeter.

Parameters:
value - The value to show.

paint

public void paint()
Draws the digital meter outline and value.

Overrides:
paint in class Component

transferFocus

public boolean transferFocus()
DigitalMeter never gains the input focus.

Overrides:
transferFocus in class Component
Returns:
true, if the focus was transferred successfully.