Package com._1c.g5.v8.dt.ui.aef.mappers
Class AefTreeContentProvider<M,T extends ItemViewModel>
- java.lang.Object
-
- com._1c.g5.v8.dt.ui.aef.mappers.AefTreeContentProvider<M,T>
-
- Type Parameters:
M
- the mapper key model type.T
- the provider items type.
- All Implemented Interfaces:
IAefTreeContentProvider<T>
public class AefTreeContentProvider<M,T extends ItemViewModel> extends Object implements IAefTreeContentProvider<T>
IAefTreeContentProvider
implementation that provides tree structure specific.
-
-
Constructor Summary
Constructors Constructor Description AefTreeContentProvider(Object sourceInput, ITreeContentProvider sourceContentProvider, IMapper<M,T> mapper)
Creates a new provider.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
dispose()
Disposes the providerT[]
getChildren(T parentElement)
T[]
getElements()
T
getParent(T element)
boolean
hasChildren(T element)
-
-
-
Constructor Detail
-
AefTreeContentProvider
public AefTreeContentProvider(Object sourceInput, ITreeContentProvider sourceContentProvider, IMapper<M,T> mapper)
Creates a new provider.- Parameters:
sourceInput
- the input object for source content provider, can not benull
sourceContentProvider
- the source content provider, can not benull
mapper
- the mapper maps model object with the tree structure specific, can not benull
-
-
Method Detail
-
getElements
public T[] getElements()
- Specified by:
getElements
in interfaceIAefTreeContentProvider<M>
- Returns:
- the top level elements
-
getChildren
public T[] getChildren(T parentElement)
- Specified by:
getChildren
in interfaceIAefTreeContentProvider<M>
- Parameters:
parentElement
- the parent element- Returns:
- the array of children of the parent element
-
getParent
public T getParent(T element)
- Specified by:
getParent
in interfaceIAefTreeContentProvider<M>
- Parameters:
element
- the element- Returns:
- the parent
-
hasChildren
public boolean hasChildren(T element)
- Specified by:
hasChildren
in interfaceIAefTreeContentProvider<M>
- Parameters:
element
- the element- Returns:
true
if the element has children
-
dispose
public void dispose()
Description copied from interface:IAefTreeContentProvider
Disposes the provider- Specified by:
dispose
in interfaceIAefTreeContentProvider<M>
-
-