|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface GraphPaper
GraphPaper
is what brings together all the other graph components. It defines the 'surface' or 'paper' on which a graph is drawn and it
provides the machinery to generate the Object which will be transformed into the final graph. This last point is critical! Once the GraphPaper render()
method is called MathTools' responsibility ends. The Object returned is, as far as MathTools is concerned, the complete and final graph. No further
interaction is required.
Since GraphPaper
bridges the gap between the broad metaphor used by MathTools and an actual printed (or image) graph, its methods are defined
more in the sense of what the final presentation will look like. Thus arguments involving such things as size and boundary values are represented as actual
numbers (doubles) as opposed to generic Objects. The exact interpretation still depends on the implementation, but the values set should 'resemble closely'
the concepts that are implied.
Interaction between the setSize()
and setRanges()
methods is not defined explicitly nor implied. Either method may be used, or
both, and the result is handled 'under the hood.' Likewise, the addTransform()
method is provided as an option for implementation technology
capable of supporting it. The actual transformation is not defined and is specified as Object to allow maximum flexibility.
Method Summary | |
---|---|
boolean |
addAxis(java.lang.String pKey,
Axis pAxis)
Add an Axis instance to the current paper. |
boolean |
addGraph(java.lang.String pKey,
Graphable pGraph)
Add a graph to the current paper. |
boolean |
addPolygon(java.lang.String pKey,
Polygon pPolygon)
Add a polygon to the current paper. |
boolean |
addTransform(java.lang.Object pTransform)
Use this method to apply a universal transformation to all of the graph components. |
boolean |
setRanges(double pMinX,
double pMinY,
double pMaxX,
double pMaxY)
Set the minimum and maximum horizontal and vertical values for the graph. |
boolean |
setSize(double pWidth,
double pHeight)
Set the size of the actual graph. |
Methods inherited from interface cox.jmatt.java.MathTools.graphing.Renderable |
---|
render, setParameter, setType, testCondition |
Method Detail |
---|
boolean setSize(double pWidth, double pHeight)
pWidth
- The width of the graph.pHeight
- The height of the graph.
boolean setRanges(double pMinX, double pMinY, double pMaxX, double pMaxY)
pMinX
- The minimum horizontal (X) value on the graph.pMinY
- The minimum vertical (Y) value for the graph.pMaxX
- The maximum horizontal value for the graph.pMaxY
- The maximum vertical (Y) value on the graph.
boolean addTransform(java.lang.Object pTransform)
pTransform
- The transformation to apply.
boolean addAxis(java.lang.String pKey, Axis pAxis)
pKey
- The identification or description of the Axis being added.pAxis
- The Axis to add.
boolean addGraph(java.lang.String pKey, Graphable pGraph)
pKey
- The String key used to identify the graph.pGraph
- The graph to add.
boolean addPolygon(java.lang.String pKey, Polygon pPolygon)
pKey
- The String key used to identify the polygon.pPolygon
- The Polygon
to add.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |