Interface ManipulableLayer
-
- All Superinterfaces:
BehavioralLayer
- All Known Implementing Classes:
NFEManipulableFeatureLayerRenderer
,NFENetworkRenderer
public interface ManipulableLayer extends BehavioralLayer
Defines a layer which elements can be manipulated.
-
-
Field Summary
Fields Modifier and Type Field Description static int
TRANS_NONE
No transformationstatic int
TRANS_PULL
Pullingstatic int
TRANS_TRANSLATE
Translation
-
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 itboolean
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 manipulatedjava.util.Collection<GeoObject>
getManipulableGeoObjects()
Gets the layer's GeoObjects that can be manipulatedManipulationPreview
getPreview(long manId)
Gets a preview for a manipulationoracle.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 specifiedboolean
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.-
Methods inherited from interface oracle.spatial.network.nfe.vis.mapcanvas.behavior.BehavioralLayer
refresh
-
-
-
-
Field Detail
-
TRANS_NONE
static final int TRANS_NONE
No transformation- See Also:
- Constant Field Values
-
TRANS_TRANSLATE
static final int TRANS_TRANSLATE
Translation- See Also:
- Constant Field Values
-
TRANS_PULL
static final int TRANS_PULL
Pulling- See Also:
- Constant Field Values
-
-
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 GeoObjectpoint
- a point in model's coordinate systemtolerance
- 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 GeoObjectmanGeoObjGroup
- a collection containing more GeoObjects to be manipulated. It can be nullsnapPoint
- 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 manipulatedmanGeoObjGroup
- a group of GeoObjects to be manipulatedsnapPoint
- a segment point relative to the GeoObject's geometrytransformation
- 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 iddataPoint
- 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 iddataPoint
- 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
-
-