|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jcontrol.ui.vole.Component jcontrol.ui.vole.meter.Thermometer
public class Thermometer
The class Thermometer
implements a classical thermometer as
graphical Vole component. The final size of the thermometer depends on the
width-to-height ratio given by the constructor or the setBounds-method.
The thermometer is drawn that it completely fits into its bounding box.
A thermometer without any caption has a width-to-height ratio of
2 to 7 plus text height. Any caption will be drawn on the right side
of the fluid column, and with a caption, the width-to-height ratio will change.
So, if the thermometer is too small or not visible at all, you should try to increase
the width first.
(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 | |
---|---|
Thermometer(int x,
int y,
int width,
int height,
int min,
int max)
Constructs a new thermometer. |
Method Summary | |
---|---|
void |
paint()
Paints this component. |
void |
setCaption(String captionMin,
String captionMax)
Sets a caption text which is displayed for the min and max value at the thermometer. |
void |
setNumericDisplay(int digits,
int decimals,
String unit)
Sets the parameters of the numeric value display. |
void |
setValue(int value)
Sets the thermometer value. |
boolean |
transferFocus()
Thermometer never has 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 |
---|
public Thermometer(int x, int y, int width, int height, int min, int max)
x
- The upper left x coordinate.y
- The upper left y coordinate.width
- The widthheight
- The heightmin
- The minimum value the BarMeter will be able to showmax
- The maximum value the BarMeter will be able to showMethod Detail |
---|
public void setCaption(String captionMin, String captionMax)
captionMin
- Text to display at the bottomcaptionMax
- Text to display at the toppublic void setNumericDisplay(int digits, int decimals, String unit)
decimals
- The number of decimals behind the comma (may be "0").unit
- A String
representing the unit of the thermometer, e.g. "°C"public void setValue(int value)
value
- the valuepublic void paint()
Component
paint
in class Component
public boolean transferFocus()
transferFocus
in class Component
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |