use of jmri.jmrit.logix.OBlockManager in project JMRI by JMRI.
the class CircuitBuilder method makeMenu.
/**
* Makes menu for ControlPanelEditor Called by ControlPanelEditor at init
* before contents have been loaded
*/
protected JMenu makeMenu() {
if (_circuitMenu == null) {
_circuitMenu = new JMenu(Bundle.getMessage("CircuitBuilder"));
_circuitMap = new HashMap<OBlock, ArrayList<Positionable>>();
OBlockManager manager = InstanceManager.getDefault(jmri.jmrit.logix.OBlockManager.class);
String[] sysNames = manager.getSystemNameArray();
for (int i = 0; i < sysNames.length; i++) {
OBlock block = manager.getBySystemName(sysNames[i]);
_circuitMap.put(block, new ArrayList<Positionable>());
}
}
makeCircuitMenu();
return _circuitMenu;
}
use of jmri.jmrit.logix.OBlockManager in project JMRI by JMRI.
the class CircuitBuilder method errorCheck.
private void errorCheck() {
WarrantTableAction.initPathPortalCheck();
OBlockManager manager = InstanceManager.getDefault(jmri.jmrit.logix.OBlockManager.class);
String[] sysNames = manager.getSystemNameArray();
for (int i = 0; i < sysNames.length; i++) {
WarrantTableAction.checkPathPortals(manager.getBySystemName(sysNames[i]));
}
if (!WarrantTableAction.showPathPortalErrors()) {
JOptionPane.showMessageDialog(_editCircuitFrame, Bundle.getMessage("blocksEtcOK"), Bundle.getMessage("ButtonOK"), javax.swing.JOptionPane.INFORMATION_MESSAGE);
}
}
Aggregations