001package jmri.jmrit.operations.automation; 002 003import java.awt.Frame; 004import java.awt.event.ActionEvent; 005import javax.swing.AbstractAction; 006 007/** 008 * Swing action create a AutomationsTableFrame. 009 * 010 * @author Bob Jacobsen Copyright (C) 2001 011 * @author Daniel Boudreau Copyright (C) 2016 012 */ 013public class AutomationsTableFrameAction extends AbstractAction { 014 015 public AutomationsTableFrameAction() { 016 super(Bundle.getMessage("TitleAutomation")); 017 } 018 019 AutomationsTableFrame f = null; 020 021 @Override 022 public void actionPerformed(ActionEvent e) { 023 // create a schedule table frame 024 if (f == null || !f.isVisible()) { 025 f = new AutomationsTableFrame(); 026 } 027 f.setExtendedState(Frame.NORMAL); 028 f.setVisible(true); // this also brings the frame into focus 029 } 030} 031 032