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>
TheAbstractDtActionBarComponent
implementation 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 protected
AbstractSelectionComponent(P parameterization)
Creates a new component.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected void
attachToModel()
Attaches this component to the model.protected abstract ISwtSelectionDialog
createSelectionDialog(org.eclipse.swt.widgets.Shell shell)
Creates anISwtSelectionDialog
and returns it.protected void
detachFromModel()
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
onSelectAction()
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 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: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
protected String getPresentationValue(M model, Object fromObject)
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
protected abstract ISwtSelectionDialog createSelectionDialog(org.eclipse.swt.widgets.Shell shell)
Creates anISwtSelectionDialog
and returns it.- Parameters:
shell
- the shell.- Returns:
- a newly created
ISwtSelectionDialog
ornull
-
getSelectedObjects
protected abstract Object[] getSelectedObjects(M model)
Returns the selected objects for dialog init.- Parameters:
model
- the model.- Returns:
- the selected objects.
-
-