Class SwtToolBarView
- 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<ToolBarViewModel,org.eclipse.swt.widgets.ToolBar>
-
- com._1c.g5.v8.dt.ui.aef.swt.views.SwtToolBarView
-
- All Implemented Interfaces:
IView<SwtRenderingParameters,ToolBarViewModel,org.eclipse.swt.widgets.ToolBar>
public class SwtToolBarView extends SwtStandardView<ToolBarViewModel,org.eclipse.swt.widgets.ToolBar>
The SWT toolbar view.
It works withToolBarViewModel
. Each item of the view model is reflected to a toolbar item. Toolbar item handles own selection (user click) and sendsExecuteActionEvent
through channel.- See Also:
ExecuteActionEvent
-
-
Constructor Summary
Constructors Constructor Description SwtToolBarView()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
bind(ToolBarViewModel viewModel, org.eclipse.swt.widgets.ToolBar nativeControl)
Binds the view model and native control together to this view.protected int
computeNativeStyle(ToolBarViewModel viewModel)
Computes an SWT widget style flags.protected org.eclipse.swt.widgets.ToolBar
createControl(org.eclipse.swt.widgets.Composite parent, ToolBarViewModel viewModel)
Creates a native control for the view without decorations.void
unbind(ToolBarViewModel viewModel, org.eclipse.swt.widgets.ToolBar nativeControl)
Unbinds the view model and the native control from this view.-
Methods inherited from class com._1c.g5.aef2.standard.swt.views.SwtStandardView
createNativeControl, setEnabledApperance
-
Methods inherited from class com._1c.g5.aef2.swt.views.SwtView
getContentControl, handleFocusEvent, isControlDisposed, setContentControl, uiAsyncExec, uiSyncExec
-
Methods inherited from class com._1c.g5.aef2.views.View
bindListener, bindNativeControl, bindValue, bindValue, bindViewModel, getNativeControl, getParameters, getViewModel, handleEventChannelEvent, initialize, manageObservable, queueAndWaitEvent, queueEvent, registerEventChannelListener, unbindNativeControl, unbindViewModel, unmanageObservable, unregisterEventChannelListener
-
-
-
-
Method Detail
-
bind
public void bind(ToolBarViewModel viewModel, org.eclipse.swt.widgets.ToolBar 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<ToolBarViewModel,org.eclipse.swt.widgets.ToolBar>
- Parameters:
viewModel
- the view model to bind.nativeControl
- the native control to bind.
-
unbind
public void unbind(ToolBarViewModel viewModel, org.eclipse.swt.widgets.ToolBar 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,ToolBarViewModel,org.eclipse.swt.widgets.ToolBar>
- Parameters:
viewModel
- the view mode to unbind.nativeControl
- the native control to unbind.
-
createControl
protected org.eclipse.swt.widgets.ToolBar createControl(org.eclipse.swt.widgets.Composite parent, ToolBarViewModel viewModel)
Description copied from class:SwtStandardView
Creates a native control for the view without decorations.- Specified by:
createControl
in classSwtStandardView<ToolBarViewModel,org.eclipse.swt.widgets.ToolBar>
- Parameters:
parent
- the parent composite to place a control in.viewModel
- the view mode to create a control for.- Returns:
- the newly created control
-
computeNativeStyle
protected int computeNativeStyle(ToolBarViewModel viewModel)
Description copied from class:SwtView
Computes an SWT widget style flags. Override it to customize the flags.- Overrides:
computeNativeStyle
in classSwtView<ToolBarViewModel,org.eclipse.swt.widgets.ToolBar>
- Parameters:
viewModel
- the view model to compute a style from.- Returns:
- the computed style.
- See Also:
Widget.getStyle()
-
-