|
Eclipse Platform Release 3.7 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.jface.viewers.StructuredSelection
org.eclipse.jface.viewers.TreeSelection
public class TreeSelection
A concrete implementation of the ITreeSelection interface,
suitable for instantiating.
This class is not intended to be subclassed.
| Field Summary | |
|---|---|
static TreeSelection |
EMPTY
The canonical empty selection. |
| Constructor Summary | |
|---|---|
TreeSelection()
Creates a new empty selection. |
|
TreeSelection(TreePath treePath)
Constructs a selection based on the elements identified by the given tree path. |
|
TreeSelection(TreePath[] paths)
Constructs a selection based on the elements identified by the given tree paths. |
|
TreeSelection(TreePath[] paths,
IElementComparer comparer)
Constructs a selection based on the elements identified by the given tree paths. |
|
TreeSelection(TreePath treePath,
IElementComparer comparer)
Constructs a selection based on the elements identified by the given tree path. |
|
| Method Summary | |
|---|---|
boolean |
equals(Object obj)
Returns whether this structured selection is equal to the given object. |
IElementComparer |
getElementComparer()
Returns the element comparer passed in when the tree selection has been created or null if no comparer has been
provided. |
TreePath[] |
getPaths()
Returns the paths in this selection |
TreePath[] |
getPathsFor(Object element)
Returns the paths in this selection whose last segment is equal to the given element |
int |
hashCode()
|
| Methods inherited from class org.eclipse.jface.viewers.StructuredSelection |
|---|
getFirstElement, isEmpty, iterator, size, toArray, toList, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.eclipse.jface.viewers.IStructuredSelection |
|---|
getFirstElement, iterator, size, toArray, toList |
| Methods inherited from interface org.eclipse.jface.viewers.ISelection |
|---|
isEmpty |
| Field Detail |
|---|
public static final TreeSelection EMPTY
null.
| Constructor Detail |
|---|
public TreeSelection(TreePath[] paths)
paths - tree paths
public TreeSelection(TreePath[] paths,
IElementComparer comparer)
paths - tree pathscomparer - the comparer, or null if default equals is to be usedpublic TreeSelection(TreePath treePath)
treePath - tree path, or null for an empty selection
public TreeSelection(TreePath treePath,
IElementComparer comparer)
treePath - tree path, or null for an empty selectioncomparer - the comparer, or null if default equals is to be usedpublic TreeSelection()
EMPTY which contains an empty selection singleton.
EMPTY| Method Detail |
|---|
public IElementComparer getElementComparer()
null if no comparer has been
provided.
nullpublic boolean equals(Object obj)
StructuredSelection
equals in class StructuredSelectionobj - the other object
true if they are equal, and false otherwisepublic int hashCode()
hashCode in class Objectpublic TreePath[] getPaths()
ITreeSelection
getPaths in interface ITreeSelectionpublic TreePath[] getPathsFor(Object element)
ITreeSelection
getPathsFor in interface ITreeSelectionelement - the element to get the tree paths for
|
Eclipse Platform Release 3.7 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Guidelines for using Eclipse APIs.
Copyright (c) Eclipse contributors and others 2000, 2011. All rights reserved.