|
Eclipse Platform Release 3.3 |
|||||||||||
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
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 pathspublic 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 selectionpublic 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.
Note that TreeSelection.EMPTY is not equals() to StructuredViewer.EMPTY.
EMPTY
Method Detail |
public IElementComparer getElementComparer()
null
if no comparer has been
provided.
null
public boolean equals(Object obj)
StructuredSelection
equals
in class StructuredSelection
obj
- the other object
true
if they are equal, and false
otherwisepublic int hashCode()
public TreePath[] getPaths()
ITreeSelection
getPaths
in interface ITreeSelection
public TreePath[] getPathsFor(Object element)
ITreeSelection
getPathsFor
in interface ITreeSelection
element
- the element to get the tree paths for
|
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.