|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectjcontrol.ui.vole.Component
jcontrol.ui.vole.meter.AnalogMeter
public class AnalogMeter
This class AnalogMeter.class implements a graphical analog meter for JControl.
Several parameters of the analog meter such as opening angle and m_orientation are user controllable.
(c) Copyright 2003-2005 DOMOLOGIC GmbH
| Field Summary | |
|---|---|
static int |
ORIENTATION_CENTER
Align the scale of the analog meter to the middle. |
static int |
ORIENTATION_LEFT
Align the scale of the analog meter to the bottom-left corner of it's bounding box. |
static int |
ORIENTATION_RIGHT
Align the scale of the analog meter to the bottom-right corner of it's bounding box. |
| Fields inherited from class jcontrol.ui.vole.Component |
|---|
eventQueue, focusOwner, font, g, height, listener, parent, visible, width, x, y |
| Constructor Summary | |
|---|---|
AnalogMeter(int x,
int y,
int width,
int height,
int min,
int max,
int openAngle,
int orientation,
int dials)
Creates a new AnalogMeter. |
|
| Method Summary | |
|---|---|
void |
paint()
Draws the AnalogMeter. |
void |
setCaption(String captionMin,
String captionMax)
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 current analog meter value. |
boolean |
transferFocus()
AnalogMeter never gains 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, notifyAll, wait |
| Field Detail |
|---|
public static final int ORIENTATION_CENTER
public static final int ORIENTATION_LEFT
public static final int ORIENTATION_RIGHT
| Constructor Detail |
|---|
public AnalogMeter(int x,
int y,
int width,
int height,
int min,
int max,
int openAngle,
int orientation,
int dials)
x - The x coordinatey - The y coordinatewidth - The widthheight - The heightmin - The minimum m_valuemax - The maximum m_valueopenAngle - An angle between 0 and 180 degrees. Default value is 180 degrees.orientation - Set the scale orientation. Possible values are ORIENTATION_LEFT,
ORIENTATION_CENTER and ORIENTATION_RIGHT.
The default is ORIENTATION_CENTER.dials - Number of dial lines| Method Detail |
|---|
public void paint()
paint in class Component
public void setCaption(String captionMin,
String captionMax)
captionMin - Text to display at the left bottom bordercaptionMax - Text to display at the right bottom border
public void setNumericDisplay(int digits,
int decimals,
String unit)
decimals - The number of decimals behind the comma ("-1" turns the display off).unit - A String representing the unit of the meter value.public void setValue(int value)
value - The value to set.public boolean transferFocus()
transferFocus in class Component
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||