|
|||||||||
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.graph.Histogram
This class Histogram.class
provides a histogram for JControl.
New values are pushed in from the right side, older values are moved over to the left.
Thus, the oldest value shown is the value on the very left.
| X X | maxvalue
|X X XXX |
|XX XXXXXXXX |
|XXXXXXXXXXXXX| minvalue
Diagram
Field Summary | |
static int |
LEFT
|
static int |
RIGHT
|
Fields inherited from class jcontrol.ui.vole.Component |
focusOwner, font, g, height, listener, parent, visible, width, x, y |
Constructor Summary | |
Histogram(int x,
int y,
int width,
int height,
int min,
int max)
Creates a Histogram. |
|
Histogram(int x,
int y,
int width,
int height,
int min,
int max,
int resolution)
Creates a Histogram. |
Method Summary | |
void |
paint()
Repaints the Histogram. |
void |
setBounds(int x,
int y,
int width,
int height)
Sets a new position and size for the Histogram. |
void |
setGraphics(jcontrol.io.Graphics g)
This method is called to set the main Display context for this component. |
void |
setInscription(java.lang.String min,
java.lang.String max,
int position)
Sets an inscription text which is displayed for the min and max value at the left of the histogram. |
void |
setLabel(java.lang.String text)
Sets a description text which is displayed at the bottom of the histogram. |
void |
setValue(int value)
Adds a new value to the Histogram. |
void |
setValue(int value,
boolean update)
|
boolean |
transferFocus()
We never gain the input focus. |
Methods inherited from class jcontrol.ui.vole.Component |
getBounds, getParent, isVisible, onActionEvent, onKeyEvent, remove, removeFocus, requestFocus, setFont, setLocation, setParent, setVisible, validate |
Methods inherited from class java.lang.Object |
clone, equals, finalize, notifyAll, wait |
Field Detail |
public static final int LEFT
public static final int RIGHT
Constructor Detail |
public Histogram(int x, int y, int width, int height, int min, int max)
x
- the x coordinate.y
- the y coordinate.width
- the width.height
- the height.min
- the minimum value the Histogram will be able to show.max
- the maximum value the Histogram will be able to show.public Histogram(int x, int y, int width, int height, int min, int max, int resolution)
x
- the x coordinate.y
- the y coordinate.width
- the width.height
- the height.min
- the minimum value the Histogram will be able to show.max
- the maximum value the Histogram will be able to show.resolution
- the number of blocks that should be shown in the
HistogramMethod 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 setInscription(java.lang.String min, java.lang.String max, int position)
min
- Text to display at the left bottommax
- Text to display at the left topposition
- LEFT or RIGHTpublic void setLabel(java.lang.String text)
text
- Text to displaypublic void setValue(int value)
value
- the new value to set.public void setValue(int value, boolean update)
public boolean transferFocus()
transferFocus
in class Component
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |