Package uk.ac.gda.client.livecontrol
Class JythonScriptListControl
java.lang.Object
gda.factory.FindableBase
uk.ac.gda.client.livecontrol.LiveControlBase
uk.ac.gda.client.livecontrol.JythonScriptListControl
- All Implemented Interfaces:
Findable,LiveControl
- Direct Known Subclasses:
JythonScriptFolderControl
This LiveControl implementation allows a script to be selected from a configured list of scripts through a combo box
and then run (non-blocking). The Spring configuration should specify:
- scripts as a map - keys should be user-friendly descriptions of the scripts!
- group - (Optional if within a Group) the widget has no title/label, so use this to identify it in the UI
- jobTitle - (Optional) Some descriptive text to show in the Eclipse status bar while the scripts run
- displayName - (Optional) Text to add as a label in the grid
- horizontalLayout - (Optional) The default layout you would like it to have. If False, it has a vertical layout
Example configuration:
<bean id="endstation_configurations" class="uk.ac.gda.client.livecontrol.JythonScriptListControl">
<property name="displayName" value="Photon Energy " />
<property name="jobTitle" value="Configuring endstation" />
<property name="group" value="Endstation configuration"/>
<property name="horizontalLayout" value="false"/>
<property name="scripts">
<map>
<entry key="XrayEye in" value=".configs/in_xreye.py"/>
<entry key="XrayEye out" value=".configs/out_xreye.py"/>
</map>
</property>
</bean>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcreateControl(org.eclipse.swt.widgets.Composite parent) This method will create the GUI for this control.booleanvoidsetDisplayName(String displayName) voidsetHorizontalLayout(boolean horizontalLayout) voidsetJobTitle(String title) voidsetScripts(Map<String, String> configurations) voidMethods inherited from class uk.ac.gda.client.livecontrol.LiveControlBase
dispose, equals, getGroup, hashCode, setGroup, toStringMethods inherited from class gda.factory.FindableBase
getName, setName
-
Constructor Details
-
JythonScriptListControl
public JythonScriptListControl()
-
-
Method Details
-
createControl
public void createControl(org.eclipse.swt.widgets.Composite parent) Description copied from interface:LiveControlThis method will create the GUI for this control.- Parameters:
parent- The composite onto which the control should draw
-
toggleLayoutControl
public void toggleLayoutControl() -
setScripts
-
setJobTitle
-
setDisplayName
-
getDisplayName
-
setHorizontalLayout
public void setHorizontalLayout(boolean horizontalLayout) -
getHorizontalLayout
public boolean getHorizontalLayout()
-