Class AbstractDtEditorBarView<VM extends SelectViewModel,NC extends org.eclipse.swt.widgets.Control>

All Implemented Interfaces:
IView<SwtRenderingParameters,VM,org.eclipse.swt.widgets.Composite>
Direct Known Subclasses:
ShortcutView, SwtDateControlView, SwtDateValueView, SwtNumberValueView

public abstract class AbstractDtEditorBarView<VM extends SelectViewModel,NC extends org.eclipse.swt.widgets.Control> extends AbstractDtSelectView<VM,org.eclipse.swt.widgets.Composite>

The SWT view basic for views that represents ActionBar with arbitrary editor at the left side. As rule the editor is different control from ValueChooser. Also it can be used as wrapped view at LWT view since it makes public some protected methods.

  • Constructor Details

    • AbstractDtEditorBarView

      public AbstractDtEditorBarView()
  • Method Details

    • bind

      public void bind(VM viewModel, org.eclipse.swt.widgets.Composite nativeControl)
      Description copied from class: View
      Binds the view model and native control together to this view. Override this method to customize the binding.
      Overrides:
      bind in class AbstractDtSelectView<VM extends SelectViewModel,org.eclipse.swt.widgets.Composite>
      Parameters:
      viewModel - the view model to bind.
      nativeControl - the native control to bind.
    • unbind

      public void unbind(VM viewModel, org.eclipse.swt.widgets.Composite nativeControl)
      Description copied from class: View
      Unbinds the view model and the native control from this view. Override this method to customize the unbinding.
      Overrides:
      unbind in class View<SwtRenderingParameters,VM extends SelectViewModel,org.eclipse.swt.widgets.Composite>
      Parameters:
      viewModel - the view mode to unbind.
      nativeControl - the native control to unbind.
    • createControl

      protected org.eclipse.swt.widgets.Composite createControl(org.eclipse.swt.widgets.Composite parent, VM viewModel)
      Description copied from class: SwtStandardView
      Creates a native control for the view without decorations.
      Overrides:
      createControl in class AbstractDtSelectView<VM extends SelectViewModel,org.eclipse.swt.widgets.Composite>
      Parameters:
      parent - the parent composite to place a control in.
      viewModel - the view mode to create a control for.
      Returns:
      the newly created control
    • doCreateNativeControl

      protected org.eclipse.swt.widgets.Composite doCreateNativeControl(org.eclipse.swt.widgets.Composite parent, VM viewModel)
      Description copied from class: AbstractDtSelectView
      Creates only the select control. Does not creates buttons.
      Specified by:
      doCreateNativeControl in class AbstractDtSelectView<VM extends SelectViewModel,org.eclipse.swt.widgets.Composite>
      Parameters:
      parent - the parent Composite control.
      viewModel - is SelectViewModel successor model.
      Returns:
      the newly created select control.
    • getActionBarItems

      protected IActionBarItem[] getActionBarItems(org.eclipse.swt.widgets.Composite nativeControl, VM viewModel)
      Description copied from class: AbstractDtSelectView
      Returns the IActionBarItem elements of the native control.
      Specified by:
      getActionBarItems in class AbstractDtSelectView<VM extends SelectViewModel,org.eclipse.swt.widgets.Composite>
      Parameters:
      nativeControl - the native control.
      viewModel - is SelectViewModel successor model.
      Returns:
      the IActionBarItem elements.
      See Also:
    • addActionBarItem

      protected IActionBarItem addActionBarItem(org.eclipse.swt.widgets.Composite nativeControl, ButtonItemViewModel itemViewModel)
      Description copied from class: AbstractDtSelectView
      Adds the IActionBarItem with the to native control.
      Specified by:
      addActionBarItem in class AbstractDtSelectView<VM extends SelectViewModel,org.eclipse.swt.widgets.Composite>
      Parameters:
      nativeControl - the the native control.
      itemViewModel - the ButtonItemViewModel.
      Returns:
      the added
    • getEditor

      protected NC getEditor(org.eclipse.swt.widgets.Composite composite)
      Returns the actual editor control.
      Parameters:
      composite - the composite that contains the editor.
      Returns:
      the actual editor control.
    • getActionBar

      protected ActionBar getActionBar(org.eclipse.swt.widgets.Composite composite)
      Returns the action bar control.
      Parameters:
      composite - the composite that contains the action bar.
      Returns:
      the action bar control.
    • createEditorControl

      protected abstract NC createEditorControl(org.eclipse.swt.widgets.Composite control, VM viewModel)
      Creates an editor control.
      Parameters:
      control - the composite with action bar.
      viewModel - the view model.
      Returns:
      the newly creates editor control.