Class FluorescenceDetectorViewFactory

java.lang.Object
gda.factory.FindableBase
gda.rcp.views.FindableViewFactoryBase
uk.ac.gda.exafs.ui.views.detectors.FluorescenceDetectorViewFactory
All Implemented Interfaces:
Findable, IViewFactory

public class FluorescenceDetectorViewFactory extends FindableViewFactoryBase
Simple Factory class to create a FluorescenceDetectorConfigurationView for named detector. This provides an alternative to the secondaryId mechanism to pass the name of the detector to the view.

Create an instance of this factory in the client side spring for each detector you want to open from a menu. e.g.

 
<bean id="xspress3ViewFactory" class="uk.ac.gda.exafs.ui.views.detectors.FluorescenceDetectorViewFactory" >
	<property name="name" value="xspress3ViewFactory" />
	<property name="detectorName" value="xspress3" />
</bean>

 
and add the view to the extensions part of plugin.xml :

  <view
        class="gda.rcp.views.ViewFactoryFinder:xspress3ViewFactory"
        id="uk.ac.gda.exafs.ui.views.xspress3View"
        name="New Xspress3 view"
        restorable="true">
  </view>
. The command to open the view then uses the id 'uk.ac.gda.exafs.ui.views.xspress3View' for the viewId :

 <command
       commandId="org.eclipse.ui.views.showView"
       label="Xspress3"
       style="push">
    <parameter
          name="org.eclipse.ui.views.showView.viewId"
          value="uk.ac.gda.exafs.ui.views.xspress3View">
    </parameter>
 </command>
  • Constructor Details

    • FluorescenceDetectorViewFactory

      public FluorescenceDetectorViewFactory()
  • Method Details

    • getDetectorName

      public String getDetectorName()
    • setDetectorName

      public void setDetectorName(String detectorName)
    • setScannablesForMcaFiles

      public void setScannablesForMcaFiles(List<String> scannablesForMcaFiles)
    • setMaxDetectorElementCounts

      public void setMaxDetectorElementCounts(int maxDetectorElementCounts)
    • getMaxDetectorElementCounts

      public double getMaxDetectorElementCounts()
    • getMcaScannablesToUse

      public List<String> getMcaScannablesToUse()
    • createView

      public org.eclipse.ui.part.ViewPart createView()
      Description copied from class: FindableViewFactoryBase
      Creates the view. Subclasses must override this method.
      Specified by:
      createView in interface IViewFactory
      Specified by:
      createView in class FindableViewFactoryBase