Class DragControl

    • Field Detail

      • dragging

        protected boolean dragging
      • dragRefPoint

        protected java.awt.Point dragRefPoint
    • Constructor Detail

      • DragControl

        public DragControl​(HotSpot parent)
        Create a drag control.
        Parameters:
        parent - The screen area that contains this drag control. Input events that cannot be handled by this object will be passed to the parent. May be null.
    • Method Detail

      • isDragging

        public boolean isDragging()
        Is the control currently dragging?
        Returns:
        True if the control is dragging.
      • beginDrag

        protected void beginDrag​(java.awt.Point point)
        Called when a drag begins. This implementation saves the first drag point to dragRefPoint.
        Parameters:
        point - Point at which dragging started.
      • drag

        protected abstract void drag​(java.awt.Point point)
        Called for each point within a drag action.
        Parameters:
        point - Current drag point.
      • endDrag

        protected void endDrag()
        Called when a drag action ends. This implementation sets dragRefPoint to null.