Package cern.accsoft.steering.aloha.meas
Class MeasurementManagerImpl
- java.lang.Object
-
- cern.accsoft.steering.aloha.meas.MeasurementManagerImpl
-
- All Implemented Interfaces:
MeasurementManager,ModelDelegateManager
public class MeasurementManagerImpl extends java.lang.Object implements MeasurementManager, ModelDelegateManager
This is the implementation of a class, which keeps track of all loaded measurements in aloha.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface cern.accsoft.steering.aloha.meas.MeasurementManager
MeasurementManager.ModelDelegateInstance
-
-
Constructor Summary
Constructors Constructor Description MeasurementManagerImpl()
-
Method Summary
-
-
-
Method Detail
-
addMeasurement
public void addMeasurement(ModelAwareMeasurement measurement)
- Specified by:
addMeasurementin interfaceMeasurementManager- Parameters:
measurement- the measurement to add to the manager
-
getMeasurements
public java.util.List<ModelAwareMeasurement> getMeasurements()
- Specified by:
getMeasurementsin interfaceMeasurementManager- Returns:
- all loaded measurements
-
removeMeasurement
public void removeMeasurement(int index)
- Specified by:
removeMeasurementin interfaceMeasurementManager- Parameters:
index- the measurement to remove from the manager
-
addListener
public void addListener(MeasurementManagerListener listener)
Description copied from interface:MeasurementManageradd a listener- Specified by:
addListenerin interfaceMeasurementManager- Parameters:
listener- the listener to add
-
removeListener
public void removeListener(MeasurementManagerListener listener)
Description copied from interface:MeasurementManagerremoves a listener- Specified by:
removeListenerin interfaceMeasurementManager- Parameters:
listener- the listener to remove
-
getActiveMeasurement
public ModelAwareMeasurement getActiveMeasurement()
- Specified by:
getActiveMeasurementin interfaceMeasurementManager- Returns:
- the actually active measurement
-
setActiveMeasurement
public void setActiveMeasurement(int index)
Description copied from interface:MeasurementManagersets the active measurement to the given one- Specified by:
setActiveMeasurementin interfaceMeasurementManager- Parameters:
index- the index of measurement to set as active
-
setActiveMeasurement
public void setActiveMeasurement(ModelAwareMeasurement measurement)
Description copied from interface:MeasurementManagersets the given measurement as the active one. The settings are then changed according to the offsets in this measurement. This should only be done through this mechanism, to ensure, that all old settings are removed.- Specified by:
setActiveMeasurementin interfaceMeasurementManager
-
getModelDelegateInstances
public java.util.List<MeasurementManager.ModelDelegateInstance> getModelDelegateInstances()
- Specified by:
getModelDelegateInstancesin interfaceModelDelegateManager- Returns:
- all model-instances in a list
-
getModelDelegates
public java.util.List<ModelDelegate> getModelDelegates()
- Specified by:
getModelDelegatesin interfaceModelDelegateManager- Returns:
- all the model delegates.
-
addListener
public void addListener(ModelDelegateManagerListener listener)
Description copied from interface:ModelDelegateManageradd a listener to theModelDelegateManager- Specified by:
addListenerin interfaceModelDelegateManager
-
removeListener
public void removeListener(ModelDelegateManagerListener listener)
Description copied from interface:ModelDelegateManagerremove a listener- Specified by:
removeListenerin interfaceModelDelegateManager- Parameters:
listener- the listener to remove
-
setModelManager
public void setModelManager(cern.accsoft.steering.jmad.model.manage.JMadModelManager modelManager)
-
getMeasurements
public java.util.List<ModelAwareMeasurement> getMeasurements(MeasurementType type)
- Specified by:
getMeasurementsin interfaceMeasurementManager- Parameters:
type- the type of the measurements to retrieve- Returns:
- all the measurements of a given type
-
getActiveModelDelegate
public ModelDelegate getActiveModelDelegate()
- Specified by:
getActiveModelDelegatein interfaceModelDelegateManager- Returns:
- The model - delegate of the active measurement (if any)
-
-