public abstract class TreeStructureAdvisor extends Object
ObservableListTreeContentProvider
or an
ObservableSetTreeContentProvider
. This class is intended to be
subclassed by clients.Constructor and Description |
---|
TreeStructureAdvisor() |
Modifier and Type | Method and Description |
---|---|
Object |
getParent(Object element)
Returns the parent for the given element, or
null indicating
that the parent can't be computed. |
Boolean |
hasChildren(Object element)
Returns whether the given element has children, or
null if
the actual children collection should be consulted. |
public Object getParent(Object element)
null
indicating
that the parent can't be computed. In this case the tree-structured
viewer can't expand a given node correctly if requested. The default
implementation returns null; clients should override.element
- the elementnull
if it has none or if the
parent cannot be computedpublic Boolean hasChildren(Object element)
null
if
the actual children collection should be consulted. The default
implementation returns null; clients should override.
Intended as an optimization for when the viewer does not need the actual
children. Clients may be able to implement this more efficiently than
getChildren
.
element
- the elementBoolean.TRUE
if the given element has children,
Boolean.FALSE
if the given element
never has children, or null
if the
children collection should be consulted.
Copyright (c) 2000, 2014 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.