|
|||||||||
| 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
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 inscription has a width-to-height ratio of
2 to 7 plus text height. Any inscription will be drawn on the right side
of the fluid column, and with an inscription, 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.
| Field Summary |
| Fields inherited from class jcontrol.ui.vole.Component |
focusOwner, font, g, height, listener, parent, visible, width, x, y |
| Constructor Summary | |
Thermometer(int x,
int y,
int width,
int height,
int minValue,
int maxValue)
Constructs a new thermometer. |
|
| Method Summary | |
void |
paint()
Paints this component. |
void |
setFont(jcontrol.io.Resource font)
Set the font for this component. |
void |
setGraphics(jcontrol.io.Graphics g)
This method is called to set the main Display context for this component. |
void |
setInscription(java.lang.String inscriptMin,
java.lang.String inscriptMax)
Sets an inscription text which is displayed for the min and max value at the left of the histogram. |
void |
setNumericDisplay(int minDisplay,
int maxDisplay,
int decimals,
java.lang.String unit)
Sets the parameters of a 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, setLocation, setParent, setVisible, validate |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, notifyAll, wait |
| Constructor Detail |
public Thermometer(int x,
int y,
int width,
int height,
int minValue,
int maxValue)
x - the upper left x coordinate.y - the upper left y coordinate.width - the widthheight - the heightminValue - the minimum value the BarMeter will be able to showmaxValue - the maximum value the BarMeter will be able to show| Method Detail |
public void paint()
Component
paint in class Componentpublic void setFont(jcontrol.io.Resource font)
setFont in class Componentfont - The new font.public void setGraphics(jcontrol.io.Graphics g)
setGraphics in class Componentg - the Display
public void setInscription(java.lang.String inscriptMin,
java.lang.String inscriptMax)
public void setNumericDisplay(int minDisplay,
int maxDisplay,
int decimals,
java.lang.String unit)
minDisplay - the minimum display valuemaxDisplay - the maximum display valuedecimals - 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 boolean transferFocus()
transferFocus in class Component
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||