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