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, wait
containsClass, createFilteredCollection
public int size()
asCollection()
.size
in interface SelectionHandler
public java.util.Iterator elements()
asCollection()
.elements
in interface SelectionHandler
public abstract java.util.Collection asCollection()
asCollection
in interface SelectionHandler
public Element[] asArray()
asCollection()
.asArray
in interface SelectionHandler
public boolean isSelected(Element e, boolean includeAncestors)
asCollection()
.isSelected
in interface SelectionHandler
includeAncestors
- if true, return true if this Element or one of its ancestors is selected.public void selectAll(Drawing d)
selectAll
in interface SelectionHandler
public void unSelectAll()
asCollection()
.unSelectAll
in interface SelectionHandler
public void addToSelection(Element e)
asCollection()
.addToSelection
in interface SelectionHandler
public void replaceSelection(Element e)
replaceSelection
in interface SelectionHandler
public void unSelect(Element e)
asCollection()
.unSelect
in interface SelectionHandler
public void delete(Drawing d)
delete
in interface SelectionHandler
Submit a bug : syd@jpicedt.org