|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.problets.domain.model.expression.ExpressionViewExpert
public class ExpressionViewExpert
ExpressionViewExpert To hold the expression, evaluate it, provide its declarations, to hold its view tree, provide list of operators and operands in it
Constructor Summary | |
---|---|
ExpressionViewExpert(Expression inExpression)
Constructor called for stand-alone expressions - This is expected to solve an expression before rendering it |
|
ExpressionViewExpert(Expression inExpression,
boolean shouldEvaluate)
Constructor called by ParenthesisView - This must NOT solve an expression before rendering it - the expression has already been solved before |
Method Summary | |
---|---|
java.util.Vector |
getDeclarations()
|
Expression |
getExpression()
|
java.util.Vector |
getGraphicSolution()
This method will not work correctly unless expression.evaluate() is called first - which is called in the constructor. |
java.util.Vector |
getOperands()
|
java.util.Vector |
getOperators()
|
NodeView |
getRootView()
|
void |
getTextSolution(java.util.Vector explanation)
This method will not work correctly unless expression.evaluate() is called first which is actually called in the constructor. |
static void |
main(java.lang.String[] args)
|
void |
setExpression(Expression inExpression)
Version called by ProbletView to update the expression of ExpressionViewExpert |
int |
typeset(java.awt.Graphics g,
java.awt.FontMetrics inFontMetrics,
int x,
int y,
int spacing)
Given the graphics context and the font metrics used, this method will calculate the left and right extents of all the operators and operands in an expression. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ExpressionViewExpert(Expression inExpression)
public ExpressionViewExpert(Expression inExpression, boolean shouldEvaluate)
Method Detail |
---|
public Expression getExpression()
public java.util.Vector getDeclarations()
public NodeView getRootView()
public java.util.Vector getOperators()
public java.util.Vector getOperands()
public void setExpression(Expression inExpression)
public int typeset(java.awt.Graphics g, java.awt.FontMetrics inFontMetrics, int x, int y, int spacing)
public java.util.Vector getGraphicSolution()
public void getTextSolution(java.util.Vector explanation)
public static void main(java.lang.String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |