001package jmri.jmrit.simpleclock;
002
003import java.awt.event.ActionEvent;
004import javax.swing.AbstractAction;
005import org.slf4j.Logger;
006import org.slf4j.LoggerFactory;
007
008/**
009 * Swing action to create and register a SimpleClockFrame object
010 *
011 * @author Dave Duchamp Copyright (C) 2004
012 */
013public class SimpleClockAction extends AbstractAction {
014
015    public SimpleClockAction(String s) {
016        super(s);
017    }
018
019    public SimpleClockAction() {
020        super("Fast Clock Setup");
021    }
022
023    @Override
024    public void actionPerformed(ActionEvent e) {
025
026        SimpleClockFrame f = new SimpleClockFrame();
027        try {
028            f.initComponents();
029        } catch (Exception E) {
030            log.error("Exception in Simple Clock: {}", e);
031        }
032        f.setVisible(true);
033    }
034
035    private final static Logger log = LoggerFactory.getLogger(SimpleClockAction.class);
036}