Package uk.ac.gda.exafs.ui.xes
Class XesScanWithFileControls
java.lang.Object
uk.ac.gda.exafs.ui.xes.XesControlsBuilder
uk.ac.gda.exafs.ui.xes.XesScanWithFileControls
- All Implemented Interfaces:
gda.observable.IObservable
-
Field Summary
Fields inherited from class uk.ac.gda.exafs.ui.xes.XesControlsBuilder
observableComponent -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidautoSetMonoFileName(int xesScanType, String fileName) Set the Mono scan filename widget with a new filename.voidcreateControls(org.eclipse.swt.widgets.Composite parent) voiddispose()voidenableXesEnergyControls(boolean enable1, boolean enable2) voidenableXesFileControls(boolean enable1, boolean enable2) org.eclipse.swt.widgets.Compositeorg.eclipse.richbeans.widgets.file.FileBoxorg.eclipse.richbeans.widgets.file.FileBoxgetScanFileName(int row) intorg.eclipse.richbeans.widgets.scalebox.ScaleBoxAndFixedExpressiongetXesEnergy(int row) voidsetEditingFile(org.eclipse.ui.IEditorInput editing) voidvoidsetRow1Suffix(String row1Suffix) voidsetRow2Suffix(String row2Suffix) voidsetRowScannables(List<IXesEnergyScannable> xesScannables) voidsetScanTypeNum(int scanTypeNum) voidsetShowRow2Controls(boolean showRow2Controls) voidDisplay widgets for the currently set scan type : Mono energy and XES region scan file controls (if scanType = SCAN_XES_REGION_FIXED_MONO) or Mono XAS/XANES region and XES energy controlsvoidshowMain(boolean show) protected voidshowWidget(org.eclipse.swt.widgets.Composite widget, boolean show) Show/hide a widget, depending on value of 'show'.Methods inherited from class uk.ac.gda.exafs.ui.xes.XesControlsBuilder
addIObserver, deleteIObserver, deleteIObservers, notifyObservers, setupFieldWidget, setupFieldWidgets, setVisible
-
Constructor Details
-
XesScanWithFileControls
public XesScanWithFileControls()
-
-
Method Details
-
createControls
public void createControls(org.eclipse.swt.widgets.Composite parent) - Specified by:
createControlsin classXesControlsBuilder
-
dispose
public void dispose() -
enableXesFileControls
public void enableXesFileControls(boolean enable1, boolean enable2) -
enableXesEnergyControls
public void enableXesEnergyControls(boolean enable1, boolean enable2) -
showMain
public void showMain(boolean show) -
setupWidgetsForScanType
public void setupWidgetsForScanType()Display widgets for the currently set scan type :- Mono energy and XES region scan file controls (if scanType = SCAN_XES_REGION_FIXED_MONO) or
- Mono XAS/XANES region and XES energy controls
-
setRowScannables
-
showWidget
protected void showWidget(org.eclipse.swt.widgets.Composite widget, boolean show) Description copied from class:XesControlsBuilderShow/hide a widget, depending on value of 'show'. The parent widget is also hidden (this typically a Group or other 'containing' composite)- Overrides:
showWidgetin classXesControlsBuilder- Parameters:
widget-show- - set to true to show the widget, false to hide it.
-
getMainComposite
public org.eclipse.swt.widgets.Composite getMainComposite() -
getXesEnergy
public org.eclipse.richbeans.widgets.scalebox.ScaleBoxAndFixedExpression getXesEnergy(int row) -
getScanFileName
public org.eclipse.richbeans.widgets.file.FileBox getScanFileName(int row) -
setFolder
-
getMonoScanFileName
public org.eclipse.richbeans.widgets.file.FileBox getMonoScanFileName() -
setEditingFile
public void setEditingFile(org.eclipse.ui.IEditorInput editing) -
autoSetMonoFileName
Set the Mono scan filename widget with a new filename. The file name set on the widget is automatically adjusted if needed :- If filename is empty, widget is set to empty string.
- Filename is set on the widget if it is present in the folder and of the correct type
- If named file is not the correct type, name of first file in editorFolder of correct type is used
- Parameters:
xesScanType- type of XES scan (one ofXesScanParameters.FIXED_XES_SCAN_XANES,XesScanParameters.FIXED_XES_SCAN_XASetc)fileName- new name to be set- Throws:
Exception
-
getScanTypeNum
public int getScanTypeNum() -
setScanTypeNum
public void setScanTypeNum(int scanTypeNum) -
setShowRow2Controls
public void setShowRow2Controls(boolean showRow2Controls) -
setRow1Suffix
-
setRow2Suffix
-