Interface ManipulableLayer

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void cancelManipulation​(long manId)
      Cancels the given manipulation and releases all the resources related to it
      boolean finishManipulation​(long manId, java.awt.geom.Point2D dataPoint)
      finishes the manipulation identified by the given id.
      int getApplicableTransformation​(GeoObject geoObj, java.util.Collection<GeoObject> manGeoObjGroup, oracle.sdovis.edit.util.JGeometrySegmentPoint snapPoint)
      Gets manipulation available for the given GeoObject and its current snap point.
      double[] getHandlePoints​(GeoObject geoObj)
      Gets the ordinates of the points from which a GeoObject can be manipulated
      java.util.Collection<GeoObject> getManipulableGeoObjects()
      Gets the layer's GeoObjects that can be manipulated
      ManipulationPreview getPreview​(long manId)
      Gets a preview for a manipulation
      oracle.sdovis.edit.util.JGeometrySegmentPoint getSnapPoint​(GeoObject geoObj, java.awt.geom.Point2D dataPoint, double tolerance)
      Gets the closer GeoObject's snap point to the given point using the tolerance specified
      boolean manipulate​(long manId, java.awt.geom.Point2D dataPoint)
      Updates the state of a manipulation with the last point.
      long startManipulation​(GeoObject geoObj, java.util.Collection<GeoObject> manGeoObjGroup, oracle.sdovis.edit.util.JGeometrySegmentPoint snapPoint, int transformation)
      Starts a manipulation session.
    • Method Detail

      • getManipulableGeoObjects

        java.util.Collection<GeoObject> getManipulableGeoObjects()
        Gets the layer's GeoObjects that can be manipulated
        Returns:
        a collection of GeoObjects
      • getHandlePoints

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

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

        int getApplicableTransformation​(GeoObject geoObj,
                                        java.util.Collection<GeoObject> manGeoObjGroup,
                                        oracle.sdovis.edit.util.JGeometrySegmentPoint snapPoint)
        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.
        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

        long startManipulation​(GeoObject geoObj,
                               java.util.Collection<GeoObject> manGeoObjGroup,
                               oracle.sdovis.edit.util.JGeometrySegmentPoint snapPoint,
                               int transformation)
        Starts a manipulation session. The manipulation will be performed over the give GeoObject and the GeoObject group passed.
        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

        boolean finishManipulation​(long manId,
                                   java.awt.geom.Point2D dataPoint)
        finishes the manipulation identified by the given id. The last mouse point is specified.
        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

        boolean manipulate​(long manId,
                           java.awt.geom.Point2D dataPoint)
        Updates the state of a manipulation with the last point. It is useful if a live preview has to be shown.
        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

        void cancelManipulation​(long manId)
        Cancels the given manipulation and releases all the resources related to it
        Parameters:
        manId - a manipulation session id
      • getPreview

        ManipulationPreview getPreview​(long manId)
        Gets a preview for a manipulation
        Parameters:
        manId - a manipulation session id
        Returns:
        a manipulation preview object