Package cern.accsoft.steering.aloha.meas
Interface MeasurementManager
-
- All Known Implementing Classes:
MeasurementManagerImpl
public interface MeasurementManagerThis is the interface for a class, which keeps track of the loaded measurements and the models they use.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classMeasurementManager.ModelDelegateInstanceThis class is a helper class which holds one model instance and references to measurements which use the one instance.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddListener(MeasurementManagerListener listener)add a listenervoidaddMeasurement(ModelAwareMeasurement measurement)MeasurementgetActiveMeasurement()java.util.List<ModelAwareMeasurement>getMeasurements()java.util.List<ModelAwareMeasurement>getMeasurements(MeasurementType type)voidremoveListener(MeasurementManagerListener listener)removes a listenervoidremoveMeasurement(int index)voidsetActiveMeasurement(int index)sets the active measurement to the given onevoidsetActiveMeasurement(ModelAwareMeasurement measurement)sets the given measurement as the active one.
-
-
-
Method Detail
-
getMeasurements
java.util.List<ModelAwareMeasurement> getMeasurements()
- Returns:
- all loaded measurements
-
getMeasurements
java.util.List<ModelAwareMeasurement> getMeasurements(MeasurementType type)
- Parameters:
type- the type of the measurements to retrieve- Returns:
- all the measurements of a given type
-
addMeasurement
void addMeasurement(ModelAwareMeasurement measurement)
- Parameters:
measurement- the measurement to add to the manager
-
removeMeasurement
void removeMeasurement(int index)
- Parameters:
index- the measurement to remove from the manager
-
setActiveMeasurement
void setActiveMeasurement(int index)
sets the active measurement to the given one- Parameters:
index- the index of measurement to set as active
-
setActiveMeasurement
void setActiveMeasurement(ModelAwareMeasurement measurement)
sets 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.- Parameters:
measurement-
-
getActiveMeasurement
Measurement getActiveMeasurement()
- Returns:
- the actually active measurement
-
addListener
void addListener(MeasurementManagerListener listener)
add a listener- Parameters:
listener- the listener to add
-
removeListener
void removeListener(MeasurementManagerListener listener)
removes a listener- Parameters:
listener- the listener to remove
-
-