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

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 ITreePathContentProvider

All Superinterfaces:
IContentProvider, IStructuredContentProvider

public interface ITreePathContentProvider
extends IStructuredContentProvider

An interface to content providers for tree-structure-oriented viewers that provides content based on the path of elements in the tree viewer..

Since:
3.2
See Also:
AbstractTreeViewer

Method Summary
  Object[] getChildren ( TreePath parentPath)
          Returns the child elements of the last element in the given path.
  TreePath[] getParents ( Object element)
          Return the possible parent paths for the given element.
 boolean hasChildren ( TreePath path)
          Returns whether the last element of the given path has children.
 
Methods inherited from interface org.eclipse.jface.viewers. IStructuredContentProvider
getElements
 
Methods inherited from interface org.eclipse.jface.viewers. IContentProvider
dispose, inputChanged
 

Method Detail

getChildren

Object[] getChildren(
TreePath parentPath)
Returns the child elements of the last element in the given path. Implementors may want to use the additional context of the complete path of a parent element in order to decide which children to return.

The provided path is relative to the input. The root elements must be obtained by calling IStructuredContentProvider.getElements(Object).

The result is not modified by the viewer.

Parameters:
parentPath - the path of the parent element
Returns:
an array of child elements

hasChildren

boolean hasChildren(
TreePath path)
Returns whether the last element of the given path has 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 getChildren.

Parameters:
path - the path
Returns:
true if the lat element of the path has children, and false if it has no children

getParents

TreePath[] getParents(
Object element)
Return the possible parent paths for the given element. An empty array can be returned if the paths cannot be computed. If the element is a potential child of the input of the viewer, an empty tree path should be an entry in the returned array.

Parameters:
element - the element
Returns:
the possible parent paths for the given element

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