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,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 Modifier and Type Field Description static StringCLEAR_BUTTON_COMMAND_IDThe command of the clear button.static StringDEFAULT_CONTEXTThe context of the control.static StringOPEN_BUTTON_COMMAND_IDThe command of the open button.static StringSELECT_BUTTON_COMMAND_IDThe command of the select button.
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractDtSelectComponent(P parameterization)Instantiates a new component with the given parameterization.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected static ButtonItemViewModelcreateButtonItem(String commandId, String tooltip, org.eclipse.swt.graphics.Image image)Create a new button view model with the provided parameters.protected Collection<ButtonItemViewModel>createButtons()Creates a collection of theButtonItemViewModelthat will be added to the component view model.protected static ButtonItemViewModelcreateClearButtonItem()protected static ButtonItemViewModelcreateOpenButtonItem()protected static ButtonItemViewModelcreateSelectButtonItem()protected voidcreateViewModels()Creates the view models of this component.voiddispose()Disposes this component, its view models and its child components.protected voidhandleButtonClicked(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 Detail
-
DEFAULT_CONTEXT
public static final String DEFAULT_CONTEXT
The context of the control.- See Also:
- Constant Field Values
-
SELECT_BUTTON_COMMAND_ID
public static final String SELECT_BUTTON_COMMAND_ID
The command of the select button. By default the command corresponds to "F4" hotkey.- See Also:
- Constant Field Values
-
CLEAR_BUTTON_COMMAND_ID
public static final String CLEAR_BUTTON_COMMAND_ID
The command of the clear button. By default the command corresponds to "Shift + F4" hotkey.- See Also:
- Constant Field Values
-
OPEN_BUTTON_COMMAND_ID
public static final String OPEN_BUTTON_COMMAND_ID
The command of the open button. By default the command corresponds to "Ctrl/Cmd + Shift + F4" hotkey.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
AbstractDtSelectComponent
protected AbstractDtSelectComponent(P parameterization)
Instantiates a new component with the given parameterization.- Parameters:
parameterization- the parameterization.
-
-
Method Detail
-
dispose
public void dispose()
Description copied from interface:IComponentDisposes this component, its view models and its child components.- Specified by:
disposein interfaceIComponent<M extends IModel>- Overrides:
disposein classComponent<M extends IModel,P extends IParameterization>
-
handleButtonClicked
protected void handleButtonClicked(IViewModel viewModel)
Handles the button clicked event.- Parameters:
viewModel- the view model of the event sender.
-
createViewModels
protected void createViewModels()
Description copied from class:ComponentCreates the view models of this component. Override it to provide a view models of this component.- Overrides:
createViewModelsin classAbstractControlComponent<M extends IModel,P extends IParameterization,VM extends SelectViewModel>
-
createButtons
protected Collection<ButtonItemViewModel> createButtons()
Creates a collection of theButtonItemViewModelthat will be added to the component view model.- Returns:
- the collection of the
ButtonItemViewModel.
-
createSelectButtonItem
protected static ButtonItemViewModel createSelectButtonItem()
- Returns:
- the newly created
ButtonItemViewModelwith the fields filled in accordance with the select button.
-
createClearButtonItem
protected static ButtonItemViewModel createClearButtonItem()
- Returns:
- the newly created
ButtonItemViewModelwith the fields filled in accordance with the clear button.
-
createOpenButtonItem
protected static ButtonItemViewModel createOpenButtonItem()
- Returns:
- the newly created
ButtonItemViewModelwith 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 benulltooltip- the command tooltip message, cannot benullimage- the command action image, cannot benull- Returns:
- a new button view model with the provided parameters, never
null
-
-