001package jmri.jmrit.operations.setup.gui; 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 day to name mapping. 010 * 011 * @author Daniel Boudreau Copyright (C) 2026 012 * 013 */ 014public class EditDayToNameMapAction extends AbstractAction { 015 016 public EditDayToNameMapAction() { 017 super(Bundle.getMessage("TitleDayToNameMap")); 018 } 019 020 EditDayToNameMapFrame f = null; 021 022 @Override 023 public void actionPerformed(ActionEvent e) { 024 // create a settings frame 025 if (f == null || !f.isVisible()) { 026 f = new EditDayToNameMapFrame(); 027 f.initComponents(); 028 } 029 f.setExtendedState(Frame.NORMAL); 030 f.setVisible(true); // this also brings the frame into focus 031 } 032} 033 034