/** * Remove an OrbitSource from this model's orbit sources. * * @param orbitSource the orbit source to remove. */ public void removeOrbitSource(final OrbitSource orbitSource) { synchronized (_orbitSources) { _orbitSources.remove(orbitSource); EVENT_PROXY.orbitSourceRemoved(this, orbitSource); } postModification(); }
/** * Add a new OrbitSource to this model's orbit sources. * * @param orbitSource the new orbit source to add */ public void addOrbitSource(final OrbitSource orbitSource) { synchronized (_orbitSources) { if (!_orbitSources.contains(orbitSource)) { orbitSource.setSequence(_sequence, _bpmAgents); _orbitSources.add(orbitSource); EVENT_PROXY.orbitSourceAdded(this, orbitSource); } } postModification(); }
/** refresh enabled BPMs */ protected void refreshEnabledBPMs(final boolean postChange) { final List<BpmAgent> bpmAgents = new ArrayList<BpmAgent>(AVAILABLE_BPM_AGENTS.size()); for (final BpmAgent bpmAgent : AVAILABLE_BPM_AGENTS) { if (bpmAgent.isEnabled()) { bpmAgents.add(bpmAgent); } } _bpmAgents = new ArrayList<BpmAgent>(); _bpmAgents.addAll(bpmAgents); if (postChange) { for (final OrbitSource source : _orbitSources) { source.setSequence(_sequence, _bpmAgents); } EVENT_PROXY.enabledBPMsChanged(this, _bpmAgents); } }
/** * Set the selected sequence * * @param sequence the new selected sequence */ public void setSequence(final AcceleratorSeq sequence) { _sequence = sequence; // clear the probe since a new one will need to be made for the new sequence _baseProbe = null; loadBPMs(); loadCorrectors(); useSetpoints(sequence); BEAM_EXCURSION_ORBIT_ADAPTOR.setSequence(sequence); BEAM_EXCURSION_ORBIT_ADAPTOR.setBPMAgents(_bpmAgents); synchronized (_orbitSources) { for (final OrbitSource orbitSource : _orbitSources) { orbitSource.setSequence(sequence, _bpmAgents); } } _modificationStore.postModification(this); EVENT_PROXY.sequenceChanged(this, sequence); }