Class HoverManager
- java.lang.Object
-
- oracle.spatial.network.nfe.vis.maps.core.HoverManager
-
public class HoverManager extends java.lang.ObjectA HoverManager is associated with a MapCanvas, and keeps a reference to the GeoObject that is currently in hover. Note that a GeoObject in hover is not necessarily selected. Typically any object that comes under the mouse cursor is in hover, which only becomes selected if the user then clicks on that object. The HoverManager fires a ChangeEvent whenever the GeoObject in hover changes, or if a hovering GeoObject loses its in hover state (such as after a certain period of time).
-
-
Constructor Summary
Constructors Constructor Description HoverManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddChangeListener(javax.swing.event.ChangeListener l)Adds a change listener to listen for selection changes.voidclear()protected voidfireStateChanged()GeoObjectgetHover()booleanisHover(GeoObject obj)Checks to see if the given GeoObject is currently selected.voidremoveChangeListener(javax.swing.event.ChangeListener l)voidsetHover(GeoObject obj)intsize()Returns the number of GeoObject in hover.
-
-
-
Method Detail
-
setHover
public void setHover(GeoObject obj)
-
clear
public void clear()
-
getHover
public GeoObject getHover()
-
size
public int size()
Returns the number of GeoObject in hover.- Returns:
- 1 if there is a GeoObject currently in hover, 0 otherwise.
-
isHover
public boolean isHover(GeoObject obj)
Checks to see if the given GeoObject is currently selected.- Parameters:
obj- the GeoObject to be checked- Returns:
- true if the given GeoObject is currently selected, false otherwise
-
addChangeListener
public void addChangeListener(javax.swing.event.ChangeListener l)
Adds a change listener to listen for selection changes.- Parameters:
l-
-
removeChangeListener
public void removeChangeListener(javax.swing.event.ChangeListener l)
-
fireStateChanged
protected void fireStateChanged()
-
-