package pipe.gui;
import java.awt.event.ActionEvent;

import javax.swing.AbstractAction;

import pipe.dataLayer.Transition;



/**
 * Action object that can be used to add a rate to a transition.
 */
public class EditTimedAction extends AbstractAction {

  private Transition selected;


  public EditTimedAction(Transition component) {
    selected = component;

  }
  
  /** Action for toggling timing on/off */
  public void actionPerformed(ActionEvent e) {

    boolean currentTimed = selected.getTimed();
    if (currentTimed == false)
    	selected.setTimed(true);
    else
    	selected.setTimed(false);
  }

}
