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
public class DtActionBarView extends AbstractDtSelectView<ActionBarViewModel,ValueChooser>
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 Constructor Description DtActionBarView()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected IActionBarItem
addActionBarItem(ValueChooser nativeControl, ButtonItemViewModel item)
Adds theIActionBarItem
with the to native control.protected void
bind(ActionBarViewModel viewModel, ValueChooser nativeControl)
Binds the view model and native control together to this view.protected int
computeNativeStyle(ActionBarViewModel viewModel)
Computes an SWT widget style flags.protected ValueChooser
doCreateNativeControl(org.eclipse.swt.widgets.Composite parent, ActionBarViewModel viewModel)
Creates only the select control.protected IActionBarItem[]
getActionBarItems(ValueChooser nativeControl, ActionBarViewModel viewModel)
Returns theIActionBarItem
elements of the native control.protected void
handleButtonClick(ValueChooser nativeControl, ActionBarViewModel viewModel, IActionBarItem item)
Handles button click.protected void
handleEventChannelEvent(IEvent event, ActionBarViewModel viewModel, ValueChooser control)
Handles events fromIEventChannel
.protected void
handleFocusEvent(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, 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
getContentControl, 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, unbind, unbindNativeControl, unbindViewModel, unmanageObservable, unregisterEventChannelListener
-
-
-
-
Method Detail
-
bind
protected void bind(ActionBarViewModel viewModel, ValueChooser 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<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:View
Handles events fromIEventChannel
. By default handles only focus events.- Overrides:
handleEventChannelEvent
in 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:View
HandlesFocusEvent
.- Overrides:
handleFocusEvent
in 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:AbstractDtSelectView
Creates only the select control. Does not creates buttons.- Specified by:
doCreateNativeControl
in classAbstractDtSelectView<ActionBarViewModel,ValueChooser>
- Parameters:
parent
- the parentComposite
control.viewModel
- isSelectViewModel
successor model.- Returns:
- the newly created select control.
-
computeNativeStyle
protected int computeNativeStyle(ActionBarViewModel viewModel)
Description copied from class:SwtView
Computes an SWT widget style flags. Override it to customize the flags.- Overrides:
computeNativeStyle
in 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:AbstractDtSelectView
Returns theIActionBarItem
elements of the native control.- Specified by:
getActionBarItems
in classAbstractDtSelectView<ActionBarViewModel,ValueChooser>
- Parameters:
nativeControl
- the native control.viewModel
- isSelectViewModel
successor model.- Returns:
- the
IActionBarItem
elements. - See Also:
ValueChooser.getActionBarItems()
-
addActionBarItem
protected IActionBarItem addActionBarItem(ValueChooser nativeControl, ButtonItemViewModel item)
Description copied from class:AbstractDtSelectView
Adds theIActionBarItem
with the to native control.- Specified by:
addActionBarItem
in 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:AbstractDtSelectView
Handles button click.- Overrides:
handleButtonClick
in classAbstractDtSelectView<ActionBarViewModel,ValueChooser>
item
- the button item.
-
-