org.problets.domain.model.expression.node.operator
Class OperatorView

java.lang.Object
  extended by org.problets.domain.model.expression.node.NodeView
      extended by org.problets.domain.model.expression.node.operator.OperatorView
All Implemented Interfaces:
java.lang.Cloneable
Direct Known Subclasses:
AndView, OrView, ParenthesisView

public class OperatorView
extends NodeView

To keep track of displaying expressions, and underbraces

Author:
Amruth Kumar

Constructor Summary
OperatorView(NodeModel inOperator)
           
 
Method Summary
 void explain(java.util.Vector explanation)
          Graphically explains the evaluation of the expression as opposed to textual explanation by the model
 int getContentWidth()
           
 NodeView getCopyIfExists(java.util.Vector availableViews, java.lang.String presumedValue)
          If actualNodeView exists in availableViews, return a copy of it, else return null actualNodeView is part of the actual answer, an OperatorView or OperandView object.
 
Methods inherited from class org.problets.domain.model.expression.node.NodeView
classifyNodes, clone, getBackupLeftX, getBackupRightX, getContent, getFontMetrics, getLeftChild, getLeftMax, getLeftMin, getLeftX, getNode, getNodeView, getRightChild, getRightMax, getRightMin, getRightX, getSideEffects, getValue, isCovered, paintExpression, print, setLeftChild, setRightChild, toString, typeset
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

OperatorView

public OperatorView(NodeModel inOperator)
Method Detail

getContentWidth

public int getContentWidth()
Overrides:
getContentWidth in class NodeView

getCopyIfExists

public NodeView getCopyIfExists(java.util.Vector availableViews,
                                java.lang.String presumedValue)
If actualNodeView exists in availableViews, return a copy of it, else return null actualNodeView is part of the actual answer, an OperatorView or OperandView object. availableViews consists of OperandViews and StudentNodeViews/BailedOutStudentNodeViews. Short-circuits any newly constructed operator nodes

Overrides:
getCopyIfExists in class NodeView

explain

public void explain(java.util.Vector explanation)
Graphically explains the evaluation of the expression as opposed to textual explanation by the model

Overrides:
explain in class NodeView