Class InteractiveLayer

All Implemented Interfaces:
Serializable, Evented, SupportsMouseEvents, Identifiable, LayerPopupFunctions, LayerTooltipFunctions, ExecutableFunctions
Direct Known Subclasses:
ImageOverlay, Marker, Path

public abstract class InteractiveLayer extends Layer implements SupportsMouseEvents
Some Layers can be made interactive - when the user interacts with such a layer, mouse events like click and mouseover can be handled. Use the event handling methods to handle these events.
Since:
2020-02-06
Version:
1.0
Author:
Gabor Kokeny Email: kokeny19@gmail.com
See Also:
  • Constructor Details

    • InteractiveLayer

      protected InteractiveLayer()
      Creates a new interactive layer that is interactive and bubbles mouse events by default.
  • Method Details

    • isInteractive

      public boolean isInteractive()
      Returns whether this layer emits mouse events and reacts to user interaction.
      Returns:
      true if the layer is interactive
    • setInteractive

      public void setInteractive(boolean interactive)
      Sets whether this layer emits mouse events and reacts to user interaction.
      Parameters:
      interactive - true to make the layer interactive
    • isBubblingMouseEvents

      public boolean isBubblingMouseEvents()
      Returns whether mouse events on this layer bubble up to its parents.
      Returns:
      true if mouse events bubble up
    • setBubblingMouseEvents

      public void setBubblingMouseEvents(boolean bubblingMouseEvents)
      Sets whether mouse events on this layer bubble up to its parents.
      Parameters:
      bubblingMouseEvents - true to let mouse events bubble up