Package org.eclipse.scanning.api.ui.auto
Interface IModelViewer<T>
- Record Components:
T- the type of the bean for which this is a viewer.
- All Superinterfaces:
IModelProvider<T>
- All Known Implementing Classes:
ModelViewer
Create a model editor which is autogenerated user interface for
editing models.
This viewer will normally be castable to org.eclipse.jface.viewers.ISelectionProvider
in order to add selection listeners.
-
Method Summary
Modifier and TypeMethodDescriptionvoidCall to apply the cell editor value in the editing bean.<U> UcreatePartControl(U ancestor) Called to create the part control.voiddispose()Call to dispose<U> UGet the underlying Control which the UI system is using.getModel()The model which we are editingbooleanisValid()Check model for validityvoidrefresh()Refresh the table or UI itemsvoidsetFocus()Make the viewer take focus to its main control.voidThe model which we are editingvoidsetValidator(IValidator<?> v) Set a validator to be run when the model is changed<V> voidsetViewSite(V site) If this viewer is linked to an e3 part with an IViewSite, it may be provided here.Methods inherited from interface org.eclipse.scanning.api.IModelProvider
updateModel
-
Method Details
-
createPartControl
<U> U createPartControl(U ancestor) Called to create the part control. The type U is usually Composite but may be parameterised for non-SWT- Parameters:
ancestor-- Returns:
-
setModel
The model which we are editing- Specified by:
setModelin interfaceIModelProvider<T>- Parameters:
model-
-
getModel
T getModel()The model which we are editing- Specified by:
getModelin interfaceIModelProvider<T>- Parameters:
model-- Returns:
- the model that we are providing
-
dispose
void dispose()Call to dispose -
getControl
<U> U getControl()Get the underlying Control which the UI system is using.- Returns:
-
refresh
void refresh()Refresh the table or UI items -
setFocus
void setFocus()Make the viewer take focus to its main control. -
applyEditorValue
void applyEditorValue()Call to apply the cell editor value in the editing bean. -
setViewSite
<V> void setViewSite(V site) If this viewer is linked to an e3 part with an IViewSite, it may be provided here.- Parameters:
site-
-
setValidator
Set a validator to be run when the model is changed- Parameters:
v- The validator to be applied
-
isValid
boolean isValid()Check model for validity- Returns:
- true if the model is valid false otherwise
-