Ejemplo n.º 1
0
 /**
  * Set the DisplayImpl this ScalarMap is linked to
  *
  * @param d display to link to
  * @throws VisADException map is already linked to a DisplayImpl or other VisAD error
  */
 synchronized void setDisplay(DisplayImpl d) throws VisADException {
   if (d.equals(display)) return;
   if (display != null) {
     throw new DisplayException(
         "ScalarMap.setDisplay: ScalarMap cannot belong" + " to two Displays");
   }
   display = d;
   if (scale_flag) makeScale();
   // System.out.println("setDisplay " + Scalar + " -> " + DisplayScalar);
   // WLH 27 Nov 2000
   if (!(this instanceof ConstantMap)) {
     ProjectionControl pcontrol = display.getProjectionControl();
     try {
       setAspectCartesian(pcontrol.getAspectCartesian());
     } catch (RemoteException e) {
     }
   }
 }