Package uk.ac.gda.exafs.ui
Class ElementEdgeEditor
java.lang.Object
org.eclipse.core.commands.common.EventManager
org.eclipse.ui.part.WorkbenchPart
org.eclipse.ui.part.EditorPart
uk.ac.gda.richbeans.editors.RichBeanEditorPart
uk.ac.gda.exafs.ui.ElementEdgeEditor
- All Implemented Interfaces:
EventListener,org.eclipse.core.runtime.IAdaptable,org.eclipse.core.runtime.IExecutableExtension,org.eclipse.richbeans.api.event.ValueListener,org.eclipse.richbeans.api.widget.IFieldProvider,org.eclipse.ui.IEditorPart,org.eclipse.ui.IReusableEditor,org.eclipse.ui.ISaveablePart,org.eclipse.ui.IWorkbenchPart,org.eclipse.ui.IWorkbenchPart2,org.eclipse.ui.IWorkbenchPart3,org.eclipse.ui.part.IWorkbenchPartOrientation
- Direct Known Subclasses:
QEXAFSParametersUIEditor,XanesScanParametersUIEditor,XasScanParametersUIEditor
Class does not need to be public but is made so here so that tests can access it.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.eclipse.swt.widgets.Compositeprotected org.eclipse.richbeans.widgets.wrappers.ComboWrapperprotected org.eclipse.richbeans.widgets.wrappers.ComboWrapperprotected org.eclipse.swt.widgets.Labelprotected org.eclipse.swt.widgets.Labelstatic final Stringstatic final Stringprotected org.eclipse.swt.widgets.Compositeprotected Objectprotected IPlottingSystem<org.eclipse.swt.widgets.Composite> protected ActionBarWrapperprotected uk.ac.gda.exafs.ui.ElementEdgeEditor.PlotUpdateJobprotected org.eclipse.swt.custom.ScrolledCompositeprotected booleanprotected booleanprotected AxisValuesFields inherited from class uk.ac.gda.richbeans.editors.RichBeanEditorPart
addedListenersAndSwitchedOn, controller, dirtyContainer, editingBean, expressionFields, mappingURL, path, previousUndoBean, undoableContextFields inherited from interface org.eclipse.ui.IEditorPart
PROP_DIRTY, PROP_INPUTFields inherited from interface org.eclipse.ui.IWorkbenchPart
PROP_TITLE -
Constructor Summary
ConstructorsConstructorDescriptionElementEdgeEditor(String path, URL mappingURL, DirtyContainer dirtyContainer, Object editingBean) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcreateElementEdgeArea(org.eclipse.swt.widgets.Group main) protected voidcreateEstimationComposite(org.eclipse.swt.widgets.Composite right) You can override this method and call it at the start of your implementation.voiddispose()protected Objectprotected org.eclipse.richbeans.widgets.wrappers.LabelWrapperorg.eclipse.richbeans.widgets.wrappers.ComboWrappergetEdge()org.eclipse.richbeans.widgets.scalebox.ScaleBoxprotected Stringprotected doubleReturns the edge value in eV.org.eclipse.richbeans.widgets.wrappers.ComboWrapperprotected ElementOverride this method (usually by calling it too) to add values which should be available in expressions.getFieldValue(String fieldName) protected Color[]Override to provide additional lines to the edge value.protected String[]Override to provide additional lines to the edge value.protected double[]Override to provide additional lines to the edge value.protected double[][]getScanPoints(Object currentBean) protected Elementvoidinit(org.eclipse.ui.IEditorSite site, org.eclipse.ui.IEditorInput input) voidlinkUI(boolean isPageChange) Extending classes should normally override this method with bounds and choice information and then call this method with super.linkUI();protected voidvoidsetFocus()protected voidsetPointsUpdate(boolean isUpdate) protected SchemaReadersetupElementAndEdge(String objectName) protected voidprotected voidvoidprotected voidMethods inherited from class uk.ac.gda.richbeans.editors.RichBeanEditorPart
addValueListener, beanToUI, createDataBindingController, doSave, doSaveAs, getEditorUI, getField, getIFile, getPath, getRichEditorTabText, getValueListenerName, isDirty, isDisposed, isSaveAsAllowed, isUndoStackActive, notifyFileSaved, recordUndoableEvent, setDisposed, setEditingBean, setInput, setPath, setUndoableContext, setUndoStackActive, switchState, uiToBean, updateFromUIAndReturnEditingBean, updateUiFromOtherBean, valueChangePerformedMethods inherited from class org.eclipse.ui.part.EditorPart
checkSite, getEditorInput, getEditorSite, getTitleToolTip, isSaveOnCloseNeeded, setContentDescription, setInitializationData, setInputWithNotify, setPartNameMethods inherited from class org.eclipse.ui.part.WorkbenchPart
addPartPropertyListener, addPropertyListener, createPartControl, firePartPropertyChanged, firePropertyChange, getAdapter, getConfigurationElement, getContentDescription, getDefaultImage, getOrientation, getPartName, getPartProperties, getPartProperty, getSite, getTitle, getTitleImage, removePartPropertyListener, removePropertyListener, setPartProperty, setSite, setTitle, setTitleImage, setTitleToolTip, showBusyMethods inherited from class org.eclipse.core.commands.common.EventManager
addListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObjectMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapterMethods inherited from interface org.eclipse.ui.IEditorPart
getEditorInput, getEditorSiteMethods inherited from interface org.eclipse.ui.ISaveablePart
isSaveOnCloseNeededMethods inherited from interface org.eclipse.ui.IWorkbenchPart
addPropertyListener, createPartControl, getSite, getTitle, getTitleImage, getTitleToolTip, removePropertyListener
-
Field Details
-
edge
protected org.eclipse.richbeans.widgets.wrappers.ComboWrapper edge -
element
protected org.eclipse.richbeans.widgets.wrappers.ComboWrapper element -
scrolledComposite
protected org.eclipse.swt.custom.ScrolledComposite scrolledComposite -
container
protected org.eclipse.swt.widgets.Composite container -
estimatePointsLabel
protected org.eclipse.swt.widgets.Label estimatePointsLabel -
estimateTimeLabel
protected org.eclipse.swt.widgets.Label estimateTimeLabel -
expandContainer
protected org.eclipse.swt.widgets.Composite expandContainer -
plottingsystem
-
plottingsystemActionBarWrapper
-
xAxisValues
-
suspendGraphUpdate
protected volatile boolean suspendGraphUpdate -
lastPlottedBean
-
updateValueAllowed
protected boolean updateValueAllowed -
plotUpdateJob
protected uk.ac.gda.exafs.ui.ElementEdgeEditor.PlotUpdateJob plotUpdateJob -
EXAFS_MIN_ELEMENT_PROP
- See Also:
-
EXAFS_MAX_ELEMENT_PROP
- See Also:
-
-
Constructor Details
-
ElementEdgeEditor
public ElementEdgeEditor(String path, URL mappingURL, DirtyContainer dirtyContainer, Object editingBean)
-
-
Method Details
-
init
public void init(org.eclipse.ui.IEditorSite site, org.eclipse.ui.IEditorInput input) throws org.eclipse.ui.PartInitException - Specified by:
initin interfaceorg.eclipse.ui.IEditorPart- Overrides:
initin classRichBeanEditorPart- Throws:
org.eclipse.ui.PartInitException
-
createEstimationComposite
protected void createEstimationComposite(org.eclipse.swt.widgets.Composite right) You can override this method and call it at the start of your implementation. -
linkUI
public void linkUI(boolean isPageChange) Description copied from class:RichBeanEditorPartExtending classes should normally override this method with bounds and choice information and then call this method with super.linkUI();- Overrides:
linkUIin classRichBeanEditorPart
-
getExpressionFields
Description copied from class:RichBeanEditorPartOverride this method (usually by calling it too) to add values which should be available in expressions. NOTE when overriding that after the first call the expressionFields are cached to avoid too many interogations of the bean.- Overrides:
getExpressionFieldsin classRichBeanEditorPart- Returns:
- List
of possible expression vars. - Throws:
Exception
-
getFieldValue
- Specified by:
getFieldValuein interfaceorg.eclipse.richbeans.api.widget.IFieldProvider- Overrides:
getFieldValuein classRichBeanEditorPart- Throws:
Exception
-
updatePlottedPoints
public void updatePlottedPoints() -
getLineLabels
Override to provide additional lines to the edge value. -
getLineValues
protected double[] getLineValues()Override to provide additional lines to the edge value. -
getLineColours
Override to provide additional lines to the edge value. -
updateLayout
protected void updateLayout() -
createElementEdgeArea
protected void createElementEdgeArea(org.eclipse.swt.widgets.Group main) -
setupElementAndEdge
- Parameters:
objectName-- Returns:
- SchemaReader
- Throws:
Exception
-
setPointsUpdate
protected void setPointsUpdate(boolean isUpdate) -
getScanPoints
- Throws:
Exception
-
updatePointsLabels
protected void updatePointsLabels() -
fetchEditingBean
-
updateElement
- Throws:
Exception
-
getSelectedElement
- Throws:
Exception
-
dispose
public void dispose()- Specified by:
disposein interfaceorg.eclipse.ui.IWorkbenchPart- Overrides:
disposein classRichBeanEditorPart
-
getElementUseBean
- Throws:
Exception
-
getEdgeUseBean
- Throws:
Exception
-
getEdgeValue
protected double getEdgeValue()Returns the edge value in eV. Uses the bean if value is not in the ui.- Returns:
- edge
-
getCoreHole
protected org.eclipse.richbeans.widgets.wrappers.LabelWrapper getCoreHole() -
getEdgeEnergy
public org.eclipse.richbeans.widgets.scalebox.ScaleBox getEdgeEnergy() -
setFocus
public void setFocus()- Specified by:
setFocusin interfaceorg.eclipse.ui.IWorkbenchPart- Specified by:
setFocusin classorg.eclipse.ui.part.WorkbenchPart
-
openPreferences
protected void openPreferences() -
getEdge
public org.eclipse.richbeans.widgets.wrappers.ComboWrapper getEdge() -
getElement
public org.eclipse.richbeans.widgets.wrappers.ComboWrapper getElement() -
getMinAllowedElementSymbol
-
getMaxAllowedElemenetSymbol
-