|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectsk.baka.webvm.misc.AbstractGraph
public abstract class AbstractGraph
An abstract graph, intended to be extended by classes drawing graphs.
| Field Summary | |
|---|---|
boolean |
makeAscending
Automatically make incoming values ascending. |
protected int |
max
The maximum value. |
protected GraphStyle |
style
The graph style. |
protected List<int[]> |
values
The graph values. |
| Constructor Summary | |
|---|---|
AbstractGraph(int max,
GraphStyle style)
Constructs a new graph instance. |
|
| Method Summary | |
|---|---|
void |
add(int[] values)
Adds given value array to the graph. |
String |
draw()
Draws the graph and returns the html code. |
abstract void |
draw(StringBuilder sb)
Draws the graph and returns the html code. |
void |
fillWithZero(int desiredLength,
boolean fillToRight)
Append several zero values until a desired data length is reached. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final int max
protected final List<int[]> values
protected final GraphStyle style
public boolean makeAscending
| Constructor Detail |
|---|
public AbstractGraph(int max,
GraphStyle style)
max - the maximum value.style - the graph style, must be valid.| Method Detail |
|---|
public final void add(int[] values)
values - the values to add. There must be exactly one value for each graph column.
public final void fillWithZero(int desiredLength,
boolean fillToRight)
desiredLength - desired length of X axis.fillToRight - if true then the zero values are appended to the value list. If false then the zero values are prepended before all list values.public final String draw()
public abstract void draw(StringBuilder sb)
sb - draw the graph here
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||