Class DefaultSelectionManager<V extends GeoObject>
- java.lang.Object
-
- oracle.spatial.network.nfe.vis.maps.core.DefaultSelectionManager<V>
-
-
Constructor Summary
Constructors Constructor Description DefaultSelectionManager(Layer parent)Crates a new instance associated to the given layer
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddSelectionListener(SelectionListener l)Adds a selection listenerbooleanclear()Clears the selectionvoidfireSelectionChanged(SelectionEvent evt)Notifies the given SelectionEvent to all the registered selection listenersjava.util.List<V>getSelection()Gets a list of selected objectsjava.util.List<V>getSelection(V obj)Returns selected objects that are children of the provided objects GeoObject's isSubElementOf() determines if an object is children of another objectbooleanisSelected(V obj)True if the object is selectedvoidremoveSelectionListener(SelectionListener l)Removes the given selection listenerbooleanselect(java.util.List<V> objs)Sets the objects in the list as selected without clearing the previous selectionsbooleansetSelection(java.util.List<V> objs)Sets all the objects in the list as selected.intsize()Returns the number of selected objectsbooleanunselect(java.util.List<V> objs)Marks the given objects as not selected
-
-
-
Constructor Detail
-
DefaultSelectionManager
public DefaultSelectionManager(Layer parent)
Crates a new instance associated to the given layer- Parameters:
parent-
-
-
Method Detail
-
isSelected
public boolean isSelected(V obj)
True if the object is selected- Parameters:
obj-- Returns:
-
clear
public boolean clear()
Clears the selection- Returns:
-
size
public int size()
Returns the number of selected objects- Returns:
-
getSelection
public java.util.List<V> getSelection()
Gets a list of selected objects- Returns:
-
getSelection
public java.util.List<V> getSelection(V obj)
Returns selected objects that are children of the provided objects GeoObject's isSubElementOf() determines if an object is children of another object- Parameters:
obj-- Returns:
-
setSelection
public boolean setSelection(java.util.List<V> objs)
Sets all the objects in the list as selected. It clears the previous selection.- Parameters:
objs-- Returns:
-
select
public boolean select(java.util.List<V> objs)
Sets the objects in the list as selected without clearing the previous selections- Parameters:
objs-- Returns:
-
unselect
public boolean unselect(java.util.List<V> objs)
Marks the given objects as not selected- Parameters:
objs-- Returns:
-
addSelectionListener
public void addSelectionListener(SelectionListener l)
Adds a selection listener- Parameters:
l-
-
removeSelectionListener
public void removeSelectionListener(SelectionListener l)
Removes the given selection listener- Parameters:
l-
-
fireSelectionChanged
public void fireSelectionChanged(SelectionEvent evt)
Notifies the given SelectionEvent to all the registered selection listeners- Parameters:
evt-
-
-