Class AbstractDtEditorBarView<VM extends SelectViewModel,NC extends org.eclipse.swt.widgets.Control>
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,org.eclipse.swt.widgets.Composite>
com._1c.g5.v8.dt.ui.aef.swt.views.AbstractDtEditorBarView<VM,NC>
- 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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected IActionBarItemaddActionBarItem(org.eclipse.swt.widgets.Composite nativeControl, ButtonItemViewModel itemViewModel) Adds theIActionBarItemwith the to native control.voidBinds the view model and native control together to this view.protected org.eclipse.swt.widgets.CompositecreateControl(org.eclipse.swt.widgets.Composite parent, VM viewModel) Creates a native control for the view without decorations.protected abstract NCcreateEditorControl(org.eclipse.swt.widgets.Composite control, VM viewModel) Creates an editor control.protected org.eclipse.swt.widgets.CompositedoCreateNativeControl(org.eclipse.swt.widgets.Composite parent, VM viewModel) Creates only the select control.protected ActionBargetActionBar(org.eclipse.swt.widgets.Composite composite) Returns the action bar control.protected IActionBarItem[]getActionBarItems(org.eclipse.swt.widgets.Composite nativeControl, VM viewModel) Returns theIActionBarItemelements of the native control.protected NCgetEditor(org.eclipse.swt.widgets.Composite composite) Returns the actual editor control.voidUnbinds the view model and the native control from this view.Methods inherited from class com._1c.g5.v8.dt.ui.aef.swt.views.AbstractDtSelectView
attachButtonsToControl, handleButtonClick, handleEventChannelEvent, processHotkeyExecution, processHotkeyRefresh, setEnabledApperanceMethods 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, unbindNativeControl, unbindViewModel, unmanageObservable, unregisterEventChannelListener
-
Constructor Details
-
AbstractDtEditorBarView
public AbstractDtEditorBarView()
-
-
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 classAbstractDtSelectView<VM extends SelectViewModel,org.eclipse.swt.widgets.Composite> - Parameters:
viewModel- the view model to bind.nativeControl- the native control to bind.
-
unbind
Description copied from class:ViewUnbinds the view model and the native control from this view. Override this method to customize the unbinding.- Overrides:
unbindin classView<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:SwtStandardViewCreates a native control for the view without decorations.- Overrides:
createControlin classAbstractDtSelectView<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:AbstractDtSelectViewCreates only the select control. Does not creates buttons.- Specified by:
doCreateNativeControlin classAbstractDtSelectView<VM extends SelectViewModel,org.eclipse.swt.widgets.Composite> - Parameters:
parent- the parentCompositecontrol.viewModel- isSelectViewModelsuccessor model.- Returns:
- the newly created select control.
-
getActionBarItems
protected IActionBarItem[] getActionBarItems(org.eclipse.swt.widgets.Composite nativeControl, VM viewModel) Description copied from class:AbstractDtSelectViewReturns theIActionBarItemelements of the native control.- Specified by:
getActionBarItemsin classAbstractDtSelectView<VM extends SelectViewModel,org.eclipse.swt.widgets.Composite> - Parameters:
nativeControl- the native control.viewModel- isSelectViewModelsuccessor model.- Returns:
- the
IActionBarItemelements. - See Also:
-
addActionBarItem
protected IActionBarItem addActionBarItem(org.eclipse.swt.widgets.Composite nativeControl, ButtonItemViewModel itemViewModel) Description copied from class:AbstractDtSelectViewAdds theIActionBarItemwith the to native control.- Specified by:
addActionBarItemin classAbstractDtSelectView<VM extends SelectViewModel,org.eclipse.swt.widgets.Composite> - Parameters:
nativeControl- the the native control.itemViewModel- theButtonItemViewModel.- Returns:
- the added
-
getEditor
Returns the actual editor control.- Parameters:
composite- the composite that contains the editor.- Returns:
- the actual editor control.
-
getActionBar
Returns the action bar control.- Parameters:
composite- the composite that contains the action bar.- Returns:
- the action bar control.
-
createEditorControl
Creates an editor control.- Parameters:
control- the composite with action bar.viewModel- the view model.- Returns:
- the newly creates editor control.
-