Beispiel #1
0
  /**
   * Set the track to be displayed.
   *
   * @param track must have the form (lat,lon, alt) -> param
   * @exception VisADException couldn't create the necessary VisAD object
   * @exception RemoteException couldn't create the remote object
   */
  public void setTrack(FieldImpl track) throws VisADException, RemoteException {

    // get the RealType of the range from the FlatField
    RealType[] types = ((TupleType) GridUtil.getParamType(track)).getRealComponents();
    RealType ffldType = types[0];

    RealType rgbRealType = getRGBRealType();

    if ((rgbRealType == null) || !ffldType.equals(rgbRealType)) {

      super.setRGBRealType(ffldType);
    }

    if (types.length > 1) {
      RealType newSelectType = (types.length > 1) ? types[1] : getRGBRealType();

      RealType selectRealType = getSelectRealType();

      if ((selectRealType == null) || !newSelectType.equals(selectRealType)) {
        setSelectRealType(newSelectType);
      }
    }

    this.track = track;

    setData(this.track);
  }
Beispiel #2
0
 /**
  * Set the units for the displayed range
  *
  * @param unit Unit for display
  * @throws VisADException VisAD failure.
  * @throws RemoteException Java RMI failure.
  */
 public void setDisplayUnit(Unit unit) throws VisADException, RemoteException {
   // Make sure this unit is ok
   // For now lets comment this out
   //      checkUnit (contourRealType, unit);
   super.setDisplayUnit(unit);
   //      applyDisplayUnit (contourMap, contourRealType);
 }
Beispiel #3
0
  /**
   * Sets the set of ScalarMap-s of this instance. The ScalarMap-s of this instance will be added to
   * the set before the SCALAR_MAP_SET property is set. This method fires a PropertyChangeEvent for
   * SCALAR_MAP_SET with <code>null</code> for the old value and the new set of ScalarMap-s for the
   * new Value. Intermediate subclasses that have their own ScalarMap-s should override this method
   * and invoke <code>super.setScalarMaps(ScalarMapSet)</code>.
   *
   * @param maps The set of ScalarMap-s to be added.
   * @throws BadMappingException The RealType of the contour parameter has not been set or its
   *     ScalarMap is alread in the set.
   */
  protected void setScalarMaps(ScalarMapSet maps) throws BadMappingException {

    if (contourMap == null) {
      throw new BadMappingException(
          getClass().getName()
              + ".setScalarMaps(ScalarMapSet): "
              + "Contour parameter not yet set");
    }

    maps.add(contourMap);
    super.setScalarMapSet(maps);
  }