jcontrol.ui.vole.meter
Class SevenSegmentMeter

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

public class SevenSegmentMeter
extends Component

This class SevenSegmentMeter.class provides a seven-segment-based lcd-style counter with a variable number of digits. The digits of the SevenSegmentMeter are freely scalable.

(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
SevenSegmentMeter(int x, int y, int width, int height, int digits, int decimals)
          Creates a new SevenSegmentMeter.
 
Method Summary
 void paint()
          Repaints the SevenSegmentMeter.
 void setValue(int value)
          Sets the value to display on the SevenSegmentMeter.
 boolean transferFocus()
          The SevenSegmentMeter 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

SevenSegmentMeter

public SevenSegmentMeter(int x,
                         int y,
                         int width,
                         int height,
                         int digits,
                         int decimals)
Creates a new SevenSegmentMeter.

NOTE: The size of the seven-segment digits will depent on the number of desired digits and the size of the bounding box.

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.
width - The width of the bounding box.
height - The height of the bounding box.
digits - The number of digits.
Method Detail

setValue

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

Parameters:
value - The value to display.

paint

public void paint()
Repaints the SevenSegmentMeter.

Overrides:
paint in class Component

transferFocus

public boolean transferFocus()
The SevenSegmentMeter never gains the input focus.

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