Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


Eclipse Platform
Release 3.5

org.eclipse.jface.viewers
Interface ILazyTreeContentProvider

All Superinterfaces:
IContentProvider

public interface ILazyTreeContentProvider
extends IContentProvider

The ILazyTreeContentProvider is the content provider for tree viewers created using the SWT.VIRTUAL flag that only wish to return their contents as they are queried.

Since:
3.2

Method Summary
  Object getParent ( Object element)
          Returns the parent for the given element, or null indicating that the parent can't be computed.
 void updateChildCount ( Object element, int currentChildCount)
          Called when the TreeViewer needs an up-to-date child count for the given element, for example from StructuredViewer.refresh() and StructuredViewer.setInput(Object).
 void updateElement ( Object parent, int index)
          Called when a previously-blank item becomes visible in the TreeViewer.
 
Methods inherited from interface org.eclipse.jface.viewers. IContentProvider
dispose, inputChanged
 

Method Detail

updateElement

void updateElement(
Object parent,
                   int index)
Called when a previously-blank item becomes visible in the TreeViewer. If the content provider knows the child element for the given parent at this index, it should respond by calling 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.

Parameters:
parent - The parent of the element, or the viewer's input if the element to update is a root element
index - The index of the element to update in the tree

updateChildCount

void updateChildCount(
Object element,
                      int currentChildCount)
Called when the TreeViewer needs an up-to-date child count for the given element, for example from StructuredViewer.refresh() and StructuredViewer.setInput(Object). If the content provider knows the given element, 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.

Parameters:
element - The element for which an up-to-date child count is needed, or the viewer's input if the number of root elements is requested
currentChildCount - The current child count for the element that needs updating

getParent


Object getParent(
Object element)
Returns the parent for the given element, or 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.

Parameters:
element - the element
Returns:
the parent element, or null if it has none or if the parent cannot be computed

Eclipse Platform
Release 3.5

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire