Example #1
0
 public void windowGainedFocus(WindowEvent arg0) {
   // make sure this dialog is the current selection listener
   if (app.getMode() != EuclidianConstants.MODE_SELECTION_LISTENER
       || app.getCurrentSelectionListener() != this) {
     app.setSelectionListenerMode(this);
     selectionChanged();
   }
 }
Example #2
0
  private void setViewActive(boolean flag) {
    if (flag == viewActive) return;
    viewActive = flag;

    if (flag) {
      geoTree.clear();
      kernel.attach(geoTree);

      //			// only add objects if there are less than 200
      //			int geoSize = kernel.getConstruction().getGeoSetConstructionOrder().size();
      //			if (geoSize < MAX_OBJECTS_IN_TREE)
      kernel.notifyAddAll(geoTree);

      app.setSelectionListenerMode(this);
      addWindowFocusListener(this);
    } else {
      kernel.detach(geoTree);

      removeWindowFocusListener(this);
      app.setSelectionListenerMode(null);
    }
  }