001package jmri.jmrit.operations.automation;
002
003import java.awt.Frame;
004import java.awt.event.ActionEvent;
005
006import javax.swing.AbstractAction;
007
008/**
009 * Action to resume all automations
010 *
011 * @author Daniel Boudreau Copyright (C) 2019
012 */
013public class AutomationStartupAction extends AbstractAction {
014
015    public AutomationStartupAction() {
016        super(Bundle.getMessage("MenuStartupAutomation"));
017    }
018    
019    AutomationStartupFrame f = null;
020
021    @Override
022    public void actionPerformed(ActionEvent e) {
023        if (f != null && f.isVisible()) {
024            f.dispose();
025        }
026        f = new AutomationStartupFrame();
027        f.initComponents();
028        f.setExtendedState(Frame.NORMAL);
029    }
030}