Search in sources :

Example 1 with WebServerAction

use of jmri.web.server.WebServerAction in project JMRI by JMRI.

the class AppsLaunchFrame method debugMenu.

protected void debugMenu(JMenuBar menuBar, WindowInterface wi, AppsLaunchPane pane) {
    JMenu d = new DebugMenu(pane);
    // also add some tentative items from jmrix
    d.add(new JSeparator());
    d.add(new jmri.jmrix.pricom.PricomMenu());
    d.add(new JSeparator());
    d.add(new jmri.jmrix.jinput.treecontrol.TreeAction());
    d.add(new jmri.jmrix.libusb.UsbViewAction());
    d.add(new JSeparator());
    try {
        d.add(new RunJythonScript(Bundle.getMessage("MenuRailDriverThrottle"), new File(FileUtil.findURL("jython/RailDriver.py").toURI())));
    } catch (URISyntaxException | NullPointerException ex) {
        log.error("Unable to load RailDriver Throttle", ex);
        JMenuItem i = new JMenuItem(Bundle.getMessage("MenuRailDriverThrottle"));
        i.setEnabled(false);
        d.add(i);
    }
    // also add some tentative items from webserver
    d.add(new JSeparator());
    d.add(new WebServerAction());
    d.add(new JSeparator());
    d.add(new WiThrottleCreationAction());
    menuBar.add(d);
}
Also used : RunJythonScript(jmri.jmrit.jython.RunJythonScript) URISyntaxException(java.net.URISyntaxException) JSeparator(javax.swing.JSeparator) DebugMenu(jmri.jmrit.DebugMenu) WiThrottleCreationAction(jmri.jmrit.withrottle.WiThrottleCreationAction) WebServerAction(jmri.web.server.WebServerAction) JMenuItem(javax.swing.JMenuItem) File(java.io.File) JMenu(javax.swing.JMenu)

Example 2 with WebServerAction

use of jmri.web.server.WebServerAction in project JMRI by JMRI.

the class Apps method debugMenu.

protected void debugMenu(JMenuBar menuBar, WindowInterface wi) {
    JMenu d = new DebugMenu(this);
    // also add some tentative items from jmrix
    d.add(new JSeparator());
    d.add(new jmri.jmrix.pricom.PricomMenu());
    d.add(new JSeparator());
    d.add(new jmri.jmrix.jinput.treecontrol.TreeAction());
    d.add(new jmri.jmrix.libusb.UsbViewAction());
    d.add(new JSeparator());
    try {
        d.add(new RunJythonScript(Bundle.getMessage("MenuRailDriverThrottle"), new File(FileUtil.findURL("jython/RailDriver.py").toURI())));
    } catch (URISyntaxException | NullPointerException ex) {
        log.error("Unable to load RailDriver Throttle", ex);
        JMenuItem i = new JMenuItem(Bundle.getMessage("MenuRailDriverThrottle"));
        i.setEnabled(false);
        d.add(i);
    }
    // also add some tentative items from webserver
    d.add(new JSeparator());
    d.add(new WebServerAction());
    d.add(new JSeparator());
    d.add(new WiThrottleCreationAction());
    menuBar.add(d);
}
Also used : RunJythonScript(jmri.jmrit.jython.RunJythonScript) URISyntaxException(java.net.URISyntaxException) JSeparator(javax.swing.JSeparator) DebugMenu(jmri.jmrit.DebugMenu) WiThrottleCreationAction(jmri.jmrit.withrottle.WiThrottleCreationAction) WebServerAction(jmri.web.server.WebServerAction) JMenuItem(javax.swing.JMenuItem) BlockValueFile(jmri.jmrit.display.layoutEditor.BlockValueFile) DecoderIndexFile(jmri.jmrit.decoderdefn.DecoderIndexFile) File(java.io.File) JMenu(javax.swing.JMenu)

Aggregations

File (java.io.File)2 URISyntaxException (java.net.URISyntaxException)2 JMenu (javax.swing.JMenu)2 JMenuItem (javax.swing.JMenuItem)2 JSeparator (javax.swing.JSeparator)2 DebugMenu (jmri.jmrit.DebugMenu)2 RunJythonScript (jmri.jmrit.jython.RunJythonScript)2 WiThrottleCreationAction (jmri.jmrit.withrottle.WiThrottleCreationAction)2 WebServerAction (jmri.web.server.WebServerAction)2 DecoderIndexFile (jmri.jmrit.decoderdefn.DecoderIndexFile)1 BlockValueFile (jmri.jmrit.display.layoutEditor.BlockValueFile)1