Class AbstractDtSelectView<VM extends SelectViewModel,LC extends ILightControl>
- java.lang.Object
-
- com._1c.g5.aef2.views.View<LwtRenderingParameters,VM,LC>
-
- com._1c.g5.aef2.lwt.views.LwtView<VM,LC>
-
- com._1c.g5.aef2.standard.lwt.views.AbstractLwtStandardView<VM,LightEditorBar<LC>>
-
- com._1c.g5.v8.dt.ui.aef.lwt.views.AbstractDtSelectView<VM,LC>
-
- All Implemented Interfaces:
IView<LwtRenderingParameters,VM,LightEditorBar<LC>>
- Direct Known Subclasses:
AbstractDtComboView
,DtActionBarView
public abstract class AbstractDtSelectView<VM extends SelectViewModel,LC extends ILightControl> extends AbstractLwtStandardView<VM,LightEditorBar<LC>>
Base class for controls with feasible buttons in action bar. Is used for successor views with opportunity to select value from dialog and clear value.
-
-
Constructor Summary
Constructors Constructor Description AbstractDtSelectView()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected void
attachButtonsToControl(LightEditorBar<LC> editorBar, VM viewModel)
Attaches the buttons specified in the view model to theeditorBar
.protected void
bind(VM viewModel, LightEditorBar<LC> lightControl)
Binds the view model and native control together to this view.protected LightEditorBar<LC>
createControl(ILightComposite parent, VM viewModel)
Creates a light control for the view without decorations.protected abstract LightEditorBar<LC>
createEditorBar(VM viewModel)
Creates only the editor bar control.protected void
handleButtonClick(LightEditorBar<LC> lightControl, VM viewModel, LightImageButton item)
Handles button click.protected void
handleEventChannelEvent(IEvent event, VM viewModel, LightEditorBar<LC> control)
Handles events fromIEventChannel
.protected void
processHotkeyExecution(HotkeyExecutionEvent event, LightEditorBar<LC> lightControl, VM viewModel)
protected void
processHotkeyRefresh(HotkeyRefreshEvent event, LightEditorBar<LC> lightControl, VM viewModel)
protected void
setupEditorBar(LightEditorBar<LC> lightControl, VM viewModel)
Setups the givenlightControl
, i.e.-
Methods inherited from class com._1c.g5.aef2.standard.lwt.views.AbstractLwtStandardView
createLightControl, setEnabledApperance
-
Methods inherited from class com._1c.g5.aef2.lwt.views.LwtView
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, unbind, unbindNativeControl, unbindViewModel, unmanageObservable, unregisterEventChannelListener
-
-
-
-
Method Detail
-
bind
protected void bind(VM viewModel, LightEditorBar<LC> lightControl)
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 classAbstractLwtStandardView<VM extends SelectViewModel,LightEditorBar<LC extends ILightControl>>
- Parameters:
viewModel
- the view model to bind.lightControl
- the native control to bind.
-
handleEventChannelEvent
protected void handleEventChannelEvent(IEvent event, VM viewModel, LightEditorBar<LC> control)
Description copied from class:View
Handles events fromIEventChannel
. By default handles only focus events.- Overrides:
handleEventChannelEvent
in classView<LwtRenderingParameters,VM extends SelectViewModel,LightEditorBar<LC extends ILightControl>>
- Parameters:
event
- the event, cannot benull
.viewModel
- the view model, cannot benull
.control
- the control, cannot benull
.
-
createControl
protected LightEditorBar<LC> createControl(ILightComposite parent, VM viewModel)
Description copied from class:AbstractLwtStandardView
Creates a light control for the view without decorations.- Specified by:
createControl
in classAbstractLwtStandardView<VM extends SelectViewModel,LightEditorBar<LC extends ILightControl>>
- Parameters:
parent
- the parent light composite.viewModel
- the view mode to create a control for.- Returns:
- the newly created control.
-
handleButtonClick
protected void handleButtonClick(LightEditorBar<LC> lightControl, VM viewModel, LightImageButton item)
Handles button click.- Parameters:
item
- the button item.
-
setupEditorBar
protected void setupEditorBar(LightEditorBar<LC> lightControl, VM viewModel)
Setups the givenlightControl
, i.e. adds needed controls to editor bar, sets colors, borders and so on.- Parameters:
lightControl
- the editor bar control.viewModel
- the view model.
-
createEditorBar
protected abstract LightEditorBar<LC> createEditorBar(VM viewModel)
Creates only the editor bar control. Does not creates buttons.- Parameters:
parent
- the parentComposite
control.viewModel
- isSelectViewModel
successor model.- Returns:
- the newly created select control.
-
attachButtonsToControl
protected void attachButtonsToControl(LightEditorBar<LC> editorBar, VM viewModel)
Attaches the buttons specified in the view model to theeditorBar
.- Parameters:
editorBar
- the editor barviewModel
- the view model
-
processHotkeyExecution
protected void processHotkeyExecution(HotkeyExecutionEvent event, LightEditorBar<LC> lightControl, VM viewModel)
-
processHotkeyRefresh
protected void processHotkeyRefresh(HotkeyRefreshEvent event, LightEditorBar<LC> lightControl, VM viewModel)
-
-