|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectinfo.bioinfweb.treegraph.gui.treeframe.TreeSelection
public class TreeSelection
This class manages the selection of multiple elements in an tree view panel.
Field Summary | |
---|---|
private HashSet<ConcretePaintableElement> |
elements
|
private TreeViewPanel |
owner
|
private boolean |
valueIsAdjusting
|
Constructor Summary | |
---|---|
TreeSelection(TreeViewPanel owner)
|
Method Summary | ||
---|---|---|
void |
add(ConcretePaintableElement element)
|
|
boolean |
addAll(Collection<? extends ConcretePaintableElement> collection)
|
|
void |
clear()
|
|
String[] |
containedLabelIDs()
Returns a list of the IDs of the labels that are currently selected. |
|
boolean |
contains(ConcretePaintableElement element)
|
|
boolean |
containsOnlyType(Class<? extends PaintableElement> elementClass)
Tests if only elements of the specified type are selected. |
|
boolean |
containsType(Class<? extends PaintableElement> elementClass)
Tests if at least one elements of the specified type is selected. |
|
int |
elementCount(Class<? extends PaintableElement> elementClass)
Returns the number of all selected elements of the specified type. |
|
ConcretePaintableElement |
first()
|
|
|
getAllElementsOfType(Class<T> elementClass)
Returns all selected elements of the specified type. |
|
|
getFirstElementOfType(Class<T> elementClass)
Returns the first selected element of the specified type. |
|
Node |
getFirstLeaf()
|
|
boolean |
getValueIsAdjusting()
|
|
boolean |
isEmpty()
|
|
Iterator<ConcretePaintableElement> |
iterator()
|
|
void |
remove(ConcretePaintableElement element)
|
|
void |
set(ConcretePaintableElement element)
Sets the specified element as the only selected element. |
|
void |
setValueIsAdjusting(boolean valueIsAdjusting)
Sets the valueIsAdjusting property, which indicates whether or not upcoming
selection changes should be considered part of a single change. |
|
int |
size()
Returns the number of selected elements. |
|
|
toArray(T[] arr)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private TreeViewPanel owner
private HashSet<ConcretePaintableElement> elements
private boolean valueIsAdjusting
Constructor Detail |
---|
public TreeSelection(TreeViewPanel owner)
Method Detail |
---|
public ConcretePaintableElement first()
public Iterator<ConcretePaintableElement> iterator()
public <T> T[] toArray(T[] arr)
public boolean getValueIsAdjusting()
public void setValueIsAdjusting(boolean valueIsAdjusting)
valueIsAdjusting
property, which indicates whether or not upcoming
selection changes should be considered part of a single change. If this property is set to
true
no changes are reported to the registered listeners until it is set to
false
again. (The listeners are informed directly of the property is set back
to false
.)
valueIsAdjusting
- the new value of the propertypublic void set(ConcretePaintableElement element)
element
- the element to select or nil
if no element should be#
selectedpublic void add(ConcretePaintableElement element)
public boolean addAll(Collection<? extends ConcretePaintableElement> collection)
public void remove(ConcretePaintableElement element)
public void clear()
public int size()
elementCount(Class)
public boolean isEmpty()
public boolean contains(ConcretePaintableElement element)
public boolean containsType(Class<? extends PaintableElement> elementClass)
elementClass
- defines the element type
true
at least one is selectedisEmpty()
public boolean containsOnlyType(Class<? extends PaintableElement> elementClass)
elementClass
- defines the element type
true
if no other elements are selectedpublic <T extends PaintableElement> T getFirstElementOfType(Class<T> elementClass)
T
- the class of the returned element (determined by elementClass
)elementClass
- the class of the sought-after element
null
of none of this type is selectedpublic Node getFirstLeaf()
public <T extends PaintableElement> T[] getAllElementsOfType(Class<T> elementClass)
T
- the class of the returned elements (determined by elementClass
)elementClass
- the class of the sought-after elements
public String[] containedLabelIDs()
""
is included in the result.
public int elementCount(Class<? extends PaintableElement> elementClass)
elementClass
- the class of the elements to be counted
size()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |