use of jmri.SignalMast in project JMRI by JMRI.
the class LayoutTurnout method setSignalCMast.
public void setSignalCMast(String signalMast) {
if (signalMast == null || signalMast.equals("")) {
signalCMastNamed = null;
return;
}
SignalMast mast = InstanceManager.getDefault(jmri.SignalMastManager.class).getSignalMast(signalMast);
if (mast != null) {
signalCMastNamed = InstanceManager.getDefault(jmri.NamedBeanHandleManager.class).getNamedBeanHandle(signalMast, mast);
} else {
log.error("Signal Mast " + signalMast + " Not found for turnout " + getTurnoutName());
signalCMastNamed = null;
}
}
use of jmri.SignalMast in project JMRI by JMRI.
the class LevelXing method setSignalDMast.
public void setSignalDMast(String signalMast) {
if (signalMast == null || signalMast.equals("")) {
signalDMastNamed = null;
return;
}
try {
SignalMast mast = InstanceManager.getDefault(jmri.SignalMastManager.class).provideSignalMast(signalMast);
signalDMastNamed = InstanceManager.getDefault(jmri.NamedBeanHandleManager.class).getNamedBeanHandle(signalMast, mast);
} catch (IllegalArgumentException ex) {
signalDMastNamed = null;
}
}
use of jmri.SignalMast in project JMRI by JMRI.
the class LevelXing method setSignalCMast.
public void setSignalCMast(String signalMast) {
if (signalMast == null || signalMast.equals("")) {
signalCMastNamed = null;
return;
}
try {
SignalMast mast = InstanceManager.getDefault(jmri.SignalMastManager.class).provideSignalMast(signalMast);
signalCMastNamed = InstanceManager.getDefault(jmri.NamedBeanHandleManager.class).getNamedBeanHandle(signalMast, mast);
} catch (IllegalArgumentException ex) {
signalCMastNamed = null;
}
}
use of jmri.SignalMast in project JMRI by JMRI.
the class DefaultSignalGroup method setSignalMast.
@Override
public void setSignalMast(String pName) {
SignalMast mMast = InstanceManager.getDefault(jmri.SignalMastManager.class).getBySystemName(pName);
if (mMast == null) {
mMast = InstanceManager.getDefault(jmri.SignalMastManager.class).getByUserName(pName);
}
if (mMast == null) {
log.warn("did not find a Signal Mast named {}", pName);
return;
}
setSignalMast(mMast, pName);
}
use of jmri.SignalMast in project JMRI by JMRI.
the class DefaultSignalMastLogic method dispose.
@Override
public void dispose() {
if (thr != null) {
thr.interrupt();
}
disposing = true;
getSourceMast().removePropertyChangeListener(propertySourceMastListener);
Enumeration<SignalMast> en = destList.keys();
while (en.hasMoreElements()) {
SignalMast dm = en.nextElement();
destList.get(dm).dispose();
}
}
Aggregations