Class AbstractSelectionComponent<M extends IEmfSelectionModel<? extends org.eclipse.emf.ecore.EObject>,P extends ISelectionParameterization>
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,ActionBarViewModel>
com._1c.g5.v8.dt.ui.aef.component.AbstractDtActionBarComponent<M,P>
com._1c.g5.v8.dt.ui.aef.component.AbstractDtReadonlyActionBarComponent<M,P>
com._1c.g5.v8.dt.ui.aef.component.AbstractSelectionActionBarComponent<M,P>
com._1c.g5.v8.dt.ui.aef.component.AbstractSelectionComponent<M,P>
- All Implemented Interfaces:
IComponent<M>,IEventChannel
- Direct Known Subclasses:
AbstractSelectionFromListDialogComponent,AbstractSelectionFromTreeDialogComponent
public abstract class AbstractSelectionComponent<M extends IEmfSelectionModel<? extends org.eclipse.emf.ecore.EObject>,P extends ISelectionParameterization>
extends AbstractSelectionActionBarComponent<M,P>
The
AbstractDtActionBarComponent implementation that allows to select
values from dialog.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com._1c.g5.aef2.standard.components.StandardComponent
StandardComponent.BindingDirection -
Field Summary
Fields inherited from class com._1c.g5.v8.dt.ui.aef.component.AbstractDtSelectComponent
CLEAR_BUTTON_COMMAND_ID, DEFAULT_CONTEXT, OPEN_BUTTON_COMMAND_ID, SELECT_BUTTON_COMMAND_ID -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractSelectionComponent(P parameterization) Creates a new component. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidAttaches this component to the model.protected abstract ISwtSelectionDialogcreateSelectionDialog(org.eclipse.swt.widgets.Shell shell) Creates anISwtSelectionDialogand returns it.protected voidDetaches this component from the model.protected StringgetPresentationValue(M model, Object fromObject) Returns value presentation from selection model label provider.protected abstract Object[]getSelectedObjects(M model) Returns the selected objects for dialog init.protected voidInvoked on the select button action.protected abstract voidsetValueOnDialogResult(List<Object> result) Sets theresultobjects obtained from dialog to component model.Methods inherited from class com._1c.g5.v8.dt.ui.aef.component.AbstractSelectionActionBarComponent
createButtons, handleButtonClicked, onClearActionMethods inherited from class com._1c.g5.v8.dt.ui.aef.component.AbstractDtReadonlyActionBarComponent
bindModelToViewModel, createViewModels, disposeViewModels, transformModelToString, updateViewModel, updateViewModelsMethods inherited from class com._1c.g5.v8.dt.ui.aef.component.AbstractDtActionBarComponent
createControlViewModelMethods inherited from class com._1c.g5.v8.dt.ui.aef.component.AbstractDtSelectComponent
createButtonItem, createClearButtonItem, createOpenButtonItem, createSelectButtonItem, disposeMethods inherited from class com._1c.g5.aef2.standard.components.AbstractControlComponent
getControlViewModel, handleExternalValidationEvent, isEditable, refresh, setLayoutDataMethods inherited from class com._1c.g5.aef2.standard.components.StandardComponent
bindList, bindModel, bindValue, bindValue, createDefaultViewModelList, createDefaultViewModelValue, getLayoutData, isEnabled, isPassive, setEnabled, setFocus, updateViewModelStatusMethods inherited from class com._1c.g5.aef2.components.Component
addComponent, addListener, addViewModel, areChildCommitsEnabled, areChildRefreshEnabled, areComponentsCreated, beginExternalUpdate, checkComponents, checkViewModels, commit, createComponents, 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
-
Constructor Details
-
AbstractSelectionComponent
Creates a new component.- Parameters:
parameterization- the parameterization, cannot benull
-
-
Method Details
-
attachToModel
protected void attachToModel()Description copied from class:ComponentAttaches this component to the model. Override it to add some listeners to the model.- Overrides:
attachToModelin classComponent<M extends IEmfSelectionModel<? extends org.eclipse.emf.ecore.EObject>,P extends ISelectionParameterization>
-
detachFromModel
protected void detachFromModel()Description copied from class:ComponentDetaches this component from the model. Override it to remove listeners from the model.- Overrides:
detachFromModelin classComponent<M extends IEmfSelectionModel<? extends org.eclipse.emf.ecore.EObject>,P extends ISelectionParameterization>
-
onSelectAction
protected void onSelectAction()Description copied from class:AbstractSelectionActionBarComponentInvoked on the select button action.- Specified by:
onSelectActionin classAbstractSelectionActionBarComponent<M extends IEmfSelectionModel<? extends org.eclipse.emf.ecore.EObject>,P extends ISelectionParameterization>
-
getPresentationValue
Returns value presentation from selection model label provider.- Parameters:
model- the value model, cannot benullfromObject- the model object, cannot benull- Returns:
- the presentation value, can be
null
-
createSelectionDialog
Creates anISwtSelectionDialogand returns it.- Parameters:
shell- the shell.- Returns:
- a newly created
ISwtSelectionDialogornull
-
getSelectedObjects
Returns the selected objects for dialog init.- Parameters:
model- the model.- Returns:
- the selected objects.
-
setValueOnDialogResult
Sets theresultobjects obtained from dialog to component model.- Parameters:
result- the dialog result.
-