public void actionPerformed(ActionEvent ae){
  String cmd=ae.getActionCommand();
  if (cmd == TimerStatus.TIMER_FORWARD) {
    timeHandler.setClockDirection(1);
    timeHandler.startClock();
  }
 else   if (cmd == TimerStatus.TIMER_BACKWARD) {
    timeHandler.setClockDirection(-1);
    timeHandler.startClock();
  }
 else   if (cmd == TimerStatus.TIMER_STEP_BACKWARD) {
    timeHandler.stepBackward();
  }
 else   if (cmd == TimerStatus.TIMER_STEP_FORWARD) {
    timeHandler.stepForward();
  }
 else   if (cmd == TimerStatus.TIMER_STOPPED) {
    timeHandler.stopClock();
  }
}

public void actionPerformed ( ActionEvent ae ) { String cmd = ae . getActionCommand ( ) ; if ( cmd == TimerStatus . TIMER_FORWARD ) { timeHandler . setClockDirection ( 1 ) ; timeHandler . startClock ( ) ; } else if ( cmd == TimerStatus . TIMER_BACKWARD ) { timeHandler . setClockDirection ( - 1 ) ; timeHandler . startClock ( ) ; } else if ( cmd == TimerStatus . TIMER_STEP_BACKWARD ) { timeHandler . stepBackward ( ) ; } else if ( cmd == TimerStatus . TIMER_STEP_FORWARD ) { timeHandler . stepForward ( ) ; } else if ( cmd == TimerStatus . TIMER_STOPPED ) { timeHandler . stopClock ( ) ; } }
actionlistener interface method listens to the timer , in case something else starts it , we can update the gui . also listens to this button , to start and stop the given timer .
