001package jmri.jmrix.xpa.swing.xpaconfig;
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 XpaConfigureFrame object.
010 *
011 * @author Paul Bender Copyright (C) 2004
012 */
013public class XpaConfigureAction extends AbstractAction {
014  
015    private final jmri.jmrix.xpa.XpaSystemConnectionMemo memo;
016
017    public XpaConfigureAction(String s,jmri.jmrix.xpa.XpaSystemConnectionMemo m) {
018        super(s);
019        memo = m;
020    }
021
022    @Override
023    public void actionPerformed(ActionEvent e) {
024        XpaConfigureFrame f = new XpaConfigureFrame(memo);
025        try {
026            f.initComponents();
027        } catch (Exception ex) {
028            log.error("Exception: {}", ex.toString());
029        }
030        f.setVisible(true);
031    }
032
033    private final static Logger log = LoggerFactory.getLogger(XpaConfigureAction.class);
034
035}