use of jmri.jmrit.signalling.entryexit.Source in project JMRI by JMRI.
the class EntryExitPairs method processRoutesToSet.
/**
* Activate each SourceToDest set in routesToSet
*/
synchronized void processRoutesToSet() {
if (routesToSet.isEmpty()) {
return;
}
Source s = routesToSet.get(0).s;
DestinationPoints dp = routesToSet.get(0).dp;
boolean dir = routesToSet.get(0).direction;
currentDealing = routesToSet.get(0).ref;
routesToSet.remove(0);
dp.addPropertyChangeListener(propertyDestinationListener);
s.activeBean(dp, dir);
}
use of jmri.jmrit.signalling.entryexit.Source in project JMRI by JMRI.
the class EntryExitPairs method addNXDestination.
public void addNXDestination(NamedBean source, NamedBean destination, LayoutEditor panel, String id) {
if (source == null) {
log.error("no source Object provided");
return;
}
if (destination == null) {
log.error("no destination Object provided");
return;
}
PointDetails sourcePoint = providePoint(source, panel);
if (sourcePoint == null) {
log.error("source point for " + source.getDisplayName() + " not created addNXDes");
return;
}
sourcePoint.setPanel(panel);
sourcePoint.setRefObject(source);
PointDetails destPoint = providePoint(destination, panel);
if (destPoint != null) {
destPoint.setPanel(panel);
destPoint.setRefObject(destination);
if (!nxpair.containsKey(sourcePoint)) {
nxpair.put(sourcePoint, new Source(sourcePoint));
}
nxpair.get(sourcePoint).addDestination(destPoint, id);
}
firePropertyChange("length", null, null);
}
Aggregations