public class NFEManipulableFeatureLayerRenderer extends NFEFeatureLayerRenderer implements ManipulableLayer
TRANS_NONE, TRANS_PULL, TRANS_TRANSLATEMETHOD_MODEL_OBJECT_ADDED, METHOD_MODEL_OBJECT_REMOVED, METHOD_MODEL_OBJECTS_ADDED, METHOD_MODEL_OBJECTS_REMOVED, METHOD_PROPERTY_CHANGEDPROPERTY_NAME, PROPERTY_PROVIDERID, PROPERTY_SRID, PROPERTY_VISIBLE| Constructor and Description |
|---|
NFEManipulableFeatureLayerRenderer(MapCanvas canvas,
NFEModel model,
long featLayerId)
Allocates a new manipulable feature layer renderer
|
| Modifier and Type | Method and 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,
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
|
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,
JGeometrySegmentPoint snapPoint,
int transformation)
Starts a manipulation session.
|
clearSelection, createPreview, deleteSelection, getFeatureLayer, getModel, getSelectedFeatures, isShowFlow, modelObjectAdded, modelObjectPropertyChanged, modelObjectRemoved, modelObjectsAdded, modelObjectsRemoved, select, selectFeatures, setFeatureSelection, setSelection, setShowFlow, synchronizeWithModeladdContextualMenuHandler, addSelectionListener, clear, clearHover, getDataMBR, getFullExtent, getGeoObject, getHover, getImageOpacityAlpha, getObject, getObjects, getSelection, getSelection, getSnapPoint, getTolerance, handleEvent, hitTest, hitTest, isHover, isSelected, mapRegionChanged, numHovered, numSelected, refresh, refresh, removeContextualMenuHandler, removeSelectionListener, render, setHover, setImageOpacityAlpha, stateChanged, unselect, updateadded, addPropertyChangeListener, addPropertyChangeListener, fromXMLElement, getCanvas, getIcon, getName, getProperties, getProperty, getProperty, getPropertyChangeListeners, getPropertyChangeListeners, getProviderID, getSRID, isVisible, removed, removePropertyChangeListener, removePropertyChangeListener, repaint, setCanvas, setName, setProperty, setProviderID, setSRID, setVisible, toXMLElementequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitrefreshadded, fromXMLElement, getCanvas, getIcon, getName, getProviderID, getSRID, isVisible, removed, repaint, setCanvas, setName, setProviderID, setSRID, setVisible, toXMLElementpublic NFEManipulableFeatureLayerRenderer(MapCanvas canvas, NFEModel model, long featLayerId)
canvas - the MapCanvas where the layer will be renderedmodel - the feature layer's modelfeatLayerId - the feature layer IDpublic java.util.Collection<GeoObject> getManipulableGeoObjects()
ManipulableLayergetManipulableGeoObjects in interface ManipulableLayerpublic double[] getHandlePoints(GeoObject geoObj)
ManipulableLayergetHandlePoints in interface ManipulableLayergeoObj - a GeoObjectpublic JGeometrySegmentPoint getSnapPoint(GeoObject geoObj, java.awt.geom.Point2D dataPoint, double tolerance)
ManipulableLayergetSnapPoint in interface ManipulableLayergeoObj - a GeoObjecttolerance - a tolarence in model's coordinate systempublic int getApplicableTransformation(GeoObject geoObj, java.util.Collection<GeoObject> manGeoObjGroup, JGeometrySegmentPoint snapPoint)
ManipulableLayergetApplicableTransformation in interface ManipulableLayergeoObj - a GeoObjectmanGeoObjGroup - a collection containing more GeoObjects to be manipulated. It can be nullsnapPoint - a segment point relative to the GeoObject's geometrypublic long startManipulation(GeoObject geoObj, java.util.Collection<GeoObject> manGeoObjGroup, JGeometrySegmentPoint snapPoint, int transformation)
ManipulableLayerstartManipulation in interface ManipulableLayergeoObj - 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 performedpublic boolean finishManipulation(long manId,
java.awt.geom.Point2D dataPoint)
ManipulableLayerfinishManipulation in interface ManipulableLayermanId - the manipulation session iddataPoint - the last point for the manipulation in model's coordinate systempublic boolean manipulate(long manId,
java.awt.geom.Point2D dataPoint)
ManipulableLayermanipulate in interface ManipulableLayermanId - a manipulation session iddataPoint - the last user point (it may be a mouse point) in model's coordinate systempublic void cancelManipulation(long manId)
ManipulableLayercancelManipulation in interface ManipulableLayermanId - a manipulation session idpublic ManipulationPreview getPreview(long manId)
ManipulableLayergetPreview in interface ManipulableLayermanId - a manipulation session id