001package jmri.jmrit.operations.automation;
002
003import java.awt.event.ActionEvent;
004import javax.swing.AbstractAction;
005
006/**
007 * Action to reset an automation
008 *
009 * @author Daniel Boudreau Copyright (C) 2016
010 */
011public class AutomationResetAction extends AbstractAction {
012
013    private AutomationTableFrame _frame;
014
015    public AutomationResetAction(AutomationTableFrame frame) {
016        super(Bundle.getMessage("MenuResetAutomation"));
017        _frame = frame;
018    }
019
020    @Override
021    public void actionPerformed(ActionEvent e) {
022        if (_frame._automation != null) {
023            _frame._automation.reset();
024        }
025    }
026}