|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.moioli.drawables.AbstractDrawableFunction
public abstract class AbstractDrawableFunction
A general implementation of the DrawableI and FunctionI interfaces. Includes empirical minY() and maxY() methods.
Constructor Summary | |
---|---|
AbstractDrawableFunction()
Default constructor, does really nothing. |
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. |
abstract double |
f(double x)
Returns the y value associated to the specified x. |
double |
getMaximum(double minX,
double maxX)
Returns the point in which the function is maximum with an empirical algorithm. |
double |
getMinimum(double minX,
double maxX)
Returns the point in which the function is minimum with an empirical algorithm. |
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.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractDrawableFunction()
Method Detail |
---|
public abstract double f(double x)
FunctionI
f
in interface FunctionI
x
- the abscissa
FunctionI.f(double)
public double getMinimum(double minX, double maxX)
minX
- the minimum x value to be representedmaxX
- the maximum x value to be represented
public double getMaximum(double minX, double maxX)
minX
- the minimum x value to be representedmaxX
- the maximum x value to be represented
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)
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(GraphicsI, Scale, Object)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |