001package jmri.jmrit.simpleclock; 002 003import java.awt.event.ActionEvent; 004import javax.swing.Icon; 005import jmri.util.swing.JmriAbstractAction; 006import jmri.util.swing.WindowInterface; 007 008/** 009 * Swing action to create and register a SimpleClockFrame object 010 * 011 * @author Dave Duchamp Copyright (C) 2004 012 * @author Bob Jacobsen Copyright (C) 2024 013 */ 014public class SimpleClockAction extends JmriAbstractAction { 015 016 public SimpleClockAction(String s) { 017 super(s); 018 } 019 020 public SimpleClockAction() { 021 super("Fast Clock Setup"); 022 } 023 024 public SimpleClockAction(String s, WindowInterface wi) { 025 super(s, wi); 026 } 027 028 public SimpleClockAction(String s, Icon i, WindowInterface wi) { 029 super(s, i, wi); 030 } 031 032 @Override 033 public void actionPerformed(ActionEvent e) { 034 035 SimpleClockFrame f = new SimpleClockFrame(); 036 try { 037 f.initComponents(); 038 } catch (Exception E) { 039 log.error("Exception in Simple Clock: {}", e); 040 } 041 f.setVisible(true); 042 } 043 044 @Override 045 public jmri.util.swing.JmriPanel makePanel() { return null; } // not used here 046 047 private final static org.slf4j.Logger log = org.slf4j.LoggerFactory.getLogger(SimpleClockAction.class); 048}