|
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface SelectionHandler
a SelectionHandler allows to manage selection-related behaviours for a given instance of
Drawing
.
Concrete implementation may generally want to store references
on selected Element's
here. This may be easily carried out
by relying on Java's collection framework, hence we have specified some useful methods here for
this purpose.
Method Summary | ||
---|---|---|
Element[] |
asArray()
Return the selected elements wrapped in an array (may be a convenience call to asCollection) |
|
boolean |
containsClass(Class<? extends Element> clazz)
Returns whether this selection-handler contains objects that are of the same type of inherit from the given clazz. |
|
|
createFilteredCollection(Class<T> clazz)
Returns a list containing elements in the selection that are of the same type or inherit the given clazz. |
|
void |
delete(Drawing d)
Delete all selected Element's from the given Drawing |
|
CtrlPtSubset |
getCtrlPtSubset(ConvexZoneGroup csg,
BitSet czExtension)
|
|
void |
replace(Element e)
Replace the current selection with the given element. |
|
void |
replace(Element oldE,
Element newE)
Remplace l'élément oldE par l'élément newE lorsque oldE
appartient à la sélection. |
|
void |
selectAll(Drawing d)
Select all Element's belonging to the given Drawing. |
Methods inherited from interface java.util.Collection |
---|
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray |
Method Detail |
---|
Element[] asArray()
CtrlPtSubset getCtrlPtSubset(ConvexZoneGroup csg, BitSet czExtension)
jpicedt.graphic.model
void selectAll(Drawing d)
void replace(Element e)
void replace(Element oldE, Element newE)
oldE
par l'élément newE
lorsque oldE
appartient à la sélection. Sans effet si newE
est déjà dans la sélection.
L'ordre dans la collection n'est pas conservé.
oldE
- l'Element
à remplacer.newE
- l'Element
qui sert de remplacement.void delete(Drawing d)
<T extends Element> ArrayList<T> createFilteredCollection(Class<T> clazz)
boolean containsClass(Class<? extends Element> clazz)
|
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |