Class DragContext


  • public class DragContext
    extends java.lang.Object
    Provides information about mouse inputs and WorldWindow state for use in dragging operations.
    • Field Detail

      • point

        protected java.awt.Point point
        In accordance with the AWT screen coordinates the top left point of the window is the origin.
      • previousPoint

        protected java.awt.Point previousPoint
        In accordance with the AWT screen coordinates the top left point of the window is the origin. This point is the previous screen point.
      • initialPoint

        protected java.awt.Point initialPoint
        In accordance with the AWT screen coordinates the top left point of the window is the origin. This point refers to the initial point of the drag event.
    • Constructor Detail

      • DragContext

        public DragContext()
        Creates a new DragContext instance.
    • Method Detail

      • getPoint

        public java.awt.Point getPoint()
        Returns the current screen point with the origin at the top left corner of the window.
        Returns:
        the current screen point.
      • setPoint

        public void setPoint​(java.awt.Point point)
        Set the DragContext current screen point.
        Parameters:
        point - the point to assign to the current screen point.
        Throws:
        java.lang.IllegalArgumentException - if the point is null.
      • getPreviousPoint

        public java.awt.Point getPreviousPoint()
        Returns the previous screen point with the origin at the top left corner of the window.
        Returns:
        the previous point.
      • setPreviousPoint

        public void setPreviousPoint​(java.awt.Point previousPoint)
        Set the DragContext previous screen point.
        Parameters:
        previousPoint - the screen point to assign to the previous screen point.
        Throws:
        java.lang.IllegalArgumentException - if the previousPoint is null.
      • getInitialPoint

        public java.awt.Point getInitialPoint()
        Returns the initial screen point with the origin at the top left corner of the window. The initial point is the screen point at the initiation of the drag event.
        Returns:
        the initial screen point.
      • setInitialPoint

        public void setInitialPoint​(java.awt.Point initialPoint)
        Set the DragContext initial screen point.
        Parameters:
        initialPoint - the screen point to assign to the initial screen point.
        Throws:
        java.lang.IllegalArgumentException - if the initialPoint is null.
      • getGlobe

        public Globe getGlobe()
        Returns the current Globe for this drag event.
        Returns:
        the current Globe.
      • setGlobe

        public void setGlobe​(Globe globe)
        Parameters:
        globe - the Globe to assign to the DragContext.
        Throws:
        java.lang.IllegalArgumentException - if the globe is null.
      • getView

        public View getView()
        Returns the current View for this drag event.
        Returns:
        the current View.
      • setView

        public void setView​(View view)
        Set the DragContext View.
        Parameters:
        view - the View to assign to the DragContext.
        Throws:
        java.lang.IllegalArgumentException - if the view is null.
      • getDragState

        public java.lang.String getDragState()
        Returns the current drag state for this drag event.
        Returns:
        the drag state.
      • setDragState

        public void setDragState​(java.lang.String dragState)
        Set the DragContext drag state, which must be one of the following three states: AVKey.DRAG_BEGIN , AVKey.DRAG_CHANGE, or AVKey.DRAG_ENDED.
        Parameters:
        dragState - the drag state to assign to the DragContext.
        Throws:
        java.lang.IllegalArgumentException - if the drag state is null or not one of the three states defined for dragging.