Class NFEManipulableFeatureLayerRenderer
- java.lang.Object
-
- oracle.spatial.network.nfe.vis.maps.layer.BasicLayer
-
- oracle.spatial.network.nfe.vis.mapcanvas.render.NFERenderer<NFEFeatureElementGeoObject>
-
- oracle.spatial.network.nfe.vis.mapcanvas.render.NFEFeatureLayerRenderer
-
- oracle.spatial.network.nfe.vis.mapcanvas.render.NFEManipulableFeatureLayerRenderer
-
- All Implemented Interfaces:
java.util.EventListener
,javax.swing.event.ChangeListener
,NFEModelListener
,BehavioralLayer
,FeatureSelectableLayer
,ManipulableLayer
,SelectionEditableLayer
,GeoObjectLayer
,HoverableLayer
,Layer
,SelectableLayer
,PropertySupport
public class NFEManipulableFeatureLayerRenderer extends NFEFeatureLayerRenderer implements ManipulableLayer
A manipulable feature layer renderer.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class oracle.spatial.network.nfe.vis.mapcanvas.render.NFERenderer
NFERenderer.Tier, NFERenderer.TierRenderingThread
-
-
Field Summary
-
Fields inherited from class oracle.spatial.network.nfe.vis.mapcanvas.render.NFERenderer
animatedStroke, boundaryColor, contextualMenuHandlerList, editable, geoObjects, hoverBorderColor, hoverColor, hoverManager, hoverStroke, imageOpacityAlpha, lastDataWindow, lastViewportTransform, nontargetAnimatedStroke, refreshRegionQueue, selectionManager, simpleStroke, textDefaultColor, textDefaultFont, tiers
-
Fields inherited from class oracle.spatial.network.nfe.vis.maps.layer.BasicLayer
canvas, properties
-
Fields inherited from interface oracle.spatial.network.nfe.vis.maps.core.Layer
PROPERTY_NAME, PROPERTY_PROVIDERID, PROPERTY_SRID, PROPERTY_VISIBLE
-
Fields inherited from interface oracle.spatial.network.nfe.vis.mapcanvas.behavior.manipulate.ManipulableLayer
TRANS_NONE, TRANS_PULL, TRANS_TRANSLATE
-
Fields inherited from interface oracle.spatial.network.nfe.model.event.NFEModelListener
METHOD_MODEL_OBJECT_ADDED, METHOD_MODEL_OBJECT_REMOVED, METHOD_MODEL_OBJECTS_ADDED, METHOD_MODEL_OBJECTS_REMOVED, METHOD_PROPERTY_CHANGED
-
-
Constructor Summary
Constructors Constructor Description NFEManipulableFeatureLayerRenderer(MapCanvas canvas, NFEModel model, long featLayerId)
Allocates a new manipulable feature layer renderer
-
Method Summary
All Methods Instance Methods Concrete 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 class oracle.spatial.network.nfe.vis.mapcanvas.render.NFEFeatureLayerRenderer
belongsToTier, clearSelection, createPreview, deleteSelection, getFeatureLayer, getGeoObjects, getGeoObjects, getGeoObjects, getGeoObjectStyle, getModel, getSelectedFeatures, isShowFlow, isVisible, modelObjectAdded, modelObjectPropertyChanged, modelObjectRemoved, modelObjectsAdded, modelObjectsRemoved, select, selectFeatures, setFeatureSelection, setSelection, setShowFlow, synchronizeWithModel
-
Methods inherited from class oracle.spatial.network.nfe.vis.mapcanvas.render.NFERenderer
addContextualMenuHandler, addSelectionListener, clear, clearHover, containsTag, containsTag, findTier, getDataMBR, getFullExtent, getGeoObject, getHover, getImageOpacityAlpha, getObject, getObjects, getScreenTolerance, getSelection, getSelection, getSnapPoint, getTolerance, handleEvent, hitTest, hitTest, isHover, isSelected, mapRegionChanged, numHovered, numSelected, refresh, refresh, refreshAsync, refreshAsync, removeContextualMenuHandler, removeSelectionListener, render, renderGeoObject, renderGeoObject, renderGeoObjects, renderGeoObjLabel, renderHoveredObject, renderHoveredObjects, renderHoveredPoint, renderHoveredShape, renderSelectedObjects, renderTier, renderTiers, setHover, setImageOpacityAlpha, sortTiers, stateChanged, unselect, update
-
Methods inherited from class oracle.spatial.network.nfe.vis.maps.layer.BasicLayer
added, addPropertyChangeListener, addPropertyChangeListener, fromXMLElement, getCanvas, getIcon, getName, getProperties, getProperty, getProperty, getPropertyChangeListeners, getPropertyChangeListeners, getProviderID, getSRID, handleTheEvent, isMyEvent, isVisible, propagateEvent, removed, removePropertyChangeListener, removePropertyChangeListener, repaint, setCanvas, setMyCursor, setName, setProperty, setProviderID, setSRID, setVisible, toXMLElement
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface oracle.spatial.network.nfe.vis.mapcanvas.behavior.BehavioralLayer
refresh
-
Methods inherited from interface oracle.spatial.network.nfe.vis.maps.core.Layer
added, fromXMLElement, getCanvas, getIcon, getName, getProviderID, getSRID, isVisible, removed, repaint, setCanvas, setName, setProviderID, setSRID, setVisible, toXMLElement
-
Methods inherited from interface oracle.spatial.network.nfe.vis.maps.util.PropertySupport
addPropertyChangeListener, addPropertyChangeListener, getProperties, getProperty, getProperty, getPropertyChangeListeners, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener, setProperty
-
-
-
-
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 renderedmodel
- the feature layer's modelfeatLayerId
- the feature layer ID
-
-
Method Detail
-
getManipulableGeoObjects
public java.util.Collection<GeoObject> getManipulableGeoObjects()
Description copied from interface:ManipulableLayer
Gets the layer's GeoObjects that can be manipulated- Specified by:
getManipulableGeoObjects
in interfaceManipulableLayer
- Returns:
- a collection of GeoObjects
-
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 interfaceManipulableLayer
- 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 interfaceManipulableLayer
- Parameters:
geoObj
- a GeoObjecttolerance
- 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 interfaceManipulableLayer
- 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
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 interfaceManipulableLayer
- 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
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 interfaceManipulableLayer
- 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
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 interfaceManipulableLayer
- 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
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 interfaceManipulableLayer
- Parameters:
manId
- a manipulation session id
-
getPreview
public ManipulationPreview getPreview(long manId)
Description copied from interface:ManipulableLayer
Gets a preview for a manipulation- Specified by:
getPreview
in interfaceManipulableLayer
- Parameters:
manId
- a manipulation session id- Returns:
- a manipulation preview object
-
-