Esempio n. 1
0
 private void fireUpdate(Manip manip) {
   Set windows = (Set) manipToWindowMap.get(manip);
   assert windows != null;
   for (Iterator iter = windows.iterator(); iter.hasNext(); ) {
     windowListener.update((AWTGLAutoDrawable) iter.next());
   }
 }
Esempio n. 2
0
 /** Remove a given manipulator from a given window. The window must be registered. */
 public synchronized void removeManipFromWindow(Manip manip, AWTGLAutoDrawable window) {
   WindowInfo info = (WindowInfo) windowToInfoMap.get(window);
   if (info == null) {
     throw new RuntimeException("Window not registered");
   }
   if (!info.manips.remove(manip)) {
     throw new RuntimeException("Manip not registered in window");
   }
   Set windows = (Set) manipToWindowMap.get(manip);
   assert windows != null;
   windows.remove(window);
 }
Esempio n. 3
0
 /**
  * Make a given manipulator visible and active in a given window. The window must be registered.
  */
 public synchronized void showManipInWindow(Manip manip, AWTGLAutoDrawable window) {
   WindowInfo info = (WindowInfo) windowToInfoMap.get(window);
   if (info == null) {
     throw new RuntimeException("Window not registered");
   }
   info.manips.add(manip);
   Set windows = (Set) manipToWindowMap.get(manip);
   if (windows == null) {
     windows = new HashSet();
     manipToWindowMap.put(manip, windows);
   }
   windows.add(window);
 }