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 manifest text
010 * strings.
011 *
012 * @author Bob Jacobsen Copyright (C) 2001
013 * @author Daniel Boudreau Copyright (C) 2013
014 * 
015 */
016public class EditManifestTextAction extends AbstractAction {
017
018    public EditManifestTextAction() {
019        super(Bundle.getMessage("TitleManifestText"));
020    }
021
022    EditManifestTextFrame 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 EditManifestTextFrame();
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(EditManifestTextAction.class);
036}
037
038