Interface HitDetector<H,​P>

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      P detect​(MouseEvent e)
      Detects hits and processes them.
      boolean getDebug()
      Returns whether debug mode is on or not.
      boolean isEnabled()
      Returns whether the detector is currently enabled.
      H locate​(MouseEvent e)
      Detects hits and returns them without processing them.
      void setDebug​(boolean value)
      Turns the debug mode on or off.
      void setEnabled​(boolean value)
      Sets whether the detector is enabled or not.
    • Method Detail

      • setDebug

        void setDebug​(boolean value)
        Turns the debug mode on or off.
        Parameters:
        value - if true then the debug mode is turned on
      • getDebug

        boolean getDebug()
        Returns whether debug mode is on or not.
        Returns:
        true if debug mode is on
      • setEnabled

        void setEnabled​(boolean value)
        Sets whether the detector is enabled or not.
        Parameters:
        value - if true then the detector is enabled
      • isEnabled

        boolean isEnabled()
        Returns whether the detector is currently enabled.
        Returns:
        true if the detector is enabled.
      • detect

        P detect​(MouseEvent e)
        Detects hits and processes them.
        Parameters:
        e - the mouse event to analyze for a hit
        Returns:
        optional result of processing the event
      • locate

        H locate​(MouseEvent e)
        Detects hits and returns them without processing them.
        Parameters:
        e - the mouse event to analyze for a hit
        Returns:
        the hits if any, null otherwise