001package jmri.jmrit.operations.setup;
002
003import java.awt.Frame;
004import java.awt.event.ActionEvent;
005
006import javax.swing.AbstractAction;
007
008/**
009 * Swing action to open a window that allows a user to edit the switch list text
010 * strings.
011 *
012 * @author Bob Jacobsen Copyright (C) 2001
013 * @author Daniel Boudreau Copyright (C) 2013
014 * 
015 */
016public class EditSwitchListTextAction extends AbstractAction {
017
018    public EditSwitchListTextAction() {
019        super(Bundle.getMessage("TitleSwitchListText"));
020    }
021
022    EditSwitchListTextFrame f = null;
023
024    @Override
025    public void actionPerformed(ActionEvent e) {
026        // create a settings frame
027        if (f == null || !f.isVisible()) {
028            f = new EditSwitchListTextFrame();
029            f.initComponents();
030        }
031        f.setExtendedState(Frame.NORMAL);
032        f.setVisible(true); // this also brings the frame into focus
033    }
034
035//    private final static Logger log = LoggerFactory.getLogger(EditSwitchListTextAction.class);
036}
037
038