jcontrol.ui.vole.meter
Class FanMeter

java.lang.Object
  extended by jcontrol.ui.vole.Component
      extended by jcontrol.ui.vole.meter.FanMeter
All Implemented Interfaces:
Animateable

public class FanMeter
extends Component
implements Animateable

This class FanMeterimplements a simple animation representing a fan. This component can be used e.g. for system monitoring applications.

(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
FanMeter(int x, int y)
          Create a FanMeter with the specified label and coordinates.
 
Method Summary
 void animate()
          Animate the fan.
 void paint()
          Paint the fan.
 void setCaption(String caption)
          Sets a caption text which is displayed for the min and max values at the bottom of the analog meter.
 void setNumericDisplay(int digits, int decimals, String unit)
          Sets the parameters of the numeric value display.
 void setValue(int value)
          Sets the fans value.
 boolean transferFocus()
          Fan can't gain 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

FanMeter

public FanMeter(int x,
                int y)
Create a FanMeter with the specified label and coordinates.

Parameters:
label -
x -
y -
Method Detail

setCaption

public void setCaption(String caption)
Sets a caption text which is displayed for the min and max values at the bottom of the analog meter.

Parameters:
captionMin - Text to display at the left bottom border
captionMax - Text to display at the right bottom border

setNumericDisplay

public void setNumericDisplay(int digits,
                              int decimals,
                              String unit)
Sets the parameters of the numeric value display.

Parameters:
decimals - The number of decimals behind the comma ("-1" turns the display off).
unit - A String representing the unit of the meter value.

setValue

public void setValue(int value)
Sets the fans value. If the value is out of the range minvalue .. maxvalue, the value will be cut.

Parameters:
value - The value

paint

public void paint()
Paint the fan.

Overrides:
paint in class Component

transferFocus

public boolean transferFocus()
Fan can't gain input focus.

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

animate

public void animate()
Animate the fan.

Specified by:
animate in interface Animateable