コード例 #1
0
 public void annihilate() {
   try {
     display.removeReference(selector);
     display.removeReference(line);
   } catch (Exception e) {
     LogUtil.logException("DragLine.annihilate", e);
   }
 }
コード例 #2
0
  public void removeRef(final DataReference thing) throws VisADException, RemoteException {
    if (display == null) return;

    synchronized (displayedThings) {
      displayedThings.remove(thing);
      colorMaps.remove(thing);
      idToRef.remove(thing.getName());
      display.removeReference(thing);
    }
  }
コード例 #3
0
  public void refreshDisplay() throws VisADException, RemoteException {
    if (display == null) return;

    synchronized (displayedThings) {
      for (DataReference ref : displayedThings) {
        display.removeReference(ref);
        display.addReference(ref, colorMaps.get(ref));
      }
    }
  }
コード例 #4
0
  public void reorderDataRefsById(final List<String> dataRefIds) {
    if (dataRefIds == null) throw new NullPointerException("");

    synchronized (displayedThings) {
      try {
        displayedThings.clear();
        for (String refId : dataRefIds) {
          DataReference ref = idToRef.get(refId);
          ConstantMap[] color = colorMaps.get(ref);
          display.removeReference(ref);
          display.addReference(ref, color);
        }
      } catch (Exception e) {
      }
    }
  }