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,PredefinedCalculationTypeCalculationBaseComponent,PredefinedDataComponent,WebServiceDataComponent
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 with
IDynamicTreeModel.-
Nested Class Summary
Nested classes/interfaces inherited from class com._1c.g5.aef2.standard.components.StandardComponent
StandardComponent.BindingDirection -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDtDynamicTreeComponent(P parameterization) Creates a new instance with parameterization. -
Method Summary
Modifier and TypeMethodDescriptionprotected IAefTreeContentProvider<TreeItemViewModel>CreatesIAefTreeContentProviderinstance.protected VMCreates control view model instance.protected IViewModelsMapper<T,TreeItemViewModel> Gets or createsIMapperinstance.protected VMCreates view model instance.voiddispose()Disposes this component, its view models and its child components.protected voidDisposes the view models of this component.protected IAefTreeContentProvider<TreeItemViewModel>Returns content provider.protected Object[]Returns mapped selected objects.protected TreeItemViewModelReturns the first element in this selection, ornullif the selection is empty.Returns mapper.protected booleanChecks is current selection is empty.voidprotected voidProcesses tree item double click event.protected abstract voidprocessEvent(IEvent event) Processes the received event from component.protected booleansetCurrentSelections(IViewModel... items) Sets current selection.voidsetMulti(boolean multi) voidsetSelection(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, updateViewModelsMethods 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, 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 Details
-
active
protected boolean active
-
-
Constructor Details
-
DtDynamicTreeComponent
Creates a new instance with parameterization.- Parameters:
parameterization- the parameterization, cannot benull
-
-
Method Details
-
setMulti
public void setMulti(boolean multi) - Parameters:
multi- the multi to set
-
setSelection
Sets selection to the underlying view.- Parameters:
selection- the selection to set, cannot benull
-
dispose
public void dispose()Description copied from interface:IComponentDisposes this component, its view models and its child components.- Specified by:
disposein interfaceIComponent<T>- Overrides:
disposein classComponent<M extends IDynamicTreeModel<T>,P extends ITreeParameterization>
-
labelProviderChanged
- Specified by:
labelProviderChangedin interfaceILabelProviderListener
-
getMapper
Returns mapper.- Returns:
- the mapper, cannot be
nullif control view is created
-
createControlViewModel
Description copied from class:AbstractControlComponentCreates control view model instance.- Specified by:
createControlViewModelin 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:ComponentDisposes the view models of this component. Override it to do some additional disposal operations specific to a component.- Overrides:
disposeViewModelsin classAbstractControlComponent<M extends IDynamicTreeModel<T>,P extends ITreeParameterization, VM extends TreeViewModel>
-
createContentProvider
CreatesIAefTreeContentProviderinstance.- Returns:
- the newly created content provider, cannot be
null
-
createTreeMapper
Gets or createsIMapperinstance.- Returns:
- the newly created mapper, cannot be
null
-
createTreeViewModel
Creates view model instance.- Returns:
- a newly created view model, cannot be
null
-
getContentProvider
Returns content provider.- Returns:
- the content provider, cannot be
nullif control view is created
-
processDoubleClickEvent
Processes tree item double click event. Default implementation opens property sheet view.- Parameters:
event- the event, cannot benull
-
processEvent
Processes the received event from component.- Parameters:
event- the event
-
getCurretnSelectionsFirstItem
Returns the first element in this selection, ornullif the selection is empty.- Returns:
- an element, or
nullif none
-
getCurrentSelectionsObjects
Returns mapped selected objects.- Returns:
- the mapped selected objects, cannot be
null
-
isCurrentSelectionsEmpty
protected boolean isCurrentSelectionsEmpty()Checks is current selection is empty.- Returns:
trueif empty,falseotherwise.
-
setCurrentSelections
Sets current selection.- Parameters:
items- the selected items, cannot benull- Returns:
trueif selection changed,falseotherwise
-