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>
TheAbstractDtActionBarComponentimplementation that allows to select values from dialog.- See Also:
IEmfSelectionModel
-
-
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
Constructors Modifier Constructor Description protectedAbstractSelectionComponent(P parameterization)Creates a new component.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected voidattachToModel()Attaches this component to the model.protected abstract ISwtSelectionDialogcreateSelectionDialog(org.eclipse.swt.widgets.Shell shell)Creates anISwtSelectionDialogand returns it.protected voiddetachFromModel()Detaches 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 voidonSelectAction()Invoked 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, 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 Detail
-
AbstractSelectionComponent
protected AbstractSelectionComponent(P parameterization)
Creates a new component.- Parameters:
parameterization- the parameterization, cannot benull
-
-
Method Detail
-
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
protected String getPresentationValue(M model, Object fromObject)
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
protected abstract ISwtSelectionDialog createSelectionDialog(org.eclipse.swt.widgets.Shell shell)
Creates anISwtSelectionDialogand returns it.- Parameters:
shell- the shell.- Returns:
- a newly created
ISwtSelectionDialogornull
-
getSelectedObjects
protected abstract Object[] getSelectedObjects(M model)
Returns the selected objects for dialog init.- Parameters:
model- the model.- Returns:
- the selected objects.
-
-