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 -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract IActionBarItemaddActionBarItem(NC nativeControl, ButtonItemViewModel itemViewModel) Adds theIActionBarItemwith the to native control.protected voidattachButtonsToControl(NC nativeControl, VM viewModel) Attaches the buttons specified in the view model to thenativeControl.protected voidBinds the view model and native control together to this view.protected NCcreateControl(org.eclipse.swt.widgets.Composite parent, VM viewModel) Creates a native control for the view without decorations.protected abstract NCdoCreateNativeControl(org.eclipse.swt.widgets.Composite parent, VM viewModel) Creates only the select control.protected abstract IActionBarItem[]getActionBarItems(NC nativeControl, VM viewModel) Returns theIActionBarItemelements of the native control.protected voidhandleButtonClick(NC nativeControl, VM viewModel, IActionBarItem item) Handles button click.protected voidhandleEventChannelEvent(IEvent event, VM viewModel, NC control) Handles events fromIEventChannel.protected voidprocessHotkeyExecution(HotkeyExecutionEvent event, NC nativeControl, VM viewModel) protected voidprocessHotkeyRefresh(HotkeyRefreshEvent event, NC nativeControl, VM viewModel) protected voidsetEnabledApperance(org.eclipse.swt.widgets.Control control, boolean enabled) Sets the enablement state for the controlMethods inherited from class com._1c.g5.aef2.standard.swt.views.SwtStandardView
createNativeControlMethods inherited from class com._1c.g5.aef2.swt.views.SwtView
computeNativeStyle, getContentControl, handleFocusEvent, isControlDisposed, setContentControl, uiAsyncExec, uiSyncExecMethods 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
-
Constructor Details
-
AbstractDtSelectView
public AbstractDtSelectView()
-
-
Method Details
-
bind
Description copied from class:ViewBinds the view model and native control together to this view. Override this method to customize the binding.- Overrides:
bindin 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
Description copied from class:ViewHandles events fromIEventChannel. By default handles only focus events.- Overrides:
handleEventChannelEventin 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
Description copied from class:SwtStandardViewCreates a native control for the view without decorations.- Specified by:
createControlin 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:SwtStandardViewSets the enablement state for the control- Overrides:
setEnabledApperancein classSwtStandardView<VM extends SelectViewModel,NC extends org.eclipse.swt.widgets.Composite> - Parameters:
control- the controlenabled-trueif the control should be enabled,false- otherwise.
-
handleButtonClick
Handles button click.- Parameters:
item- the button item.
-
doCreateNativeControl
Creates only the select control. Does not creates buttons.- Parameters:
parent- the parentCompositecontrol.viewModel- isSelectViewModelsuccessor model.- Returns:
- the newly created select control.
-
getActionBarItems
Returns theIActionBarItemelements of the native control.- Parameters:
nativeControl- the native control.viewModel- isSelectViewModelsuccessor model.- Returns:
- the
IActionBarItemelements. - See Also:
-
addActionBarItem
protected abstract IActionBarItem addActionBarItem(NC nativeControl, ButtonItemViewModel itemViewModel) Adds theIActionBarItemwith the to native control.- Parameters:
nativeControl- the the native control.itemViewModel- theButtonItemViewModel.- Returns:
- the added
-
attachButtonsToControl
Attaches the buttons specified in the view model to thenativeControl.- Parameters:
nativeControl- the native swt controlviewModel- the view model
-
processHotkeyExecution
-
processHotkeyRefresh
-