Class DtActionBarView
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<ActionBarViewModel,ValueChooser>
com._1c.g5.v8.dt.ui.aef.swt.views.DtActionBarView
- All Implemented Interfaces:
IView<SwtRenderingParameters,ActionBarViewModel, ValueChooser>
- Direct Known Subclasses:
DtColorActionBarView,SwtPredefinedItemCodeView
The DT action bar view for displaying the value (or values) in the text
control. It has opportunity to specify a set of buttons to display.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected IActionBarItemaddActionBarItem(ValueChooser nativeControl, ButtonItemViewModel item) Adds theIActionBarItemwith the to native control.protected voidbind(ActionBarViewModel viewModel, ValueChooser nativeControl) Binds the view model and native control together to this view.protected intcomputeNativeStyle(ActionBarViewModel viewModel) Computes an SWT widget style flags.protected ValueChooserdoCreateNativeControl(org.eclipse.swt.widgets.Composite parent, ActionBarViewModel viewModel) Creates only the select control.protected IActionBarItem[]getActionBarItems(ValueChooser nativeControl, ActionBarViewModel viewModel) Returns theIActionBarItemelements of the native control.protected voidhandleButtonClick(ValueChooser nativeControl, ActionBarViewModel viewModel, IActionBarItem item) Handles button click.protected voidhandleEventChannelEvent(IEvent event, ActionBarViewModel viewModel, ValueChooser control) Handles events fromIEventChannel.protected voidhandleFocusEvent(FocusEvent event, ActionBarViewModel viewModel, ValueChooser control) HandlesFocusEvent.Methods inherited from class com._1c.g5.v8.dt.ui.aef.swt.views.AbstractDtSelectView
attachButtonsToControl, createControl, 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
getContentControl, 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
-
DtActionBarView
public DtActionBarView()
-
-
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<ActionBarViewModel,ValueChooser> - Parameters:
viewModel- the view model to bind.nativeControl- the native control to bind.
-
handleEventChannelEvent
protected void handleEventChannelEvent(IEvent event, ActionBarViewModel viewModel, ValueChooser control) Description copied from class:ViewHandles events fromIEventChannel. By default handles only focus events.- Overrides:
handleEventChannelEventin classAbstractDtSelectView<ActionBarViewModel,ValueChooser> - Parameters:
event- the event, cannot benull.viewModel- the view model, cannot benull.control- the control, cannot benull.
-
handleFocusEvent
protected void handleFocusEvent(FocusEvent event, ActionBarViewModel viewModel, ValueChooser control) Description copied from class:ViewHandlesFocusEvent.- Overrides:
handleFocusEventin classSwtView<ActionBarViewModel,ValueChooser> - Parameters:
event- the focus event, cannot benull.viewModel- the view model, cannot benull.control- the native control, cannot benull.
-
doCreateNativeControl
protected ValueChooser doCreateNativeControl(org.eclipse.swt.widgets.Composite parent, ActionBarViewModel viewModel) Description copied from class:AbstractDtSelectViewCreates only the select control. Does not creates buttons.- Specified by:
doCreateNativeControlin classAbstractDtSelectView<ActionBarViewModel,ValueChooser> - Parameters:
parent- the parentCompositecontrol.viewModel- isSelectViewModelsuccessor model.- Returns:
- the newly created select control.
-
computeNativeStyle
Description copied from class:SwtViewComputes an SWT widget style flags. Override it to customize the flags.- Overrides:
computeNativeStylein classSwtView<ActionBarViewModel,ValueChooser> - Parameters:
viewModel- the view model to compute a style from.- Returns:
- the computed style.
- See Also:
-
Widget.getStyle()
-
getActionBarItems
protected IActionBarItem[] getActionBarItems(ValueChooser nativeControl, ActionBarViewModel viewModel) Description copied from class:AbstractDtSelectViewReturns theIActionBarItemelements of the native control.- Specified by:
getActionBarItemsin classAbstractDtSelectView<ActionBarViewModel,ValueChooser> - Parameters:
nativeControl- the native control.viewModel- isSelectViewModelsuccessor model.- Returns:
- the
IActionBarItemelements. - See Also:
-
addActionBarItem
Description copied from class:AbstractDtSelectViewAdds theIActionBarItemwith the to native control.- Specified by:
addActionBarItemin classAbstractDtSelectView<ActionBarViewModel,ValueChooser> - Parameters:
nativeControl- the the native control.item- theButtonItemViewModel.- Returns:
- the added
-
handleButtonClick
protected void handleButtonClick(ValueChooser nativeControl, ActionBarViewModel viewModel, IActionBarItem item) Description copied from class:AbstractDtSelectViewHandles button click.- Overrides:
handleButtonClickin classAbstractDtSelectView<ActionBarViewModel,ValueChooser> item- the button item.
-