Class AbstractDtSelectComponent<M extends IModel,P extends IParameterization,VM extends SelectViewModel>
java.lang.Object
com._1c.g5.aef2.components.Component<M,P>
com._1c.g5.aef2.standard.components.StandardComponent<M,P>
com._1c.g5.aef2.standard.components.AbstractControlComponent<M,P,VM>
com._1c.g5.v8.dt.ui.aef.component.AbstractDtSelectComponent<M,P,VM>
- Type Parameters:
M
- the successor ofIModel
- All Implemented Interfaces:
IComponent<M>
,IEventChannel
- Direct Known Subclasses:
AbstractDtActionBarComponent
,AbstractDtComboSelectComponent
,AbstractDtEditableComboComponent
,ChartLineComponent
,CodeComponent
,DtDateComponent
,EventSubscriptionEventsComboSelectComponent
,GraphicalSchemeLineComponent
,IntervalBoundComponent
,ValueComponent
public abstract class AbstractDtSelectComponent<M extends IModel,P extends IParameterization,VM extends SelectViewModel>
extends AbstractControlComponent<M,P,VM>
Base component for components that allow to select new value with feasible
buttons in action bar. Is used for successor components that gives an
opportunity to select value from dialog and clear value.
- See Also:
-
DtActionBarComponent
AbstractDtComboSelectComponent
-
Nested Class Summary
Nested classes/interfaces inherited from class com._1c.g5.aef2.standard.components.StandardComponent
StandardComponent.BindingDirection
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
AbstractDtSelectComponent
(P parameterization) Instantiates a new component with the given parameterization. -
Method Summary
Modifier and TypeMethodDescriptionprotected static ButtonItemViewModel
createButtonItem
(String commandId, String tooltip, org.eclipse.swt.graphics.Image image) Create a new button view model with the provided parameters.protected Collection<ButtonItemViewModel>
Creates a collection of theButtonItemViewModel
that will be added to the component view model.protected static ButtonItemViewModel
protected static ButtonItemViewModel
protected static ButtonItemViewModel
protected void
Creates the view models of this component.void
dispose()
Disposes this component, its view models and its child components.protected void
handleButtonClicked
(IViewModel viewModel) Handles the button clicked event.Methods inherited from class com._1c.g5.aef2.standard.components.AbstractControlComponent
createControlViewModel, disposeViewModels, getControlViewModel, handleExternalValidationEvent, isEditable, refresh, setLayoutData, updateViewModels
Methods inherited from class com._1c.g5.aef2.standard.components.StandardComponent
bindList, bindModel, bindValue, bindValue, createDefaultViewModelList, createDefaultViewModelValue, getLayoutData, isEnabled, isPassive, setEnabled, setFocus, updateViewModelStatus
Methods inherited from class com._1c.g5.aef2.components.Component
addComponent, addListener, addViewModel, areChildCommitsEnabled, areChildRefreshEnabled, areComponentsCreated, attachToModel, beginExternalUpdate, checkComponents, checkViewModels, commit, createComponents, detachFromModel, disposeComponents, endExternalUpdate, getComponents, getModel, getParameterization, getParent, getRunnableQueue, getScene, getServiceEventQualifiers, getViewModels, isDisposed, isInExternalUpdate, queueAndWaitEvent, queueEvent, removeComponent, removeListener, removeViewModel, setChildCommitsEnabled, setChildRefreshEnable, setModel, setParent, setScene, subscribeOnEvents, subscribeOnEvents, unsubscribeOnEvents
-
Field Details
-
DEFAULT_CONTEXT
The context of the control.- See Also:
-
SELECT_BUTTON_COMMAND_ID
The command of the select button. By default the command corresponds to "F4" hotkey.- See Also:
-
CLEAR_BUTTON_COMMAND_ID
The command of the clear button. By default the command corresponds to "Shift + F4" hotkey.- See Also:
-
OPEN_BUTTON_COMMAND_ID
The command of the open button. By default the command corresponds to "Ctrl/Cmd + Shift + F4" hotkey.- See Also:
-
-
Constructor Details
-
AbstractDtSelectComponent
Instantiates a new component with the given parameterization.- Parameters:
parameterization
- the parameterization.
-
-
Method Details
-
dispose
public void dispose()Description copied from interface:IComponent
Disposes this component, its view models and its child components.- Specified by:
dispose
in interfaceIComponent<M extends IModel>
- Overrides:
dispose
in classComponent<M extends IModel,
P extends IParameterization>
-
handleButtonClicked
Handles the button clicked event.- Parameters:
viewModel
- the view model of the event sender.
-
createViewModels
protected void createViewModels()Description copied from class:Component
Creates the view models of this component. Override it to provide a view models of this component.- Overrides:
createViewModels
in classAbstractControlComponent<M extends IModel,
P extends IParameterization, VM extends SelectViewModel>
-
createButtons
Creates a collection of theButtonItemViewModel
that will be added to the component view model.- Returns:
- the collection of the
ButtonItemViewModel
.
-
createSelectButtonItem
- Returns:
- the newly created
ButtonItemViewModel
with the fields filled in accordance with the select button.
-
createClearButtonItem
- Returns:
- the newly created
ButtonItemViewModel
with the fields filled in accordance with the clear button.
-
createOpenButtonItem
- Returns:
- the newly created
ButtonItemViewModel
with the fields filled in accordance with the open button (the magnifier icon).
-
createButtonItem
protected static ButtonItemViewModel createButtonItem(String commandId, String tooltip, org.eclipse.swt.graphics.Image image) Create a new button view model with the provided parameters.- Parameters:
commandId
- the command context id, cannot benull
tooltip
- the command tooltip message, cannot benull
image
- the command action image, cannot benull
- Returns:
- a new button view model with the provided parameters, never
null
-