|
||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||
java.lang.Object
|
+--Plotter
|
+--RotatedPlotter
A plotter with the horizontal and vertical axes swapped, and all necessary methods overridden to reflect this change.
| Fields inherited from class Plotter |
ABS_MAX,
ABS_MIN,
axes,
bottomMargin,
eqn,
fold,
foldSize,
foldSym,
infY,
interpolate,
log,
majorTickSize,
maxX,
maxY,
minorTickSize,
minX,
minY,
noUnitsX,
noUnitsY,
rangeX,
rangeY,
soln,
tickRatio,
topMargin,
viewLeft,
viewRange,
viewRight,
xLabel,
xScale,
yLabel,
yScale |
| Constructor Summary | |
RotatedPlotter(Solvable s)
|
|
| Method Summary | |
double |
fromScreenX(int x,
int w)
Converts the specified x value from screen space to graph space |
double |
fromScreenY(int y,
int h)
Converts the specified y value from screen space to graph space |
void |
labelAxisX(java.awt.Graphics g,
int w,
int h)
Labels the x axis. |
void |
labelAxisY(java.awt.Graphics g,
int w,
int h)
Labels the y axis. |
void |
paintGraph(java.awt.Graphics g,
int w,
int h)
Paints the graph (without scales, labels or axes). |
protected void |
scaleToFit()
Adjusts the minY, maxY and
rangeY parameters so that the y axis range
is set to the minimum interval into which all graph data falls. |
protected void |
scaleToFit(int left,
int right)
Adjusts the minY, maxY and
rangeY parameters so that the y axis range
is set to the minimum interval into which all graph data within
the specified interval falls. |
void |
setViewAndRange(double min,
double max)
Combines a call to setView() and
setRangeX(), passing the same
interval bounds to each. |
int |
toScreenX(double x,
int w)
Converts the specified x value from graph space to screen space |
int |
toScreenY(double y,
int h)
Converts the specified y value from graph space to screen space |
java.lang.String |
toString(double d)
Convenience method to format a double for display. |
protected void |
updateSolution(int steps)
Updates this plotter's cache of solution data. |
| Methods inherited from class Plotter |
chooseTickSize,
copyScale,
fold,
getMax,
getMin,
getSpaceX,
getSpaceY,
isInterpolated,
isLogarithmic,
paint,
paintAxes,
paintGraphFolded,
paintLabelBelow,
paintLabelToLeft,
paintVerticalMarkers,
setAxes,
setFold,
setFold,
setFold,
setInterpolated,
setLabels,
setLogarithmic,
setRangeX,
setRangeY,
setScalesEnabled,
setView,
snap,
squareValues |
| Methods inherited from class java.lang.Object |
|
| Constructor Detail |
public RotatedPlotter(Solvable s)
| Method Detail |
public void paintGraph(java.awt.Graphics g,
int w,
int h)
g - The Graphics surface on which to paintw - The width (in pixels) of the available display areah - The height (in pixels) of the available display areaprotected void updateSolution(int steps)
steps - The number of x values at which the solution
should be sampled
public int toScreenX(double x,
int w)
x - The valuew - The width (in pixels) of the available display area
public int toScreenY(double y,
int h)
y - The valueh - The height (in pixels) of the available display area
public double fromScreenX(int x,
int w)
x - The valuew - The width (in pixels) of the available display area
public double fromScreenY(int y,
int h)
y - The valueh - The height (in pixels) of the available display areaprotected void scaleToFit()
minY, maxY and
rangeY parameters so that the y axis range
is set to the minimum interval into which all graph data falls.
protected void scaleToFit(int left,
int right)
minY, maxY and
rangeY parameters so that the y axis range
is set to the minimum interval into which all graph data within
the specified interval falls.left - The minimum bound for the x-axis intervalright - The maximum bound for the x-axis interval
public void setViewAndRange(double min,
double max)
setView() and
setRangeX(), passing the same
interval bounds to each.
public void labelAxisX(java.awt.Graphics g,
int w,
int h)
g - The Graphics surface on which to paintw - The width (in pixels) of the available display areah - The height (in pixels) of the available display area
public void labelAxisY(java.awt.Graphics g,
int w,
int h)
g - The Graphics surface on which to paintw - The width (in pixels) of the available display areah - The height (in pixels) of the available display areapublic java.lang.String toString(double d)
double for display.
Implementation is via a call to BaseApplet2.toString().
|
||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||