Class NFEManipulateTool

  • All Implemented Interfaces:
    Layer, Tool, PropertySupport

    public class NFEManipulateTool
    extends NFETool
    Tool used to manipulate GeoObjects within a layer. Manipulation are really performed by the target layer which must implement the ManipulableLayer interface. This tool only acts as an interface between the user and the manipulable layer. The kind of manipulations allowed are defined by the manipulable layer.
    • Field Detail

      • TAG_PULLABLE_LAYER

        public static final java.lang.String TAG_PULLABLE_LAYER
        See Also:
        Constant Field Values
    • Constructor Detail

      • NFEManipulateTool

        public NFEManipulateTool​(MapCanvas canvas,
                                 NFEModel model,
                                 NFESelectionTool selectTool)
        Allocates a new manipulate tool
        Parameters:
        canvas - the current MapCanvas
        model - the current NFE model
        selectTool - the underlying selection tool used to select the target GeoObjects
    • Method Detail

      • 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
      • mousePressed

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

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

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

        protected boolean keyReleased​(java.awt.event.KeyEvent keyEvent)
        Description copied from class: NFETool
        Called when a key released event is registered
        Overrides:
        keyReleased in class NFETool
        Parameters:
        keyEvent - a key event
        Returns:
        true if the event should be propagated
      • clear

        public void clear()
        Description copied from interface: Layer
        Clears all contents of this layer.
        Specified by:
        clear in interface Layer
        Overrides:
        clear in class BasicLayer
      • 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.