Esempio n. 1
0
 /**
  * explicitly set the range of data (RealType) values according to Unit conversion between this
  * ScalarMap's RealType and DisplayRealType (both must have Units and they must be convertable; if
  * neither this nor setRange is invoked, then the range will be computed from the initial values
  * of Data objects linked to the Display by autoscaling logic.
  *
  * @throws VisADException VisAD error
  * @throws RemoteException Java RMI error
  */
 public void setRangeByUnits() throws VisADException, RemoteException {
   isManual = true;
   setRange(null, 0.0, 0.0, true);
   if (scale == scale && offset == offset) {
     incTick(); // did work, so wake up Display
   } else {
     isManual = false; // didn't work, so don't lock out auto-scaling
   }
 }
Esempio n. 2
0
 /**
  * explicitly set the range of data (RealType) values; used for linear map from Scalar to
  * DisplayScalar values; if neither this nor setRangeByUnits is invoked, then the range will be
  * computed from the initial values of Data objects linked to the Display by autoscaling logic; if
  * the range of data values is (0.0, 1.0), for example, this method may be invoked with low = 1.0
  * and hi = 0.0 to invert the display scale .
  *
  * @param low lower range value (see notes above)
  * @param hi upper range value (see notes above)
  * @param remoteId id of remote scale
  * @throws VisADException VisAD error
  * @throws RemoteException Java RMI error
  */
 public void setRange(double low, double hi, int remoteId) throws VisADException, RemoteException {
   if (DisplayScalar.equals(Display.Animation)) {
     System.err.println("Warning: setRange on " + "ScalarMap to Display.Animation has no effect.");
     return;
   }
   isManual = true;
   setRange(null, low, hi, false, remoteId);
   if (scale == scale && offset == offset) {
     incTick(); // did work, so wake up Display
   } else {
     isManual = false; // didn't work, so don't lock out auto-scaling
   }
 }