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

void edu::hws::jcm::draw::CoordinateRect::sync ( Tie  tie,
Tieable  newest 
) [inline]

Part of the Tieable interface. Not meant to be called directly.

Implements edu::hws::jcm::awt::Tieable.

Definition at line 263 of file CoordinateRect.java.

References changed, edu::hws::jcm::awt::Controller::compute(), getLimits(), edu::hws::jcm::awt::Tieable::getSerialNumber(), and onChange.

                                             {
      if (newest != this) {
         if ( !(newest instanceof Limits) )
            throw new IllegalArgumentException("Internal programming error:  A CoordinateRect can only be tied to a Limits object.");
         double[] d = ((Limits)newest).getLimits();
         if (d != null && d.length >= 4) {
             double[] oldLimits = getLimits();
             if (d[0] == oldLimits[0] && d[1] == oldLimits[1] &&  d[2] == oldLimits[2] && d[3] == oldLimits[3])
                return;
             xmin = d[0];
             xmax = d[1];
             ymin = d[2];
             ymax = d[3];
             checkLimits();
             serialNumber = newest.getSerialNumber();  
             changed = true;
             if (onChange != null)
                onChange.compute();
             needsRedraw();
         }
      }
   }


Generated by  Doxygen 1.6.0   Back to index