Logo Search packages:      
Sourcecode: wims version File versions  Download package

synchronized void edu::hws::jcm::awt::Controller::compute (  )  [inline]

When an contoller computes, it first calls checkInput() for any InputOjects that it controls (including those in sub-controllers). It then handles any Ties. Finally, it calls the compute() method of any Computables. If an error occurs, it reports it. JCMErrors (which should represent errors on the part of the user) will generally only occur during the checkInput() phase. Internal, programmer errors can occur at any time and might leave the sytem in an unhappy state. They are reported as debugging aids for the programmer. When one occurs, a stack trace is printed to standard output.

Implements edu::hws::jcm::awt::Computable.

Definition at line 242 of file Controller.java.

References checkInput(), clearErrorMessage(), doCompute(), doTies(), errorMessage, and reportError().

Referenced by GenericGraphApplet::actionPerformed(), actionPerformed(), adjustmentValueChanged(), edu::hws::jcm::draw::DraggablePoint::continueDrag(), EpsilonDelta::doLoadExample(), itemStateChanged(), edu::hws::jcm::draw::Panner::mouseDragged(), edu::hws::jcm::draw::MouseTracker::mouseDragged(), edu::hws::jcm::draw::MouseTracker::mousePressed(), edu::hws::jcm::functions::TableFunctionInput::mouseReleased(), edu::hws::jcm::draw::Panner::mouseReleased(), edu::hws::jcm::draw::MouseTracker::mouseReleased(), edu::hws::jcm::awt::VariableInput::processActionEvent(), edu::hws::jcm::awt::ExpressionInput::processActionEvent(), edu::hws::jcm::awt::ComputeButton::processActionEvent(), edu::hws::jcm::awt::VariableSlider::processAdjustmentEvent(), edu::hws::jcm::awt::VariableInput::processTextEvent(), edu::hws::jcm::awt::ExpressionInput::processTextEvent(), edu::hws::jcm::functions::TableFunctionInput::revertEditFunction(), edu::hws::jcm::draw::CoordinateRect::setLimits(), edu::hws::jcm::draw::CoordinateRect::sync(), and textValueChanged().

                                      {
      try {
         checkInput();
         doTies();
         clearErrorMessage();
         doCompute();
      }
      catch (JCMError e) { 
         if (errorMessage == null || !errorMessage.equals(e.getMessage()))
            reportError(e.getMessage());
      }
      catch (RuntimeException e) {
         reportError("Internal programmer's error detected?  " + e);
         e.printStackTrace();
      }
   }


Generated by  Doxygen 1.6.0   Back to index