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
ConstructorsModifierConstructorDescriptionprotected
AbstractSelectionComponent
(P parameterization) Creates a new component. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
Attaches this component to the model.protected abstract ISwtSelectionDialog
createSelectionDialog
(org.eclipse.swt.widgets.Shell shell) Creates anISwtSelectionDialog
and returns it.protected void
Detaches this component from the model.protected String
getPresentationValue
(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 void
Invoked on the select button action.protected abstract void
setValueOnDialogResult
(List<Object> result) Sets theresult
objects obtained from dialog to component model.Methods inherited from class com._1c.g5.v8.dt.ui.aef.component.AbstractSelectionActionBarComponent
createButtons, handleButtonClicked, onClearAction
Methods inherited from class com._1c.g5.v8.dt.ui.aef.component.AbstractDtReadonlyActionBarComponent
bindModelToViewModel, createViewModels, disposeViewModels, transformModelToString, updateViewModel, updateViewModels
Methods inherited from class com._1c.g5.v8.dt.ui.aef.component.AbstractDtActionBarComponent
createControlViewModel
Methods inherited from class com._1c.g5.v8.dt.ui.aef.component.AbstractDtSelectComponent
createButtonItem, createClearButtonItem, createOpenButtonItem, createSelectButtonItem, dispose
Methods inherited from class com._1c.g5.aef2.standard.components.AbstractControlComponent
getControlViewModel, handleExternalValidationEvent, isEditable, refresh, setLayoutData
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, 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:Component
Attaches this component to the model. Override it to add some listeners to the model.- Overrides:
attachToModel
in classComponent<M extends IEmfSelectionModel<? extends org.eclipse.emf.ecore.EObject>,
P extends ISelectionParameterization>
-
detachFromModel
protected void detachFromModel()Description copied from class:Component
Detaches this component from the model. Override it to remove listeners from the model.- Overrides:
detachFromModel
in classComponent<M extends IEmfSelectionModel<? extends org.eclipse.emf.ecore.EObject>,
P extends ISelectionParameterization>
-
onSelectAction
protected void onSelectAction()Description copied from class:AbstractSelectionActionBarComponent
Invoked on the select button action.- Specified by:
onSelectAction
in 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 benull
fromObject
- the model object, cannot benull
- Returns:
- the presentation value, can be
null
-
createSelectionDialog
Creates anISwtSelectionDialog
and returns it.- Parameters:
shell
- the shell.- Returns:
- a newly created
ISwtSelectionDialog
ornull
-
getSelectedObjects
Returns the selected objects for dialog init.- Parameters:
model
- the model.- Returns:
- the selected objects.
-
setValueOnDialogResult
Sets theresult
objects obtained from dialog to component model.- Parameters:
result
- the dialog result.
-