@Override
 public void mousePressed(MouseEvent e) {
   switch (e.getButton()) {
     case MouseEvent.BUTTON1:
       animator.resume();
       System.out.println("button 1, left click");
       break;
     case MouseEvent.BUTTON2:
       System.out.println("button 2");
       break;
     case MouseEvent.BUTTON3:
       System.out.println("button 3, right click");
       willAnimatorPause = true;
       animator.resume();
       break;
   }
 }
  /** UGS Event Listener */
  @Override
  public void UGSEvent(UGSEvent cse) {
    if (cse.isFileChangeEvent()) {
      animator.pause();

      switch (cse.getFileState()) {
        case FILE_LOADING:
          setGcodeFile(cse.getFile());
          break;
        case FILE_LOADED:
          setProcessedGcodeFile(cse.getFile());
          break;
      }

      animator.resume();
    }
  }
Exemplo n.º 3
0
 public void resumeThread() {
   if (animator != null) {
     animator.resume();
   }
 }