Class AbstractInteractor

    • Constructor Detail

      • AbstractInteractor

        public AbstractInteractor()
    • Method Detail

      • accept

        public boolean accept​(LayerEvent event)
        Test if the interactor accepts the given event. This default implementation returns true if the interactor is enabled and the mouse filter accepts the event.
        Specified by:
        accept in interface Interactor
        Parameters:
        event - The event
      • getMouseFilter

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

        public boolean isConsuming()
        Test the consuming flag of this interactor. If this flag is set, the interactor consumes all input events that get past its mouse filter.
        Specified by:
        isConsuming in interface Interactor
        Returns:
        true if it is consuming
      • isEnabled

        public boolean isEnabled()
        Test the enabled flag of this interactor. If true, the interactor is prepared to handle layer events.
        Specified by:
        isEnabled in interface Interactor
        Returns:
        true if the interactor is enabled
      • isMotionEnabled

        public boolean isMotionEnabled()
        Test the motion enabled flag of this interactor. If true, the interactor is prepared to handle layer motion events.
        Specified by:
        isMotionEnabled in interface Interactor
        Returns:
        true if the interactor is motion enabled
      • setConsuming

        public void setConsuming​(boolean flag)
        Set the consuming flag of this layer. If this flag is set, the interactor consumes all events that get past its mouse filter. By default, the flag is true.
        Parameters:
        flag - The consuming flag
      • setEnabled

        public 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 is true.
        Specified by:
        setEnabled in interface Interactor
        Parameters:
        flag - the enabled flag
      • setMotionEnabled

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

        public void setMouseFilter​(MouseFilter filter)
        Set the mouse filter of this interactor.
        Specified by:
        setMouseFilter in interface Interactor
        Parameters:
        filter - The filter