Exemple #1
0
 public void setFinalDestinationTrack(Track track) {
   Track old = _finalDestTrack;
   _finalDestTrack = track;
   if (track == null) {
     setScheduleItemId(NONE);
   }
   if ((old != null && !old.equals(track)) || (track != null && !track.equals(old))) {
     if (old != null) {
       old.removePropertyChangeListener(this);
       old.deleteReservedInRoute(this);
     }
     if (_finalDestTrack != null) {
       _finalDestTrack.addReservedInRoute(this);
       _finalDestTrack.addPropertyChangeListener(this);
     }
     setDirtyAndFirePropertyChange(FINAL_DESTINATION_TRACK_CHANGED_PROPERTY, old, track);
   }
 }
Exemple #2
0
 private void addPropertyChangeTracks() {
   // only spurs have schedules
   for (Track track : LocationManager.instance().getTracks(Track.SPUR)) {
     track.addPropertyChangeListener(this);
   }
 }