Class HoverManager


  • public class HoverManager
    extends java.lang.Object
    A 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 Detail

      • HoverManager

        public HoverManager()
    • Method Detail

      • setHover

        public void setHover​(GeoObject obj)
      • clear

        public void clear()
      • 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()