|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Renderable
This is the base interface for anything that might appear on a (complete!) graph. It serves as the base interface for all other graph components but will not likely be included in its own right. This is an assumption, however, and not a fact!
NOTE: This class has no connection with any other Java class containing the word 'render'! It is used here in the sense of 'something rendered onto a sheet of graph paper.' That is, the usage context for 'render' is 'draw' or 'drawn.'
The Rendering Context Object is provided as a way for an application to pass last-second (or later) data to the rendering process. No specific definition is required, the Context is supplied as a way to pass configuration data or other such information to a graph as it is being rendered.
Implementations using a rendering context are responsibile for detailing what is needed and making it available to the classes requiring it. If the requirements are not strict, a GraphKeys object can be used.
Method Summary | |
---|---|
java.lang.Object |
render(java.lang.Object pContext)
This method is the raison d'etre for the Renderable interface. |
boolean |
setParameter(java.lang.String pKey,
java.lang.Object pValue)
This method provides a very general way to configure any type of Renderable . |
boolean |
setType(java.lang.Object pType)
Set the type of Renderable this is. |
boolean |
testCondition(java.lang.Object pCondition,
java.lang.Object pValue)
Test the Renderable to see whether or not a particular condition exists. |
Method Detail |
---|
java.lang.Object render(java.lang.Object pContext)
This method is the raison d'etre for the Renderable interface. Calling render()
finishes the graphing process. The Object returned is then
ready for graphing. That is to say, it is ready to be fed into the external application that actually generates the graph; once this method is called
MathTools' responsibility is finished. No further interaction with the returned Object is required!
pContext
- The Context Object to be used for rendering.
boolean setType(java.lang.Object pType)
pType
- The 'type' of Renderable being used.
boolean setParameter(java.lang.String pKey, java.lang.Object pValue)
Renderable
. The only absolute restriction is that the name of the parameter
being set is not empty or null. It is the responsibility of the implementation to define what parameters are settable in which components.
pKey
- The name of the parameter being set. Must not be null or empty.pValue
- The value of the parameter to set.
boolean testCondition(java.lang.Object pCondition, java.lang.Object pValue)
pCondition
- The condition to test against the value.pValue
- The value against which the condition is to be checked.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |