Interface Interactor

    • Method Detail

      • accept

        boolean accept​(LayerEvent event)
        Test is the interactor is prepared to accept this event. If so, the event is passed to the interactor for handling. This method is called only for the mouse-pressed and mouse-entered events. If that event is accepted, other events of the same series (dragged and released, or moved and exited, respectively) are passed to the interactor without calling this method to check. The mouse-entered event is called only if isMotionEnabled() returns true.
        Parameters:
        event - The event
      • getMouseFilter

        MouseFilter getMouseFilter()
        Get the mouse filter used by this interactor to decide whether to accept an event. The result may be null.
        Returns:
        The mouse filter
      • isConsuming

        boolean isConsuming()
        Test the consuming flag of this interactor. If this flag is set, the interactor expects is indicating that all events that it will accept should be consumed.
        Returns:
        true if it is consuming
      • isEnabled

        boolean isEnabled()
        Test the enabled flag of this interactor. If true, the interactor is prepared to handle layer events of all kinds.
        Returns:
        true if the interactor is enabled
      • isMotionEnabled

        boolean isMotionEnabled()
        Test the motion enabled flag of this interactor. If true, the interactor is prepared to handle layer motion events.
        Returns:
        true if the interactor is motion enabled
      • setEnabled

        void setEnabled​(boolean flag)
        Set the enabled flag of this interactor. If true, the interactor is prepared to handle layer events. The default setting of this flag should be true.
        Parameters:
        flag - the enabled flag
      • setMouseFilter

        void setMouseFilter​(MouseFilter filter)
        Set the mouse filter of this interactor. If a filter is set with this method, the interactor is expected to use the filter within its accept() method.
        Parameters:
        filter - the mouse filter.