|
|||||||||
| 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.Diagram
This class Diagram.class provides a graphical diagram 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.
| __ | maxvalue
|_/ \ /\__|
| \__/ |
|_____________| minvalue
Histogram| 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 | |
Diagram(int x,
int y,
int width,
int height,
int min,
int max)
Creates a Diagram. |
|
Diagram(int x,
int y,
int width,
int height,
int min,
int max,
int resolution)
Creates a Diagram. |
|
| Method Summary | |
void |
paint()
Repaints the Diagram. |
void |
setBounds(int x,
int y,
int width,
int height)
Sets a new position and size for the Diagram. |
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 Diagram. |
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 Diagram(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 Diagram will be able to show.max - the maximum value the Diagram will be able to show.
public Diagram(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 Diagram will be able to show.max - the maximum value the Diagram will be able to show.resolution - the number of blocks that should be shown in the
Diagram| Method Detail |
public void paint()
paint in class Component
public void setBounds(int x,
int y,
int width,
int height)
setBounds in class Componentx - the new x coordinatey - the new y coordinatewidth - the new widthheight - the new heightpublic void setGraphics(jcontrol.io.Graphics g)
setGraphics in class Componentg - the Display
public 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 boolean transferFocus()
transferFocus in class Component
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||