Class LineBandTool

  • All Implemented Interfaces:
    java.awt.event.KeyListener, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.awt.event.MouseWheelListener, java.util.EventListener, Tool
    Direct Known Subclasses:
    AbstractDrawTool, AbstractStreamDrawTool

    public abstract class LineBandTool
    extends IndicatorTool
    • Field Detail

      • coordinates

        private java.util.List coordinates
      • tentativeCoordinate

        protected Coordinate tentativeCoordinate
      • closeRing

        private boolean closeRing
      • clickCountToFinish

        private int clickCountToFinish
      • drawBandLines

        private boolean drawBandLines
    • Constructor Detail

      • LineBandTool

        public LineBandTool()
      • LineBandTool

        public LineBandTool​(java.awt.Cursor cursor)
    • Method Detail

      • setCloseRing

        protected void setCloseRing​(boolean closeRing)
      • setClickCountToFinishGesture

        protected void setClickCountToFinishGesture​(int clickCountToFinish)
      • setDrawBandLines

        protected void setDrawBandLines​(boolean drawBandLines)
      • lastCoordinate

        public Coordinate lastCoordinate()
      • mouseReleased

        public void mouseReleased​(java.awt.event.MouseEvent e)
        Specified by:
        mouseReleased in interface java.awt.event.MouseListener
        Overrides:
        mouseReleased in class BasicTool
      • mouseLocationChanged

        protected void mouseLocationChanged​(java.awt.event.MouseEvent e)
      • mouseMoved

        public void mouseMoved​(java.awt.event.MouseEvent e)
        Specified by:
        mouseMoved in interface java.awt.event.MouseMotionListener
        Overrides:
        mouseMoved in class IndicatorTool
      • mouseDragged

        public void mouseDragged​(java.awt.event.MouseEvent e)
        Specified by:
        mouseDragged in interface java.awt.event.MouseMotionListener
        Overrides:
        mouseDragged in class IndicatorTool
      • mousePressed

        public void mousePressed​(java.awt.event.MouseEvent e)
        Specified by:
        mousePressed in interface java.awt.event.MouseListener
        Overrides:
        mousePressed in class BasicTool
      • getShape

        protected java.awt.Shape getShape()
        Description copied from class: IndicatorTool
        Gets the shape for displaying the current state of the action. Subclasses should override.
        Overrides:
        getShape in class IndicatorTool
        Returns:
        null if nothing should be drawn
      • drawVertices

        private void drawVertices​(java.awt.geom.GeneralPath path)
      • isFinishingRelease

        protected boolean isFinishingRelease​(java.awt.event.MouseEvent e)
      • toArray

        protected Coordinate[] toArray​(java.util.List coordinates)
      • finishGesture

        protected void finishGesture()
                              throws java.lang.Exception
        Throws:
        java.lang.Exception
      • bandFinished

        protected abstract void bandFinished()
                                      throws java.lang.Exception
        Throws:
        java.lang.Exception