Package docking

Class ActionContext

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      ComponentProvider getComponentProvider()
      Returns the #ComponentProvider that generated this ActionContext
      java.lang.Object getContextObject()
      Returns the object that was included by the ComponentProvider when this context was created.
      java.awt.event.MouseEvent getMouseEvent()
      Returns the context's mouse event.
      java.lang.Object getSourceObject()
      Returns the sourceObject from the actionEvent that triggered this context to be generated.
      void setContextObject​(java.lang.Object contextObject)
      Sets the context object for this context.
      void setMouseEvent​(java.awt.event.MouseEvent e)
      Updates the context's mouse event.
      void setSource​(java.lang.Object sourceObject)
      Sets the sourceObject for this ActionContext.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ActionContext

        public ActionContext()
      • ActionContext

        public ActionContext​(ComponentProvider provider,
                             java.lang.Object contextObject)
        Basic constructor for ActionContext
        Parameters:
        provider - the ComponentProvider that generated this context.
        contextObject - an optional contextObject that the ComponentProvider can provide to the action.
      • ActionContext

        public ActionContext​(ComponentProvider provider,
                             java.lang.Object contextObject,
                             java.lang.Object sourceObject)
        For Testing
    • Method Detail

      • getComponentProvider

        public ComponentProvider getComponentProvider()
        Returns the #ComponentProvider that generated this ActionContext
        Returns:
      • getContextObject

        public java.lang.Object getContextObject()
        Returns the object that was included by the ComponentProvider when this context was created.
        Returns:
        the object that was included by the ComponentProvider when this context was created.
      • setContextObject

        public void setContextObject​(java.lang.Object contextObject)
        Sets the context object for this context. This can be any object of the creator's choosing that can be provided for later retrieval.
        Parameters:
        contextObject - Sets the context object for this context.
      • getSourceObject

        public java.lang.Object getSourceObject()
        Returns the sourceObject from the actionEvent that triggered this context to be generated.
        Returns:
        the sourceObject from the actionEvent that triggered this context to be generated.
      • setSource

        public void setSource​(java.lang.Object sourceObject)
        Sets the sourceObject for this ActionContext. This method is used internally by the DockingWindowManager. ComponentProvider and action developers should only use this method for testing.
        Parameters:
        sourceObject -
      • setMouseEvent

        public void setMouseEvent​(java.awt.event.MouseEvent e)
        Updates the context's mouse event. Contexts that are based upon key events will have no mouse event.
        Parameters:
        e - the event that triggered this context.
      • getMouseEvent

        public java.awt.event.MouseEvent getMouseEvent()
        Returns the context's mouse event. Contexts that are based upon key events will have no mouse event.
        Returns:
        the mouse event that triggered this context; null implies a key event-based context