|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.AbstractMap<K,V>
java.util.TreeMap
net.moioli.drawables.Pie
public class Pie
A nice class to draw a pie out of a Map table of data.
It will draw a pie with the values' percentages and will use the Map keys as
lables.
Attention: this class expects you use Number derived objects as the map
values (like Double or Integer). Not doing so might raise
ClassCastExceptions.
Number
,
Map
,
Serialized FormConstructor Summary | |
---|---|
Pie()
Default constructor. |
Method Summary | |
---|---|
void |
drawMe(GraphicsI g,
Scale s,
java.lang.Object c)
This method is automatically called by DefaultChart to draw the objects it contains, so end users should never call drawMe directly. |
double |
maxY(double minX,
double maxX)
Returns the maximum y value that should be represented in the DefaultChart for this object to be drawn properly. |
double |
minY(double minX,
double maxX)
Returns the minimum y value that should be represented in the DefaultChart for this object to be drawn properly. |
Methods inherited from class java.util.TreeMap |
---|
clear, clone, comparator, containsKey, containsValue, entrySet, firstKey, get, headMap, keySet, lastKey, put, putAll, remove, size, subMap, tailMap, values |
Methods inherited from class java.util.AbstractMap |
---|
equals, hashCode, isEmpty, toString |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.Map |
---|
equals, hashCode, isEmpty |
Constructor Detail |
---|
public Pie()
Method Detail |
---|
public void drawMe(GraphicsI g, Scale s, java.lang.Object c)
DrawableI
drawMe
in interface DrawableI
g
- the surface where this object will be drawns
- the DefaultChart's Scale objectc
- the color to be used for drawingDrawableI.drawMe(net.moioli.chart.GraphicsI,
net.moioli.chart.Scale, java.lang.Object)
public double minY(double minX, double maxX)
DrawableI
minY
in interface DrawableI
minX
- the minimum x value represented in this DefaultChartmaxX
- the maximum x value represented in this DefaultChart
DrawableI.minY(double, double)
public double maxY(double minX, double maxX)
DrawableI
maxY
in interface DrawableI
minX
- the minimum x value represented in this DefaultChartmaxX
- the maximum x value represented in this DefaultChart
DrawableI.maxY(double, double)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |