|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcox.jmatt.java.MathTools.graphing.xml.RenderableXML
cox.jmatt.java.MathTools.graphing.xml.GraphableXML
public class GraphableXML
This class generates very simple XML markup. The <Graphable> tag contains the necessary 'id=' attribute along with 'name=' and 'type=' attributes, if they are defined. Its children are <Expression> and <Limit> tags whose 'key=' attribute is the key value used to add them to the Graphable and whose content is the XML-escaped String value of the Object added.
Field Summary |
---|
Fields inherited from class cox.jmatt.java.MathTools.graphing.xml.RenderableXML |
---|
myID, myName, myParams, myType |
Fields inherited from interface cox.jmatt.java.MathTools.graphing.Graphable |
---|
PARAMETRIC_GRAPH, PARAMETRIC_X, PARAMETRIC_Y, POLAR_GRAPH, STANDARD_GRAPH |
Constructor Summary | |
---|---|
GraphableXML()
Standard constructor for an unnamed Graphable. |
|
GraphableXML(java.lang.String pName)
Constructor for a named Graphable. |
Method Summary | |
---|---|
boolean |
addExpression(java.lang.String pKey,
java.lang.Object pValue)
Add an expression to this Graphable. |
boolean |
addLimit(java.lang.String pKey,
java.lang.Object pValue)
Add a limit to this Graphable. |
java.lang.Object |
render(java.lang.Object pContext)
Rendering a GraphableXML results in a <Graphable> tag containing <Expression> and <Limit> children, followed by any parameter tags. |
boolean |
testCondition(java.lang.Object pCondition,
java.lang.Object pValue)
Two things can be tested in GraphableXML : whether or not a specific LIMIT or EXPRESSION has been set. |
Methods inherited from class cox.jmatt.java.MathTools.graphing.xml.RenderableXML |
---|
setID, setParameter, setType |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface cox.jmatt.java.MathTools.graphing.Renderable |
---|
setParameter, setType |
Constructor Detail |
---|
public GraphableXML()
public GraphableXML(java.lang.String pName)
Method Detail |
---|
public boolean addExpression(java.lang.String pKey, java.lang.Object pValue)
addExpression
in interface Graphable
pKey
- A String identifying the expression to be added. Usage is optional.pValue
- The Object representing the graph-generating entity.
public boolean addLimit(java.lang.String pKey, java.lang.Object pValue)
addLimit
in interface Graphable
pKey
- A String used to identify the limit being added. Not required.pValue
- An Object representing the limit to be enforced.
public boolean testCondition(java.lang.Object pCondition, java.lang.Object pValue)
GraphableXML
: whether or not a specific LIMIT or EXPRESSION has been set. The condition must be either
GraphKeysXML.HAS_LIMIT
or GraphKeysXML.HAS_EXPRESSION
. The value must be the String key used for setting or clearing. If either
argument is null the method returns false. If the condition is NOT one of the ones specified, the return value is false.
testCondition
in interface Renderable
testCondition
in class RenderableXML
pCondition
- One of the GraphKeysXML constants listed above.pValue
- The String used to add or clear the expression or limit.
public java.lang.Object render(java.lang.Object pContext)
render
in interface Renderable
render
in class RenderableXML
pContext
- The Context Object to be used for rendering.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |