Class DtDynamicTreeComponent<T,M extends IDynamicTreeModel<T>,VM extends TreeViewModel,P extends ITreeParameterization>
- 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.DtDynamicTreeComponent<T,M,VM,P>
-
- All Implemented Interfaces:
IComponent<M>
,IEventChannel
,ILabelProviderListener
- Direct Known Subclasses:
NavigatorTreeComponent
,PackageDataComponent
,PredefinedDataComponent
public abstract class DtDynamicTreeComponent<T,M extends IDynamicTreeModel<T>,VM extends TreeViewModel,P extends ITreeParameterization> extends AbstractControlComponent<M,P,VM> implements ILabelProviderListener
Abstract implementation of the tree component that operates withIDynamicTreeModel
.
-
-
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 protected boolean
active
protected IViewModel
currentSelection
-
Constructor Summary
Constructors Constructor Description DtDynamicTreeComponent(P parameterization)
Creates a new instance with parameterization.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected IAefTreeContentProvider<TreeItemViewModel>
createContentProvider()
CreatesIAefTreeContentProvider
instance.protected VM
createControlViewModel()
Creates control view model instance.protected IViewModelsMapper<T,TreeItemViewModel>
createTreeMapper()
Gets or createsIMapper
instance.protected VM
createTreeViewModel()
Creates view model instance.void
dispose()
Disposes this component, its view models and its child components.protected void
disposeViewModels()
Disposes the view models of this component.protected IAefTreeContentProvider<TreeItemViewModel>
getContentProvider()
Returns content provider.protected IViewModelsMapper<T,TreeItemViewModel>
getMapper()
Returns mapper.void
labelProviderChanged(LabelProviderChangedEvent event)
protected void
processDoubleClickEvent(TreeDoubleClickEvent event)
Processes tree item double click event.protected abstract void
processEvent(IEvent event)
Processes the received event from component.void
setMulti(boolean multi)
void
setSelection(Collection<T> elementsToSelect)
Sets selection to the underlying view.-
Methods inherited from class com._1c.g5.aef2.standard.components.AbstractControlComponent
createViewModels, 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
-
active
protected boolean active
-
currentSelection
protected IViewModel currentSelection
-
-
Constructor Detail
-
DtDynamicTreeComponent
public DtDynamicTreeComponent(P parameterization)
Creates a new instance with parameterization.- Parameters:
parameterization
- the parameterization, cannot benull
-
-
Method Detail
-
setMulti
public void setMulti(boolean multi)
- Parameters:
multi
- the multi to set
-
setSelection
public void setSelection(Collection<T> elementsToSelect)
Sets selection to the underlying view.- Parameters:
selection
- the selection to set, cannot benull
-
dispose
public void dispose()
Description copied from interface:IComponent
Disposes this component, its view models and its child components.- Specified by:
dispose
in interfaceIComponent<T>
- Overrides:
dispose
in classComponent<M extends IDynamicTreeModel<T>,P extends ITreeParameterization>
-
createControlViewModel
protected VM createControlViewModel()
Description copied from class:AbstractControlComponent
Creates control view model instance.- Specified by:
createControlViewModel
in classAbstractControlComponent<M extends IDynamicTreeModel<T>,P extends ITreeParameterization,VM extends TreeViewModel>
- Returns:
- a newly created control view model.
-
disposeViewModels
protected void disposeViewModels()
Description copied from class:Component
Disposes the view models of this component. Override it to do some additional disposal operations specific to a component.- Overrides:
disposeViewModels
in classAbstractControlComponent<M extends IDynamicTreeModel<T>,P extends ITreeParameterization,VM extends TreeViewModel>
-
labelProviderChanged
public void labelProviderChanged(LabelProviderChangedEvent event)
- Specified by:
labelProviderChanged
in interfaceILabelProviderListener
-
createContentProvider
protected IAefTreeContentProvider<TreeItemViewModel> createContentProvider()
CreatesIAefTreeContentProvider
instance.- Returns:
- the newly created content provider, cannot be
null
-
createTreeMapper
protected IViewModelsMapper<T,TreeItemViewModel> createTreeMapper()
Gets or createsIMapper
instance.- Returns:
- the newly created mapper, cannot be
null
-
createTreeViewModel
protected VM createTreeViewModel()
Creates view model instance.- Returns:
- a newly created view model, cannot be
null
-
getContentProvider
protected IAefTreeContentProvider<TreeItemViewModel> getContentProvider()
Returns content provider.- Returns:
- the content provider, cannot be
null
if control view is created
-
getMapper
protected IViewModelsMapper<T,TreeItemViewModel> getMapper()
Returns mapper.- Returns:
- the mapper, cannot be
null
if control view is created
-
processDoubleClickEvent
protected void processDoubleClickEvent(TreeDoubleClickEvent event)
Processes tree item double click event. Default implementation opens property sheet view.- Parameters:
event
- the event, cannot benull
-
processEvent
protected abstract void processEvent(IEvent event)
Processes the received event from component.- Parameters:
event
- the event
-
-