Пример #1
0
  /**
   * Adds this instance to a VisAD display. This method is package private because it is expected
   * that only the constructor's DisplayAdapter argument will invoke this method.
   *
   * @throws VisADException VisAD failure.
   * @throws RemoteException Java RMI failure.
   */
  void addTo() throws VisADException, RemoteException {

    display.addReferences(
        dataRenderer,
        dataReference,
        (constantMaps == null) ? null : constantMaps.getConstantMaps());
  }
 public void propertyChange(PropertyChangeEvent evt) {
   if (evt.getPropertyName().equals(InstallOptionsModel.PROPERTY_INDEX)) {
     mDialog.moveChild(mCurrentWidget, ((Integer) evt.getNewValue()).intValue());
   } else if (evt.getPropertyName().equals(InstallOptionsModel.PROPERTY_CHILDREN)) {
     if (Common.objectsAreEqual(mCurrentWidget, evt.getOldValue())
         && evt.getNewValue() instanceof InstallOptionsWidget) {
       InstallOptionsWidget widget = (InstallOptionsWidget) evt.getNewValue();
       mCurrentWidget.removeModelCommandListener(InstallOptionsWidgetEditorDialog.this);
       mCurrentWidget.removePropertyChangeListener(InstallOptionsWidgetEditorDialog.this);
       mCurrentWidget = widget;
       mSection = mCurrentWidget.getSection();
       mCurrentWidget.addModelCommandListener(InstallOptionsWidgetEditorDialog.this);
       mCurrentWidget.addPropertyChangeListener(InstallOptionsWidgetEditorDialog.this);
       Display.getDefault()
           .asyncExec(
               new Runnable() {
                 public void run() {
                   mPage.selectionChanged(null, new StructuredSelection(mCurrentWidget));
                 }
               });
     }
   }
 }
Пример #3
0
 /**
  * Removes this instance from a VisAD display. This method is package private because it is
  * expected that only the constructor's DisplayAdapter argument will invoke this method.
  *
  * @throws VisADException VisAD failure.
  * @throws RemoteException Java RMI failure.
  */
 void removeFrom() throws VisADException, RemoteException {
   display.removeReference(dataReference);
 }