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