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

public interface IModelViewer<T> extends IModelProvider<T>
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 Type
    Method
    Description
    void
    Call to apply the cell editor value in the editing bean.
    <U> U
    createPartControl(U ancestor)
    Called to create the part control.
    void
    Call to dispose
    <U> U
    Get the underlying Control which the UI system is using.
    The model which we are editing
    boolean
    Check model for validity
    void
    Refresh the table or UI items
    void
    Make the viewer take focus to its main control.
    void
    setModel(T model)
    The model which we are editing
    void
    Set a validator to be run when the model is changed
    <V> void
    setViewSite(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

      void setModel(T model) throws Exception
      The model which we are editing
      Specified by:
      setModel in interface IModelProvider<T>
      Parameters:
      model -
    • getModel

      T getModel()
      The model which we are editing
      Specified by:
      getModel in interface IModelProvider<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

      void setValidator(IValidator<?> v)
      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