Class CompositeInteractor

    • Constructor Detail

      • CompositeInteractor

        public CompositeInteractor()
        Create a new composite interactor. [The following is currently not true: By default, composite interactors do not consume events.]
    • Method Detail

      • addInteractor

        public void addInteractor​(Interactor i)
        Add an interactor to this interactor. The added interactor will have events forwarded to it if it accepts the event.
      • interactors

        public java.util.Iterator interactors()
        Return an interactor over the attached interactors.
      • mouseEntered

        public void mouseEntered​(LayerEvent event)
        Handle a mouse entered event. If this interactor is not enabled, return immediately. For each interactor, see if it will accept the event, and if it will, pass this event and the subsequent motion and exited events to it.
        Specified by:
        mouseEntered in interface LayerMotionListener
        Overrides:
        mouseEntered in class AbstractInteractor
        Parameters:
        event - The event
      • mousePressed

        public void mousePressed​(LayerEvent event)
        Handle a mouse press event. If this interactor is enabled, call each attached interactor's accept() event. Pass the event to the first one that accepts the event, and remember it to forward subsequent events to. Continue this process for all attached interactors until the event is consumed.
        Specified by:
        mousePressed in interface LayerListener
        Overrides:
        mousePressed in class AbstractInteractor
        Parameters:
        event - The event
      • removeInteractor

        public void removeInteractor​(Interactor i)
        Remove the given interactor from this interactor.