Search in sources :

Example 1 with StackNXPanel

use of jmri.jmrit.signalling.entryexit.StackNXPanel in project JMRI by JMRI.

the class EntryExitPairs method stackNXRoute.

/**
     * If a route is requested but is currently blocked, ask user
     * if it should be added to stackList.
     *
     * @param dp DestinationPoints object
     * @param reverse true for a reversed running direction, mostly false
     */
public synchronized void stackNXRoute(DestinationPoints dp, boolean reverse) {
    if (isRouteStacked(dp, reverse)) {
        return;
    }
    stackList.add(new StackDetails(dp, reverse));
    checkTimer.start();
    if (stackPanel == null) {
        stackPanel = new StackNXPanel();
    }
    if (stackDialog == null) {
        stackDialog = new JDialog();
        stackDialog.setTitle(Bundle.getMessage("WindowTitleStackRoutes"));
        stackDialog.add(stackPanel);
    }
    stackPanel.updateGUI();
    stackDialog.pack();
    stackDialog.setModal(false);
    stackDialog.setVisible(true);
}
Also used : StackNXPanel(jmri.jmrit.signalling.entryexit.StackNXPanel) JDialog(javax.swing.JDialog)

Aggregations

JDialog (javax.swing.JDialog)1 StackNXPanel (jmri.jmrit.signalling.entryexit.StackNXPanel)1