Class DataCollectionModel

java.lang.Object
gda.rcp.mx.datacollection.model.DataCollectionModel
All Implemented Interfaces:
IScanParametersModel

public class DataCollectionModel extends Object implements IScanParametersModel
  • Constructor Details

    • DataCollectionModel

      public DataCollectionModel(IFolderNameProvider folderNameProvider, IPrefixProvider prefixNameProvider, String subdir, String prefix, boolean isSampleChangerPresent, boolean showSelectorId, IDetDistResolutionConverter detDistResolutionConverter)
      Create a new model
      Parameters:
      subdir - the directory location
      prefix - the prefix location
  • Method Details

    • setMultiMode

      public void setMultiMode(boolean multi)
    • inMultiMode

      public boolean inMultiMode()
    • getParameters

      public DataCollectionParameters getParameters()
      Return the parameters that are not part of the model such as visitpath etc
      Specified by:
      getParameters in interface IScanParametersModel
      Returns:
      IScanParameters
    • getRowData

      public List<Object> getRowData(Integer irow)
    • getColumnOrdinal

      public int getColumnOrdinal(ModelColumns col)
      Returns the ordinal position of this column.

      For now this is the column number in the original ExptTable in the Swing GUI.

      Parameters:
      col - column to lookup
      Returns:
      ordinal column number between 0 and getColumnCount()-1 or -1 for ModelColumns not represented. Will return -1 iff isColumnLegal(ModelColumns) is false.
    • isColumnLegal

      public boolean isColumnLegal(ModelColumns col)
      Will return true of the column is represented in this instance of the model
      Parameters:
      col - to query
      Returns:
      whether the passed in column is legal for this model.
    • getRows

      public DataCollectionRow[] getRows()
    • getRow

      public DataCollectionRow getRow(int row)
    • addDataCollectionModelListener

      public void addDataCollectionModelListener(IDataCollectionModelListener collectionModelListener)
    • removeDataCollectionRowListener

      public void removeDataCollectionRowListener(IDataCollectionModelListener collectionModelListener)
    • addMultipointPlaneListener

      public void addMultipointPlaneListener(MultipointPlaneListener multipointPlaneListener)
    • removeMultipointPlaneListener

      public void removeMultipointPlaneListener(MultipointPlaneListener multipointPlaneListener)
    • pointTracker

      public CrystalTrackingService pointTracker()
    • clearPoints

      public void clearPoints()
    • clearLastPoint

      public void clearLastPoint()
    • clearSpecifiedPoint

      public void clearSpecifiedPoint(int point) throws Exception
      Throws:
      Exception
    • addPointToTracker

      public void addPointToTracker(int[] currentMousePosition)
    • getAllCrystalTrackers

      public List<CrystalTracking> getAllCrystalTrackers()
    • pointsCount

      public int pointsCount()
    • isValid

      public boolean isValid(int row, ModelColumns column)
    • isCellEditable

      public boolean isCellEditable(int row, ModelColumns col)
    • getToolTip

      public String getToolTip(int rowNum, ModelColumns column)
    • getColumnCount

      public int getColumnCount()
    • getColumnName

      public String getColumnName(ModelColumns column)
    • addRow

      public DataCollectionRow addRow(Object source, boolean incrementRunNumber)
      Adds a new row to the model
      Parameters:
      source - the class that causes the row to be added.
      incrementRunNumber - true if the run number should be incremented
    • initializeModel

      public void initializeModel(ExtendedCollectRequests ecrs)
      Initialize the model with the given ecrs
      Parameters:
      ecrs - collect requests to load, or null to have a default entry
    • load

      public void load(Object source, ExtendedCollectRequests ecrs)
      Add existing extended collect requests to the model
      Parameters:
      ecrs - the requests to add
    • getAsExtendedCollectRequests

      public ExtendedCollectRequests getAsExtendedCollectRequests()
      Return this model in the form of ExtendedCollectRequests
    • getAsExtendedCollectRequests

      public ExtendedCollectRequests getAsExtendedCollectRequests(DataCollectionRow[] rows)
      Return specified rows from this model in the form of ExtendedCollectRequests
      Parameters:
      rows - array of rows to extract
    • removeRows

      public void removeRows(Object source, DataCollectionRow[] rows)
      Remove the specified rows from the model
      Parameters:
      rows - to remove
    • duplicate

      public DataCollectionRow duplicate(Object source, int rowNum, int rowNum2)
    • duplicate

      public DataCollectionRow duplicate(Object source, int rowNum, int rowNum2, boolean fireEvent)
    • copyRowToEndMultipleTimes

      public DataCollectionRow[] copyRowToEndMultipleTimes(Object source, int rowNum, int numTimes)
      Copies the specified row, multiple times, to the end of the model.
      Returns:
      the newly-added rows
    • getValidationMessages

      public DataCollectionValidationResult getValidationMessages(DataCollectionScanManager manager, DataCollectionRow[] rows)
    • selectRow

      public void selectRow(int row)
    • fireValueChanged

      public void fireValueChanged(Object source, int row, ModelColumns column)
    • checkCentring

      public boolean checkCentring(DataCollectionRow[] rows)
    • replacePrefixWithDefaultIfEmpty

      public static void replacePrefixWithDefaultIfEmpty(DataCollectionModel model)
    • replaceFolderWithDefaultIfEmpty

      public static void replaceFolderWithDefaultIfEmpty(DataCollectionModel model)
    • getMultipointPlanePosition

      public BigDecimal getMultipointPlanePosition()
    • clearMultipointPoints

      public boolean clearMultipointPoints()
    • wereMultipointsClearedRecently

      public boolean wereMultipointsClearedRecently()
    • getGtabscannable

      public Scannable getGtabscannable()
    • getGonomega

      public Scannable getGonomega()
    • getXyzScannable

      public Scannable getXyzScannable()
    • isUseTargetDose

      public boolean isUseTargetDose(int row)
    • setUseTargetDose

      public void setUseTargetDose(int row, boolean useTargetDose)
    • isUseTargetDoseByResolution

      public boolean isUseTargetDoseByResolution(int row)
    • setUseTargetDoseByResolution

      public void setUseTargetDoseByResolution(int row, boolean useTargetDoseByResolution)