Class NFEEditVertexTool

    • Constructor Detail

      • NFEEditVertexTool

        public NFEEditVertexTool​(MapCanvas canvas,
                                 NFEModel model,
                                 NFESelectionTool selectionTool)
        Allocates a new edit vertex tool
        Parameters:
        canvas - the current MapCanvas
        model - the current NFE model
        selectionTool - an underlying selection tool used for selecting lines to be altered by the tool
    • Method Detail

      • getTargetGeoObj

        public GeoObject getTargetGeoObj()
        Gets the GeoObject to be modified
        Returns:
      • handleEvent

        public boolean handleEvent​(java.util.EventObject evt)
        Description copied from interface: Layer
        The main method that performs event handling for this tool. Returns whether the event should be propagated to other layers down stream (further down the layer stack) after the event has been handled.
        Specified by:
        handleEvent in interface Layer
        Overrides:
        handleEvent in class NFETool
      • mouseMoved

        protected boolean mouseMoved​(java.awt.event.MouseEvent evt)
        Description copied from class: NFETool
        Called when a mouse moved event is registered
        Overrides:
        mouseMoved in class NFETool
        Parameters:
        evt - a mouse event event
        Returns:
        true if the event should be propagated
      • mouseClicked

        protected boolean mouseClicked​(java.awt.event.MouseEvent evt)
        Description copied from class: NFETool
        Called when a mouse clicked event is registered
        Overrides:
        mouseClicked in class NFETool
        Parameters:
        evt - a mouse event
        Returns:
        true if the event should be propagated
      • render

        public long render​(java.awt.Graphics2D g)
        Description copied from interface: Layer
        Renders the layer contents to the given Graphics.
        Specified by:
        render in interface Layer
        Overrides:
        render in class BasicLayer
        Parameters:
        g - the graphics object
        Returns:
        the rendering time in milliseconds.
      • drawVertices

        protected void drawVertices​(java.awt.Graphics2D g,
                                    double[] vertices)
      • drawSnapPoint

        protected void drawSnapPoint​(java.awt.Graphics2D g,
                                     oracle.sdovis.edit.util.JGeometrySegmentPoint snapPoint)