|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.moioli.drawables.LegendElement
public class LegendElement
Represents an element in a DefaultChart's legend.
Constructor Summary | |
---|---|
LegendElement()
Default constructor (empty LegendElement). |
|
LegendElement(java.lang.String description,
int length,
double value)
Standard constructor. |
Method Summary | |
---|---|
void |
drawMe(GraphicsI g,
Scale s,
java.lang.Object c)
Implements DrawableI drawing this object. |
int |
getHeight(GraphicsI g)
Return this LegendElement's height. |
double |
maxY(double minX,
double maxX)
Since the Legend will be drawn regardless of the scale, always return NaN. |
double |
minY(double minX,
double maxX)
Since the Legend will be drawn regardless of the scale, always return NaN. |
void |
setXY(int x,
int y)
Moves this element changing the x and y relative positioning coordinate. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LegendElement()
public LegendElement(java.lang.String description, int length, double value)
description
- a description string to be drawn near this elementlength
- the length (in pixels) of this elementvalue
- the numeric (real) value of the segment represented by this
elementMethod Detail |
---|
public void setXY(int x, int y)
x
- the new abscissa (relative to the Legend)y
- the new ordinate (relative to the Legendpublic void drawMe(GraphicsI g, Scale s, java.lang.Object c)
drawMe
in interface DrawableI
g
- the surface where this object will be drawns
- the DefaultChart's Scale objectc
- the color to be used for drawingpublic int getHeight(GraphicsI g)
g
- the surface where this object will be drawn
public double maxY(double minX, double maxX)
maxY
in interface DrawableI
minX
- the minimum x value represented in this DefaultChartmaxX
- the maximum x value represented in this DefaultChart
public double minY(double minX, double maxX)
minY
in interface DrawableI
minX
- the minimum x value represented in this DefaultChartmaxX
- the maximum x value represented in this DefaultChart
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |