Beispiel #1
0
 /** Restore the previously active Event handlers. */
 final void restoreGui() {
   clearGui();
   for (final KeyListener l : canvasKeyListeners) canvas.addKeyListener(l);
   for (final KeyListener l : windowKeyListeners) window.addKeyListener(l);
   for (final KeyListener l : ijKeyListeners) ij.addKeyListener(l);
   for (final MouseListener l : canvasMouseListeners) canvas.addMouseListener(l);
   for (final MouseMotionListener l : canvasMouseMotionListeners)
     canvas.addMouseMotionListener(l);
   for (final MouseWheelListener l : windowMouseWheelListeners) window.addMouseWheelListener(l);
 }
Beispiel #2
0
    /** Add new event handlers. */
    final void takeOverGui() {
      canvas.addKeyListener(Panorama_View.this);
      window.addKeyListener(Panorama_View.this);

      canvas.addMouseMotionListener(Panorama_View.this);

      canvas.addMouseListener(Panorama_View.this);

      ij.addKeyListener(Panorama_View.this);

      window.addMouseWheelListener(Panorama_View.this);
    }