001package apps.gui3.lccpro;
002
003import apps.gui3.Apps3;
004import jmri.Application;
005import jmri.jmrix.openlcb.swing.lccpro.LccProFrame;
006
007/**
008 * Standalone LccPro Window.
009 */
010public class LccProWindow extends LccProFrame {
011
012    /**
013     * Loads LccPro with the default set of menus and toolbars
014     */
015    public LccProWindow() {
016        super(Application.getApplicationName());
017    }
018
019    /**
020     * Loads LccPro with specific menu and toolbar files.
021     *
022     * @param menuFile XML file with menu structure
023     * @param toolbarFile XML file with toolbar structure
024     */
025    public LccProWindow(String menuFile, String toolbarFile) {
026        super(Application.getApplicationName(),
027                menuFile,
028                toolbarFile);
029        this.setNewWindowAction(new LccProAction("newWindow", this));
030    }
031
032    // for some reason, the super implementation does not get called automatically
033    @Override
034    public void remoteCalls(String[] args) {
035        super.remoteCalls(args);
036    }
037
038    @Override
039    protected void additionsToToolBar() {
040        // This buttonspace value may return null if the LccPro window has 
041        // been called from the traditional JMRI menu frame
042        if (Apps3.buttonSpace() != null) {
043            getToolBar().add(Apps3.buttonSpace());
044        }
045        super.additionsToToolBar();
046    }
047
048}