Class NFEManipulableFeatureLayerRenderer

    • Constructor Detail

      • NFEManipulableFeatureLayerRenderer

        public NFEManipulableFeatureLayerRenderer​(MapCanvas canvas,
                                                  NFEModel model,
                                                  long featLayerId)
        Allocates a new manipulable feature layer renderer
        Parameters:
        canvas - the MapCanvas where the layer will be rendered
        model - the feature layer's model
        featLayerId - the feature layer ID
    • Method Detail

      • getHandlePoints

        public double[] getHandlePoints​(GeoObject geoObj)
        Description copied from interface: ManipulableLayer
        Gets the ordinates of the points from which a GeoObject can be manipulated
        Specified by:
        getHandlePoints in interface ManipulableLayer
        Parameters:
        geoObj - a GeoObject
        Returns:
        an array of ordinates in model's coordinate system
      • getSnapPoint

        public oracle.sdovis.edit.util.JGeometrySegmentPoint getSnapPoint​(GeoObject geoObj,
                                                                          java.awt.geom.Point2D dataPoint,
                                                                          double tolerance)
        Description copied from interface: ManipulableLayer
        Gets the closer GeoObject's snap point to the given point using the tolerance specified
        Specified by:
        getSnapPoint in interface ManipulableLayer
        Parameters:
        geoObj - a GeoObject
        tolerance - a tolarence in model's coordinate system
        Returns:
        a segment point relative to the GeoObject's geometry
      • getApplicableTransformation

        public int getApplicableTransformation​(GeoObject geoObj,
                                               java.util.Collection<GeoObject> manGeoObjGroup,
                                               oracle.sdovis.edit.util.JGeometrySegmentPoint snapPoint)
        Description copied from interface: ManipulableLayer
        Gets manipulation available for the given GeoObject and its current snap point. It is also specified all the GeoObjects that need to be manipulated along with the first GeoObject passed.
        Specified by:
        getApplicableTransformation in interface ManipulableLayer
        Parameters:
        geoObj - a GeoObject
        manGeoObjGroup - a collection containing more GeoObjects to be manipulated. It can be null
        snapPoint - a segment point relative to the GeoObject's geometry
        Returns:
        a manipulation code
      • startManipulation

        public long startManipulation​(GeoObject geoObj,
                                      java.util.Collection<GeoObject> manGeoObjGroup,
                                      oracle.sdovis.edit.util.JGeometrySegmentPoint snapPoint,
                                      int transformation)
        Description copied from interface: ManipulableLayer
        Starts a manipulation session. The manipulation will be performed over the give GeoObject and the GeoObject group passed.
        Specified by:
        startManipulation in interface ManipulableLayer
        Parameters:
        geoObj - the target GeoObject to be manipulated
        manGeoObjGroup - a group of GeoObjects to be manipulated
        snapPoint - a segment point relative to the GeoObject's geometry
        transformation - the type of manipulation to be performed
        Returns:
        a manipulation session id
      • finishManipulation

        public boolean finishManipulation​(long manId,
                                          java.awt.geom.Point2D dataPoint)
        Description copied from interface: ManipulableLayer
        finishes the manipulation identified by the given id. The last mouse point is specified.
        Specified by:
        finishManipulation in interface ManipulableLayer
        Parameters:
        manId - the manipulation session id
        dataPoint - the last point for the manipulation in model's coordinate system
        Returns:
        true if the manipulation was performed successfully
      • manipulate

        public boolean manipulate​(long manId,
                                  java.awt.geom.Point2D dataPoint)
        Description copied from interface: ManipulableLayer
        Updates the state of a manipulation with the last point. It is useful if a live preview has to be shown.
        Specified by:
        manipulate in interface ManipulableLayer
        Parameters:
        manId - a manipulation session id
        dataPoint - the last user point (it may be a mouse point) in model's coordinate system
        Returns:
        true if the manipulation state was updated successfully
      • cancelManipulation

        public void cancelManipulation​(long manId)
        Description copied from interface: ManipulableLayer
        Cancels the given manipulation and releases all the resources related to it
        Specified by:
        cancelManipulation in interface ManipulableLayer
        Parameters:
        manId - a manipulation session id