|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A widget for drawing a function over a range of one variable.. The FunctionGraph class is like the ActiveGraph except that instead of plotting values versus time it plots them versus some specified range on the x-axis. Also, instead of plotting one value on each step (as you would with time), FunctionGraph does a complete sampling whenever the `graph' method is called. That is, it graphs f(x) = y for all x in [minX, maxX] where x = minX + n * stepS ize. The user specifies stuff like minX, maxX, the number of steps between minX and maxX to sample at and a method selector that is a wrapper for the equation being graphed. The method selector must be in a particular format: (BOOL) f: (double *) x : (double *) y If the method returns FALSE then that x value is skipped, otherwise it is assummed that y = f(x) and that value is plotted.
Method Summary | |
Object |
createBegin(Zone aZone)
|
Object |
createEnd()
|
Object |
setArithmeticWarn(boolean state)
If true, raise a warning if the function method failed to compute a value. |
Object |
setDataFeed(Object feed)
Set the target to send the function method. |
Object |
setElement(Object graphElement)
Set the GraphElement to use for plotting. |
Object |
setFunctionSelector(Selector aSel)
Set the function method. |
Object |
setResetFrequency(int freq)
Set the frequency at which to clear the graph element. |
Object |
setXMin$Max$Resolution(double minx,
double maxx,
int steps)
Set the range and resolution of X values at which to compute values. |
Object |
setXMin$Max$StepSize(double minx,
double maxx,
double size)
Set the range and step size of X values at which to compute values. |
Methods inherited from interface swarm.defobj.CreateC |
create |
Methods inherited from interface swarm.defobj.CustomizeC |
customizeBegin,
customizeCopy,
customizeEnd |
Method Detail |
public Object createBegin(Zone aZone)
public Object createEnd()
public Object setElement(Object graphElement)
public Object setDataFeed(Object feed)
public Object setFunctionSelector(Selector aSel)
public Object setArithmeticWarn(boolean state)
public Object setXMin$Max$Resolution(double minx, double maxx, int steps)
public Object setXMin$Max$StepSize(double minx, double maxx, double size)
public Object setResetFrequency(int freq)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |