|
|||||||||
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
public class 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
(c) Copyright 2003-2007 DOMOLOGIC GmbH
Diagram
Field Summary | |
---|---|
static int |
ALIGN_LEFT
Align the caption to the left side of the diagram |
static int |
ALIGN_RIGHT
Align the caption to the right side of the diagram |
Fields inherited from class jcontrol.ui.vole.Component |
---|
eventQueue, 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,
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 |
setCaption(String captionMin,
String captionMax,
int captionAlign)
Sets a caption text which is displayed for the min and max value at the left of the histogram. |
void |
setValue(int value)
Adds a new value to the Histogram. |
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, setGraphics, setParent, setVisible, validate |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, notifyAll, toString, wait |
Field Detail |
---|
public static final int ALIGN_LEFT
public static final int ALIGN_RIGHT
Constructor Detail |
---|
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 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 setCaption(String captionMin, String captionMax, int captionAlign)
captionMin
- Text to display at the bottomcaptionMax
- Text to display at the topcaptionAlign
- ALIGN_LEFT or ALIGN_RIGHTpublic void setValue(int value)
value
- the new value to set.public 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 |