Package gda.rcp.mx.datacollection.model
Class DataCollectionModel
java.lang.Object
gda.rcp.mx.datacollection.model.DataCollectionModel
- All Implemented Interfaces:
IScanParametersModel
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionDataCollectionModel(IFolderNameProvider folderNameProvider, IPrefixProvider prefixNameProvider, String subdir, String prefix, boolean isSampleChangerPresent, boolean showSelectorId, IDetDistResolutionConverter detDistResolutionConverter) Create a new model -
Method Summary
Modifier and TypeMethodDescriptionvoidaddDataCollectionModelListener(IDataCollectionModelListener collectionModelListener) voidaddMultipointPlaneListener(MultipointPlaneListener multipointPlaneListener) voidaddPointToTracker(int[] currentMousePosition) Adds a new row to the modelbooleancheckCentring(DataCollectionRow[] rows) voidbooleanvoidvoidclearSpecifiedPoint(int point) copyRowToEndMultipleTimes(Object source, int rowNum, int numTimes) Copies the specified row, multiple times, to the end of the model.voidfireValueChanged(Object source, int row, ModelColumns column) Return this model in the form ofExtendedCollectRequestsReturn specified rows from this model in the form ofExtendedCollectRequestsintgetColumnName(ModelColumns column) intReturns the ordinal position of this column.Return the parameters that are not part of the model such as visitpath etcgetRow(int row) getRowData(Integer irow) getRows()getToolTip(int rowNum, ModelColumns column) getValidationMessages(DataCollectionScanManager manager, DataCollectionRow[] rows) voidInitialize the model with the given ecrsbooleanbooleanisCellEditable(int row, ModelColumns col) booleanWill return true of the column is represented in this instance of the modelbooleanisUseTargetDose(int row) booleanisUseTargetDoseByResolution(int row) booleanisValid(int row, ModelColumns column) voidload(Object source, ExtendedCollectRequests ecrs) Add existing extended collect requests to the modelintvoidremoveDataCollectionRowListener(IDataCollectionModelListener collectionModelListener) voidremoveMultipointPlaneListener(MultipointPlaneListener multipointPlaneListener) voidremoveRows(Object source, DataCollectionRow[] rows) Remove the specified rows from the modelstatic voidstatic voidvoidselectRow(int row) voidsetMultiMode(boolean multi) voidsetUseTargetDose(int row, boolean useTargetDose) voidsetUseTargetDoseByResolution(int row, boolean useTargetDoseByResolution) boolean
-
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 locationprefix- the prefix location
-
-
Method Details
-
setMultiMode
public void setMultiMode(boolean multi) -
inMultiMode
public boolean inMultiMode() -
getParameters
Return the parameters that are not part of the model such as visitpath etc- Specified by:
getParametersin interfaceIScanParametersModel- Returns:
- IScanParameters
-
getRowData
-
getColumnOrdinal
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
orgetColumnCount()-1-1for ModelColumns not represented. Will return-1iffisColumnLegal(ModelColumns)is false.
-
isColumnLegal
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
-
getRow
-
addDataCollectionModelListener
-
removeDataCollectionRowListener
-
addMultipointPlaneListener
-
removeMultipointPlaneListener
-
pointTracker
-
clearPoints
public void clearPoints() -
clearLastPoint
public void clearLastPoint() -
clearSpecifiedPoint
- Throws:
Exception
-
addPointToTracker
public void addPointToTracker(int[] currentMousePosition) -
getAllCrystalTrackers
-
pointsCount
public int pointsCount() -
isValid
-
isCellEditable
-
getToolTip
-
getColumnCount
public int getColumnCount() -
getColumnName
-
addRow
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
Initialize the model with the given ecrs- Parameters:
ecrs- collect requests to load, or null to have a default entry
-
load
Add existing extended collect requests to the model- Parameters:
ecrs- the requests to add
-
getAsExtendedCollectRequests
Return this model in the form ofExtendedCollectRequests -
getAsExtendedCollectRequests
Return specified rows from this model in the form ofExtendedCollectRequests- Parameters:
rows- array of rows to extract
-
removeRows
Remove the specified rows from the model- Parameters:
rows- to remove
-
duplicate
-
duplicate
-
copyRowToEndMultipleTimes
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
-
checkCentring
-
replacePrefixWithDefaultIfEmpty
-
replaceFolderWithDefaultIfEmpty
-
getMultipointPlanePosition
-
clearMultipointPoints
public boolean clearMultipointPoints() -
wereMultipointsClearedRecently
public boolean wereMultipointsClearedRecently() -
getGtabscannable
-
getGonomega
-
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)
-