protected void update(TimerStatus newStatus){
  if (newStatus == TimerStatus.FORWARD) {
    if (Debug.debugging("timedetail")) {
      Debug.output("TimerControlButtonPanel: TIMER_FORWARD");
    }
    backwardButton.setIcon(backwardIcon);
    backwardButton.setActionCommand(TimerStatus.TIMER_BACKWARD);
    forwardButton.setIcon(pauseIcon);
    forwardButton.setActionCommand(TimerStatus.TIMER_STOPPED);
  }
 else   if (newStatus == TimerStatus.BACKWARD) {
    if (Debug.debugging("timedetail")) {
      Debug.output("TimerControlButtonPanel: TIMER_BACKWARD");
    }
    forwardButton.setIcon(forwardIcon);
    forwardButton.setActionCommand(TimerStatus.TIMER_FORWARD);
    backwardButton.setIcon(pauseIcon);
    backwardButton.setActionCommand(TimerStatus.TIMER_STOPPED);
  }
 else   if (newStatus == TimerStatus.STOPPED) {
    if (Debug.debugging("timedetail")) {
      Debug.output("TimerControlButtonPanel: TIMER_STOPPED");
    }
    forwardButton.setIcon(forwardIcon);
    forwardButton.setActionCommand(TimerStatus.TIMER_FORWARD);
    backwardButton.setIcon(backwardIcon);
    backwardButton.setActionCommand(TimerStatus.TIMER_BACKWARD);
  }
  checkClock(newStatus);
}

protected void update ( TimerStatus newStatus ) { if ( newStatus == TimerStatus . FORWARD ) { if ( Debug . debugging ( "timedetail" ) ) { Debug . output ( "TimerControlButtonPanel: TIMER_FORWARD" ) ; } backwardButton . setIcon ( backwardIcon ) ; backwardButton . setActionCommand ( TimerStatus . TIMER_BACKWARD ) ; forwardButton . setIcon ( pauseIcon ) ; forwardButton . setActionCommand ( TimerStatus . TIMER_STOPPED ) ; } else if ( newStatus == TimerStatus . BACKWARD ) { if ( Debug . debugging ( "timedetail" ) ) { Debug . output ( "TimerControlButtonPanel: TIMER_BACKWARD" ) ; } forwardButton . setIcon ( forwardIcon ) ; forwardButton . setActionCommand ( TimerStatus . TIMER_FORWARD ) ; backwardButton . setIcon ( pauseIcon ) ; backwardButton . setActionCommand ( TimerStatus . TIMER_STOPPED ) ; } else if ( newStatus == TimerStatus . STOPPED ) { if ( Debug . debugging ( "timedetail" ) ) { Debug . output ( "TimerControlButtonPanel: TIMER_STOPPED" ) ; } forwardButton . setIcon ( forwardIcon ) ; forwardButton . setActionCommand ( TimerStatus . TIMER_FORWARD ) ; backwardButton . setIcon ( backwardIcon ) ; backwardButton . setActionCommand ( TimerStatus . TIMER_BACKWARD ) ; } checkClock ( newStatus ) ; }
propertychangelistener interface method used to find out when the timer has been stopped and started . is expecting that the property name and value are the actual string objects defined in the timeconstants interface . it does = = , not equals ( ) .
