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 void
addSelectionListener(SelectionListener l)
Adds a selection listenerboolean
clear()
Clears the selectionvoid
fireSelectionChanged(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 objectboolean
isSelected(V obj)
True if the object is selectedvoid
removeSelectionListener(SelectionListener l)
Removes the given selection listenerboolean
select(java.util.List<V> objs)
Sets the objects in the list as selected without clearing the previous selectionsboolean
setSelection(java.util.List<V> objs)
Sets all the objects in the list as selected.int
size()
Returns the number of selected objectsboolean
unselect(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
-
-
-