001package jmri.jmrix.sprog.update;
002
003import java.awt.event.ActionEvent;
004import javax.swing.AbstractAction;
005import jmri.jmrix.sprog.SprogSystemConnectionMemo;
006import org.slf4j.Logger;
007import org.slf4j.LoggerFactory;
008
009/**
010 * Swing action to get SPROG firmware version
011 *
012 * @author Andrew Crosland Copyright (C) 2004
013 */
014public class SprogVersionAction extends AbstractAction {
015
016    private SprogSystemConnectionMemo _memo = null;
017
018    public SprogVersionAction(String s,SprogSystemConnectionMemo memo) {
019        super(s);
020        _memo = memo;
021    }
022
023    @Override
024    public void actionPerformed(ActionEvent e) {
025        // create a SprogVersionFrame
026        SprogVersionFrame f = new SprogVersionFrame(_memo);
027        try {
028            f.initComponents();
029        } catch (Exception ex) {
030            log.warn("SprogIIUpdateAction starting SprogIIUpdateFrame: Exception: {}", ex.toString());
031        }
032//        f.setVisible(true);
033    }
034
035    private final static Logger log = LoggerFactory.getLogger(SprogVersionAction.class);
036
037}