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

public class JythonScriptListControl extends LiveControlBase
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 Details

    • JythonScriptListControl

      public JythonScriptListControl()
  • Method Details

    • createControl

      public void createControl(org.eclipse.swt.widgets.Composite parent)
      Description copied from interface: LiveControl
      This method will create the GUI for this control.
      Parameters:
      parent - The composite onto which the control should draw
    • toggleLayoutControl

      public void toggleLayoutControl()
    • setScripts

      public void setScripts(Map<String,String> configurations)
    • setJobTitle

      public void setJobTitle(String title)
    • setDisplayName

      public void setDisplayName(String displayName)
    • getDisplayName

      public String getDisplayName()
    • setHorizontalLayout

      public void setHorizontalLayout(boolean horizontalLayout)
    • getHorizontalLayout

      public boolean getHorizontalLayout()