001package jmri.jmrit.operations.trains.schedules; 002 003import java.awt.event.ActionEvent; 004import javax.swing.AbstractAction; 005 006/** 007 * Action to edit train schedule 008 * 009 * @author Daniel Boudreau Copyright (C) 2010 010 */ 011public class TrainsScheduleEditAction extends AbstractAction { 012 013 public TrainsScheduleEditAction() { 014 super(Bundle.getMessage("MenuItemEditSchedule")); 015 } 016 017 TrainsScheduleEditFrame frame; 018 019 @Override 020 public void actionPerformed(ActionEvent e) { 021 if (frame != null) { 022 frame.dispose(); 023 } 024 frame = new TrainsScheduleEditFrame(); 025 } 026 027}