Пример #1
0
 public void eventDispatched(AWTEvent event) {
   if (isDirectedScanning) {
     MouseEvent me = (MouseEvent) event;
     if (me.getButton() == MouseEvent.BUTTON1) {
       // 96
       // if (HiHaFiambreig) PararTimerFiambreig();
       if (me.getID() == MouseEvent.MOUSE_RELEASED) {
         if (withSwaying) {
           stopSwayingTimer();
         }
         actPanel.clickLeftButton();
         if (withSwaying) {
           startDirectedScanSwayingTimer();
         }
       }
     } else if (me.getButton() == MouseEvent.BUTTON3) {
       if (event.getID() == MouseEvent.MOUSE_RELEASED) {
         if (withSwaying) {
           stopSwayingTimer();
         }
         actPanel.nextScanPosition();
         if (withSwaying) {
           startSwayingTimer();
         }
       }
     }
   }
 }
Пример #2
0
 /**
  * ****************************************************************************************************
  */
 public void enableDirectedScan() {
   disableScanning();
   startScanning();
   isDirectedScanning = true;
   if (withSwaying) {
     stopSwayingTimer();
   }
   actPanel.nextScanPosition();
   if (withSwaying) {
     stopSwayingTimer();
   }
   Toolkit.getDefaultToolkit()
       .addAWTEventListener(mouseDirectedScanListener, AWTEvent.MOUSE_EVENT_MASK);
   Toolkit.getDefaultToolkit()
       .addAWTEventListener(directedScanKeyboardListener, AWTEvent.KEY_EVENT_MASK);
   // if (HiHaFiambreig) TimerEscaneigDirigitEngegarFiambreig();
 }