public abstract class AbstractSelectionHandler extends java.lang.Object implements SelectionHandler
asCollection() method, hence the latter
method is left unimplemented here.
Drawing it is
associated with. This abstract implementation does not take care of this.| Constructor and Description |
|---|
AbstractSelectionHandler() |
| Modifier and Type | Method and Description |
|---|---|
void |
addToSelection(Element e)
Add the given Element to the current selection.
|
Element[] |
asArray()
Return the selected elements wrapped in an array.
|
abstract java.util.Collection |
asCollection()
Return the selected elements wrapped in a Collection
|
void |
delete(Drawing d)
Delete all selected Element's from the given Drawing, and remove the reference to them
from this SelectionHandler.
|
java.util.Iterator |
elements()
Return an iterator over the selected Element's.
|
boolean |
isSelected(Element e,
boolean includeAncestors)
Return whether the given Element is selected or not.
|
void |
replaceSelection(Element e)
Replace the current selection with the given element.
|
void |
selectAll(Drawing d)
Select all Element's in the given drawing.
|
int |
size()
Return the number of selected objects.
|
void |
unSelect(Element e)
Unselect the given Element, i.e.
|
void |
unSelectAll()
Unselect all Element's in the given drawing.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcontainsClass, createFilteredCollectionpublic int size()
asCollection().size in interface SelectionHandlerpublic java.util.Iterator elements()
asCollection().elements in interface SelectionHandlerpublic abstract java.util.Collection asCollection()
asCollection in interface SelectionHandlerpublic Element[] asArray()
asCollection().asArray in interface SelectionHandlerpublic boolean isSelected(Element e, boolean includeAncestors)
asCollection().isSelected in interface SelectionHandlerincludeAncestors - if true, return true if this Element or one of its ancestors is selected.public void selectAll(Drawing d)
selectAll in interface SelectionHandlerpublic void unSelectAll()
asCollection().unSelectAll in interface SelectionHandlerpublic void addToSelection(Element e)
asCollection().addToSelection in interface SelectionHandlerpublic void replaceSelection(Element e)
replaceSelection in interface SelectionHandlerpublic void unSelect(Element e)
asCollection().unSelect in interface SelectionHandlerpublic void delete(Drawing d)
delete in interface SelectionHandlerSubmit a bug : syd@jpicedt.org