Class AbstractDtSelectView<VM extends SelectViewModel,NC extends org.eclipse.swt.widgets.Composite>

All Implemented Interfaces:
IView<SwtRenderingParameters,VM,NC>
Direct Known Subclasses:
AbstractDtEditorBarView, DtActionBarView, DtComboSelectView, DtEditableComboView

public abstract class AbstractDtSelectView<VM extends SelectViewModel,NC extends org.eclipse.swt.widgets.Composite> extends SwtStandardView<VM,NC>
Base class for controls with feasible buttons in action bar. Is used for successor views with opportunity to select value from dialog and clear value.
  • Constructor Details

    • AbstractDtSelectView

      public AbstractDtSelectView()
  • Method Details

    • bind

      protected void bind(VM viewModel, NC 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 SwtStandardView<VM extends SelectViewModel,NC extends org.eclipse.swt.widgets.Composite>
      Parameters:
      viewModel - the view model to bind.
      nativeControl - the native control to bind.
    • handleEventChannelEvent

      protected void handleEventChannelEvent(IEvent event, VM viewModel, NC control)
      Description copied from class: View
      Handles events from IEventChannel. By default handles only focus events.
      Overrides:
      handleEventChannelEvent in class View<SwtRenderingParameters,VM extends SelectViewModel,NC extends org.eclipse.swt.widgets.Composite>
      Parameters:
      event - the event, cannot be null.
      viewModel - the view model, cannot be null.
      control - the control, cannot be null.
    • createControl

      protected NC createControl(org.eclipse.swt.widgets.Composite parent, VM viewModel)
      Description copied from class: SwtStandardView
      Creates a native control for the view without decorations.
      Specified by:
      createControl in class SwtStandardView<VM extends SelectViewModel,NC extends 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
    • setEnabledApperance

      protected void setEnabledApperance(org.eclipse.swt.widgets.Control control, boolean enabled)
      Description copied from class: SwtStandardView
      Sets the enablement state for the control
      Overrides:
      setEnabledApperance in class SwtStandardView<VM extends SelectViewModel,NC extends org.eclipse.swt.widgets.Composite>
      Parameters:
      control - the control
      enabled - true if the control should be enabled, false - otherwise.
    • handleButtonClick

      protected void handleButtonClick(NC nativeControl, VM viewModel, IActionBarItem item)
      Handles button click.
      Parameters:
      item - the button item.
    • doCreateNativeControl

      protected abstract NC doCreateNativeControl(org.eclipse.swt.widgets.Composite parent, VM viewModel)
      Creates only the select control. Does not creates buttons.
      Parameters:
      parent - the parent Composite control.
      viewModel - is SelectViewModel successor model.
      Returns:
      the newly created select control.
    • getActionBarItems

      protected abstract IActionBarItem[] getActionBarItems(NC nativeControl, VM viewModel)
      Returns the IActionBarItem elements of the native control.
      Parameters:
      nativeControl - the native control.
      viewModel - is SelectViewModel successor model.
      Returns:
      the IActionBarItem elements.
      See Also:
    • addActionBarItem

      protected abstract IActionBarItem addActionBarItem(NC nativeControl, ButtonItemViewModel itemViewModel)
      Adds the IActionBarItem with the to native control.
      Parameters:
      nativeControl - the the native control.
      itemViewModel - the ButtonItemViewModel.
      Returns:
      the added
    • attachButtonsToControl

      protected void attachButtonsToControl(NC nativeControl, VM viewModel)
      Attaches the buttons specified in the view model to the nativeControl.
      Parameters:
      nativeControl - the native swt control
      viewModel - the view model
    • processHotkeyExecution

      protected void processHotkeyExecution(HotkeyExecutionEvent event, NC nativeControl, VM viewModel)
    • processHotkeyRefresh

      protected void processHotkeyRefresh(HotkeyRefreshEvent event, NC nativeControl, VM viewModel)