Package org.eclipse.scanning.api.ui
Class ScannableUIPreferences
java.lang.Object
org.eclipse.scanning.api.AbstractNameable
org.eclipse.scanning.api.ui.ScannableUIPreferences
- All Implemented Interfaces:
INameable
Default values in UI elements are invariably arbitrary. Use this class to tweak these for a particular scannable in Spring.
Fields not configured will revert to default values.
Spring will register this object with IScannableUIPreferencesService.DEFAULT; UI elements can therefore call e.g. IScannableUIPreferencesService.DEFAULT.getPreferences(scannableName).getNudgeValue()
Note: the name must match the name of the scannable.
Example configuration:
<bean id="stage1_z_uiPrefs" class="org.eclipse.scanning.api.ui.ScannableUIPreferences" init-method="register" > <property name="name" value="stage1_z" /> <property name="nudgeValue" value="0.05" /> </bean> <bean id="dcm_enrg_uiPrefs" class="org.eclipse.scanning.api.ui.ScannableUIPreferences" init-method="register" > <property name="name" value="dcm_enrg" /> <property name="stepModelStart" value="5.0" /> <property name="stepModelWidth" value="15.0" /> <property name="stepModelStep" value="0.001" /> </bean>Note that the name set for an object of this class must match the scannable name as configured in Spring
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoubledoubleUsed by MultiStepComposite to add default StepModel valuesdoubleUsed by MultiStepComposite to add default StepModel valuesdoubleUsed by MultiStepComposite to add default StepModel valuesvoidregister()init-method for SpringvoidsetNudgeValue(double nudgeValue) A sensible value to move scannable by with a single click Used in e.g.voidsetStepModelStart(double stepModelStart) voidsetStepModelStep(double stepModelStep) voidsetStepModelWidth(double stepModelWidth) toString()Methods inherited from class org.eclipse.scanning.api.AbstractNameable
equals, getName, hashCode, setName
-
Constructor Details
-
ScannableUIPreferences
public ScannableUIPreferences()
-
-
Method Details
-
register
public void register()init-method for Spring -
setNudgeValue
public void setNudgeValue(double nudgeValue) A sensible value to move scannable by with a single click Used in e.g. ControlTreeViewer to display ControlNodes with increments- Parameters:
nudgeValue-
-
getNudgeValue
public double getNudgeValue() -
getStepModelStart
public double getStepModelStart()Used by MultiStepComposite to add default StepModel values- Parameters:
stepModelStart-
-
setStepModelStart
public void setStepModelStart(double stepModelStart) -
getStepModelWidth
public double getStepModelWidth()Used by MultiStepComposite to add default StepModel values- Parameters:
stepModelWidth- i.e. stop = stepModelStart + stepModelWidth
-
setStepModelWidth
public void setStepModelWidth(double stepModelWidth) -
getStepModelStep
public double getStepModelStep()Used by MultiStepComposite to add default StepModel values -
setStepModelStep
public void setStepModelStep(double stepModelStep) -
toString
- Overrides:
toStringin classAbstractNameable
-