Class AbstractDtSelectView<VM extends SelectViewModel,NC extends org.eclipse.swt.widgets.Composite>
- java.lang.Object
-
- com._1c.g5.aef2.views.View<SwtRenderingParameters,VM,NC>
-
- com._1c.g5.aef2.swt.views.SwtView<VM,NC>
-
- com._1c.g5.aef2.standard.swt.views.SwtStandardView<VM,NC>
-
- com._1c.g5.v8.dt.ui.aef.swt.views.AbstractDtSelectView<VM,NC>
-
- 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 Summary
Constructors Constructor Description AbstractDtSelectView()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract IActionBarItem
addActionBarItem(NC nativeControl, ButtonItemViewModel itemViewModel)
Adds theIActionBarItem
with the to native control.protected void
attachButtonsToControl(NC nativeControl, VM viewModel)
Attaches the buttons specified in the view model to thenativeControl
.protected void
bind(VM viewModel, NC nativeControl)
Binds the view model and native control together to this view.protected NC
createControl(org.eclipse.swt.widgets.Composite parent, VM viewModel)
Creates a native control for the view without decorations.protected abstract NC
doCreateNativeControl(org.eclipse.swt.widgets.Composite parent, VM viewModel)
Creates only the select control.protected abstract IActionBarItem[]
getActionBarItems(NC nativeControl, VM viewModel)
Returns theIActionBarItem
elements of the native control.protected void
handleButtonClick(NC nativeControl, VM viewModel, IActionBarItem item)
Handles button click.protected void
handleEventChannelEvent(IEvent event, VM viewModel, NC control)
Handles events fromIEventChannel
.protected void
processHotkeyExecution(HotkeyExecutionEvent event, NC nativeControl, VM viewModel)
protected void
processHotkeyRefresh(HotkeyRefreshEvent event, NC nativeControl, VM viewModel)
protected void
setEnabledApperance(org.eclipse.swt.widgets.Control control, boolean enabled)
Sets the enablement state for the control-
Methods inherited from class com._1c.g5.aef2.standard.swt.views.SwtStandardView
createNativeControl
-
Methods inherited from class com._1c.g5.aef2.swt.views.SwtView
computeNativeStyle, getContentControl, handleFocusEvent, isControlDisposed, setContentControl, uiAsyncExec, uiSyncExec
-
Methods inherited from class com._1c.g5.aef2.views.View
bindListener, bindNativeControl, bindValue, bindValue, bindViewModel, getNativeControl, getParameters, getViewModel, initialize, manageObservable, queueAndWaitEvent, queueEvent, registerEventChannelListener, unbind, unbindNativeControl, unbindViewModel, unmanageObservable, unregisterEventChannelListener
-
-
-
-
Method Detail
-
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 classSwtStandardView<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 fromIEventChannel
. By default handles only focus events.- Overrides:
handleEventChannelEvent
in classView<SwtRenderingParameters,VM extends SelectViewModel,NC extends org.eclipse.swt.widgets.Composite>
- Parameters:
event
- the event, cannot benull
.viewModel
- the view model, cannot benull
.control
- the control, cannot benull
.
-
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 classSwtStandardView<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 classSwtStandardView<VM extends SelectViewModel,NC extends org.eclipse.swt.widgets.Composite>
- Parameters:
control
- the controlenabled
-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 parentComposite
control.viewModel
- isSelectViewModel
successor model.- Returns:
- the newly created select control.
-
getActionBarItems
protected abstract IActionBarItem[] getActionBarItems(NC nativeControl, VM viewModel)
Returns theIActionBarItem
elements of the native control.- Parameters:
nativeControl
- the native control.viewModel
- isSelectViewModel
successor model.- Returns:
- the
IActionBarItem
elements. - See Also:
ValueChooser.getActionBarItems()
-
addActionBarItem
protected abstract IActionBarItem addActionBarItem(NC nativeControl, ButtonItemViewModel itemViewModel)
Adds theIActionBarItem
with the to native control.- Parameters:
nativeControl
- the the native control.itemViewModel
- theButtonItemViewModel
.- Returns:
- the added
-
attachButtonsToControl
protected void attachButtonsToControl(NC nativeControl, VM viewModel)
Attaches the buttons specified in the view model to thenativeControl
.- Parameters:
nativeControl
- the native swt controlviewModel
- the view model
-
processHotkeyExecution
protected void processHotkeyExecution(HotkeyExecutionEvent event, NC nativeControl, VM viewModel)
-
processHotkeyRefresh
protected void processHotkeyRefresh(HotkeyRefreshEvent event, NC nativeControl, VM viewModel)
-
-