|
|||||||||
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.LCDMeter
This class LCDMeter.class
provides a seven-segment-based
lcd-style counter
with a variable number of digits. The digits of the LCDMeter
are freely scalable.
______________
| __ __ __ |
| |__||__||__| |
| |__||__||__| |
|______________|
Field Summary |
Fields inherited from class jcontrol.ui.vole.Component |
focusOwner, font, g, height, listener, parent, visible, width, x, y |
Constructor Summary | |
LCDMeter(int x,
int y,
int width,
int height,
int digits)
Creates a new LCDMeter. |
|
LCDMeter(int x,
int y,
int width,
int height,
int digits,
boolean border)
Constructs a bordered LCDMeter. |
Method Summary | |
void |
paint()
Repaints the LCDMeter. |
void |
setBounds(int x,
int y,
int width,
int height)
Sets a new position and size for the LCDMeter. |
void |
setGraphics(jcontrol.io.Graphics g)
This method is called to set the main Display context for this component |
void |
setLocation(int x,
int y)
Moves this LCDMeter to a new location. |
void |
setValue(int value)
Sets the value to display on the LCDMeter. |
boolean |
transferFocus()
LCDMeter never gains the input focus. |
Methods inherited from class jcontrol.ui.vole.Component |
getBounds, getParent, isVisible, onActionEvent, onKeyEvent, remove, removeFocus, requestFocus, setFont, setParent, setVisible, validate |
Methods inherited from class java.lang.Object |
clone, equals, finalize, notifyAll, wait |
Constructor Detail |
public LCDMeter(int x, int y, int width, int height, int digits)
NOTE: The size of the seven-segment digits will depent on the number of desired digits and the size of the bounding box.
x
- the x coordinate for the upper left of the bounding box.y
- the y coordinate for the upper left of the bounding box.width
- the width of the bounding box.height
- the height of the bounding box.digits
- the number of digits.public LCDMeter(int x, int y, int width, int height, int digits, boolean border)
x
- the x coordinate for the upper left of the bounding box.y
- the y coordinate for the upper left of the bounding box.width
- the width of the bounding box.height
- the height of the bounding box.digits
- the number of digits.border
- if true a border is painted around the LCDMeter (default is off).Method Detail |
public void paint()
paint
in class Component
public void setBounds(int x, int y, int width, int height)
setBounds
in class Component
x
- the new x coordinatey
- the new y coordinatewidth
- the new widthheight
- the new heightpublic void setGraphics(jcontrol.io.Graphics g)
setGraphics
in class Component
g
- the Displaypublic void setLocation(int x, int y)
setLocation
in class Component
x
- the x-coordinate of the new location's top-left corner.y
- the y-coordinate of the new location's top-left corner.public void setValue(int value)
value
- the value to show.public boolean transferFocus()
transferFocus
in class Component
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |