|
Eclipse Platform Release 3.3 |
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The ILazyTreePathContentProvider is a tree path-based content provider for tree viewers created using the SWT.VIRTUAL flag that only wish to return their contents as they are queried.
Method Summary | |
---|---|
TreePath[] |
getParents(Object element)
Return the possible parent paths for the given element. |
void |
updateChildCount(TreePath treePath,
int currentChildCount)
Called when the TreeViewer needs an up-to-date child count for the given tree path, for example from StructuredViewer.refresh() and
StructuredViewer.setInput(Object) . |
void |
updateElement(TreePath parentPath,
int index)
Called when a previously-blank item becomes visible in the TreeViewer. |
void |
updateHasChildren(TreePath path)
Called when the TreeViewer needs up-to-date information whether the node at the given tree path can be expanded. |
Methods inherited from interface org.eclipse.jface.viewers.IContentProvider |
---|
dispose, inputChanged |
Method Detail |
public void updateElement(TreePath parentPath, int index)
TreeViewer.replace(Object, int, Object)
. The content provider
should also update the child count for any replaced element by calling
TreeViewer.setChildCount(Object, int)
. If the given current child
count is already correct, setChildCount does not have to be called since
a call to replace will not change the child count.
NOTE #updateElement(int index) can be used to determine
selection values. If TableViewer#replace(Object, int) is not called
before returning from this method, selections may have missing or stale
elements. In this situation it is suggested that the selection is asked
for again after replace() has been called.
parentPath
- The tree path of parent of the element, or if the
element to update is a root element, an empty tree pathindex
- The index of the element to update in the treepublic void updateChildCount(TreePath treePath, int currentChildCount)
StructuredViewer.refresh()
and
StructuredViewer.setInput(Object)
. If the content provider knows the
element at the given tree path, it should respond by calling
TreeViewer.setChildCount(Object, int)
. If the given current
child count is already correct, no action has to be taken by this content
provider.
treePath
- The tree path for which an up-to-date child count is needed, or
if the number of root elements is requested, the empty tree pathcurrentChildCount
- The current child count for the element that needs updatingpublic void updateHasChildren(TreePath path)
TreeViewer.setHasChildren(Object, boolean)
. The content provider
may also choose to call TreeViewer.setChildCount(Object, int)
instead if it knows the number of children.
Intended as an optimization for when the viewer does not need the actual
children. Clients may be able to implement this more efficiently than
updateChildCount
.
path
- The tree path for which up-to-date information about children
is neededpublic TreePath[] getParents(Object element)
element
- the element
|
Eclipse Platform Release 3.3 |
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp. and others 2000, 2007. All rights reserved.