|
|||||||||
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.BarMeter
public class BarMeter
This class implements a bar graph, used for analog output in equalizers etc.
(c) Copyright 2003-2007 DOMOLOGIC GmbH
Field Summary | |
---|---|
static int |
FILL_LINE
Line style |
static int |
FILL_SOLID
Solid style |
static boolean |
ORIENTATION_HORIZONTAL
Horizontal bar graph |
static boolean |
ORIENTATION_VERTICAL
Vertical bar graph |
Fields inherited from class jcontrol.ui.vole.Component |
---|
eventQueue, focusOwner, font, g, height, listener, parent, visible, width, x, y |
Constructor Summary | |
---|---|
BarMeter(int x,
int y,
int width,
int height,
int min,
int max,
boolean orientation,
int style)
Constructs a new bar graph. |
Method Summary | |
---|---|
void |
paint()
Repaints the BarMeter. |
void |
setCaption(String captionMin,
String captionMax)
Sets a caption text which is displayed for the min and max value. |
void |
setNumericDisplay(int digits,
int decimals,
String unit)
Sets the parameters of the numeric value display. |
void |
setValue(int value)
Sets the bar graph value. |
boolean |
transferFocus()
We never gain 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 |
Field Detail |
---|
public static final boolean ORIENTATION_VERTICAL
public static final boolean ORIENTATION_HORIZONTAL
public static final int FILL_LINE
public static final int FILL_SOLID
Constructor Detail |
---|
public BarMeter(int x, int y, int width, int height, int min, int max, boolean orientation, int style)
x
- The upper left x-coordinate.y
- The upper left y-coordinate.width
- The width.height
- The height.min
- The minimum value the BarMeter
will be able to show.max
- The maximum value the BarMeter
will be able to show.orientation
- ORIENTATION_VERTICAL or ORIENTATION_HORIZONZTAL.style
- FILL_LINE or FILL_SOLID.Method Detail |
---|
public void setCaption(String captionMin, String captionMax)
captionMin
- Text to display at the right bottom (vertical bar meter)
or at the left bottom (horizontal bar meter).captionMax
- Text to display at the right top (vertical bar meter)
or at the right bottom (horizontal bar meter).public 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 new valuepublic void paint()
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 |