Class MeasureToolController

    • Field Detail

      • armed

        protected boolean armed
      • active

        protected boolean active
      • moving

        protected boolean moving
      • useRubberBand

        protected boolean useRubberBand
      • freeHand

        protected boolean freeHand
      • freeHandMinSpacing

        protected double freeHandMinSpacing
    • Constructor Detail

      • MeasureToolController

        public MeasureToolController()
    • Method Detail

      • setMeasureTool

        public void setMeasureTool​(MeasureTool measureTool)
        Set the MeasureTool that this controller will be operating on.
        Parameters:
        measureTool - the MeasureTool that this controller will be operating on.
      • getMeasureTool

        public MeasureTool getMeasureTool()
        Get the MeasureTool that this controller is operating on.
        Returns:
        the MeasureTool that this controller is operating on.
      • isUseRubberBand

        public boolean isUseRubberBand()
        Returns true if this controller is using rubber band during shape creation. When using rubber band, new control points are added by first pressing the left mouse button, then dragging the mouse toward the proper position, then releasing the mouse button. Otherwise new control point are added for each new click of the mouse.
        Returns:
        true if this controller is using rubber band during shape creation.
      • setUseRubberBand

        public void setUseRubberBand​(boolean state)
        Set whether this controller should use rubber band during shape creation. When using rubber band, new control points are added by first pressing the left mouse button, then dragging the mouse toward the proper position, then releasing the mouse button. Otherwise new control point are added for each new click of the mouse.
        Parameters:
        state - true if this controller should use rubber band during shape creation.
      • isFreeHand

        public boolean isFreeHand()
        Get whether this controller allows free hand drawing of path and polygons while using rubber band mode.
        Returns:
        true if free hand drawing of path and polygons in rubber band mode.
      • setFreeHand

        public void setFreeHand​(boolean state)
        Set whether this controller allows free hand drawing of path and polygons while using rubber band mode.
        Parameters:
        state - true to allow free hand drawing of path and polygons in rubber band mode.
      • getFreeHandMinSpacing

        public double getFreeHandMinSpacing()
        Get the minimum distance in meters between two control points for free hand drawing.
        Returns:
        the minimum distance in meters between two control points for free hand drawing.
      • setFreeHandMinSpacing

        public void setFreeHandMinSpacing​(double distance)
        Set the minimum distance in meters between two control points for free hand drawing.
        Parameters:
        distance - the minimum distance in meters between two control points for free hand drawing.
      • isArmed

        public boolean isArmed()
        Identifies whether the measure tool controller is armed.
        Returns:
        true if armed, false if not armed.
      • setArmed

        public void setArmed​(boolean armed)
        Arms and disarms the measure tool controller. When armed, the controller monitors user input and builds the shape in response to user actions. When disarmed, the controller ignores all user input.
        Parameters:
        armed - true to arm the controller, false to disarm it.
      • isActive

        public boolean isActive()
        Returns true if the controller is in the middle of a rubber band operation.
        Returns:
        true if the controller is in the middle of a rubber band operation.
      • setActive

        protected void setActive​(boolean state)
      • isMoving

        public boolean isMoving()
        Returns true if the controller is moving the measure shape as a whole.
        Returns:
        true if the controller is moving the measure shape as a whole.
      • setMoving

        protected void setMoving​(boolean state)
      • mousePressed

        public void mousePressed​(java.awt.event.MouseEvent mouseEvent)
        Specified by:
        mousePressed in interface java.awt.event.MouseListener
        Overrides:
        mousePressed in class java.awt.event.MouseAdapter
      • mouseReleased

        public void mouseReleased​(java.awt.event.MouseEvent mouseEvent)
        Specified by:
        mouseReleased in interface java.awt.event.MouseListener
        Overrides:
        mouseReleased in class java.awt.event.MouseAdapter
      • mouseClicked

        public void mouseClicked​(java.awt.event.MouseEvent mouseEvent)
        Specified by:
        mouseClicked in interface java.awt.event.MouseListener
        Overrides:
        mouseClicked in class java.awt.event.MouseAdapter
      • mouseDragged

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

        public void mouseMoved​(java.awt.event.MouseEvent mouseEvent)
        Specified by:
        mouseMoved in interface java.awt.event.MouseMotionListener
        Overrides:
        mouseMoved in class java.awt.event.MouseAdapter
      • moveToPosition

        protected void moveToPosition​(Position oldPosition,
                                      Position newPosition)
        Move the shape to the specified new position
        Parameters:
        oldPosition - Previous position of shape
        newPosition - New position for shape
      • doSelected

        protected void doSelected​(SelectEvent event)
      • dragSelected

        protected void dragSelected​(SelectEvent event)
      • highlight

        protected void highlight​(java.lang.Object o)
      • selectResizeCursor

        protected java.awt.Cursor selectResizeCursor​(Angle azimuth)
      • setComponentCursor

        protected void setComponentCursor​(java.awt.Cursor cursor)
      • autoDisarm

        protected void autoDisarm()