001package jmri.jmris.simpleserver;
002
003import jmri.InstanceManager;
004
005import java.awt.event.ActionEvent;
006import javax.swing.AbstractAction;
007
008/**
009 * Swing action to create and register a SimpleServerControlFrame object
010 *
011 * @author Paul Bender Copyright (C) 2010
012 */
013public class SimpleServerAction extends AbstractAction {
014
015    public SimpleServerAction(String s) {
016        super(s);
017    }
018
019    public SimpleServerAction() {
020        this("Start JMRI Simple Server");
021    }
022
023    @Override
024    public void actionPerformed(ActionEvent e) {
025        InstanceManager.getDefault(SimpleServerManager.class).getServer().start();
026    }
027}
028
029
030