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 fromValueChooser
. Also it can be used as wrapped view at LWT view since it makes public some protected methods.
-
-
Constructor Summary
Constructors Constructor Description AbstractDtEditorBarView()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected IActionBarItem
addActionBarItem(org.eclipse.swt.widgets.Composite nativeControl, ButtonItemViewModel itemViewModel)
Adds theIActionBarItem
with the to native control.void
bind(VM viewModel, org.eclipse.swt.widgets.Composite nativeControl)
Binds the view model and native control together to this view.protected org.eclipse.swt.widgets.Composite
createControl(org.eclipse.swt.widgets.Composite parent, VM viewModel)
Creates a native control for the view without decorations.protected abstract NC
createEditorControl(org.eclipse.swt.widgets.Composite control, VM viewModel)
Creates an editor control.protected org.eclipse.swt.widgets.Composite
doCreateNativeControl(org.eclipse.swt.widgets.Composite parent, VM viewModel)
Creates only the select control.protected ActionBar
getActionBar(org.eclipse.swt.widgets.Composite composite)
Returns the action bar control.protected IActionBarItem[]
getActionBarItems(org.eclipse.swt.widgets.Composite nativeControl, VM viewModel)
Returns theIActionBarItem
elements of the native control.protected NC
getEditor(org.eclipse.swt.widgets.Composite composite)
Returns the actual editor control.void
unbind(VM viewModel, org.eclipse.swt.widgets.Composite nativeControl)
Unbinds 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, setEnabledApperance
-
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, unbindNativeControl, unbindViewModel, unmanageObservable, unregisterEventChannelListener
-
-
-
-
Method Detail
-
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 classAbstractDtSelectView<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 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:SwtStandardView
Creates a native control for the view without decorations.- Overrides:
createControl
in 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:AbstractDtSelectView
Creates only the select control. Does not creates buttons.- Specified by:
doCreateNativeControl
in classAbstractDtSelectView<VM extends SelectViewModel,org.eclipse.swt.widgets.Composite>
- Parameters:
parent
- the parentComposite
control.viewModel
- isSelectViewModel
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 theIActionBarItem
elements of the native control.- Specified by:
getActionBarItems
in classAbstractDtSelectView<VM extends SelectViewModel,org.eclipse.swt.widgets.Composite>
- Parameters:
nativeControl
- the native control.viewModel
- isSelectViewModel
successor model.- Returns:
- the
IActionBarItem
elements. - See Also:
ValueChooser.getActionBarItems()
-
addActionBarItem
protected IActionBarItem addActionBarItem(org.eclipse.swt.widgets.Composite nativeControl, ButtonItemViewModel itemViewModel)
Description copied from class:AbstractDtSelectView
Adds theIActionBarItem
with the to native control.- Specified by:
addActionBarItem
in classAbstractDtSelectView<VM extends SelectViewModel,org.eclipse.swt.widgets.Composite>
- Parameters:
nativeControl
- the the native control.itemViewModel
- theButtonItemViewModel
.- 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.
-
-