Class NFEEditVertexTool
- java.lang.Object
-
- oracle.spatial.network.nfe.vis.maps.layer.BasicLayer
-
- oracle.spatial.network.nfe.vis.maps.tools.BasicTool
-
- oracle.spatial.network.nfe.vis.mapcanvas.tool.NFETool
-
- oracle.spatial.network.nfe.vis.mapcanvas.tool.NFEEditVertexTool
-
- All Implemented Interfaces:
Layer
,Tool
,PropertySupport
public class NFEEditVertexTool extends NFETool
Tool used to add new vertices to line GeoObjects
-
-
Field Summary
-
Fields inherited from class oracle.spatial.network.nfe.vis.mapcanvas.tool.NFETool
invalidStateCursor, readyStateCursor
-
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
-
-
Constructor Summary
Constructors Constructor Description NFEEditVertexTool(MapCanvas canvas, NFEModel model, NFESelectionTool selectionTool)
Allocates a new edit vertex tool
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
drawSnapPoint(java.awt.Graphics2D g, oracle.sdovis.edit.util.JGeometrySegmentPoint snapPoint)
protected void
drawVertices(java.awt.Graphics2D g, double[] vertices)
GeoObject
getTargetGeoObj()
Gets the GeoObject to be modifiedboolean
handleEvent(java.util.EventObject evt)
The main method that performs event handling for this tool.protected boolean
mouseClicked(java.awt.event.MouseEvent evt)
Called when a mouse clicked event is registeredprotected boolean
mouseMoved(java.awt.event.MouseEvent evt)
Called when a mouse moved event is registeredlong
render(java.awt.Graphics2D g)
Renders the layer contents to the given Graphics.-
Methods inherited from class oracle.spatial.network.nfe.vis.mapcanvas.tool.NFETool
getModel, getTolerance, isAllowedScreenPoint, isEnabled, keyPressed, keyReleased, mouseDragged, mouseExited, mousePressed, mouseReleased, setEnabled, toDataCRS, toScreenCRS
-
Methods inherited from class oracle.spatial.network.nfe.vis.maps.tools.BasicTool
isInAction
-
Methods inherited from class oracle.spatial.network.nfe.vis.maps.layer.BasicLayer
added, addPropertyChangeListener, addPropertyChangeListener, clear, fromXMLElement, getCanvas, getDataMBR, getFullExtent, getIcon, getName, getProperties, getProperty, getProperty, getPropertyChangeListeners, getPropertyChangeListeners, getProviderID, getSRID, handleTheEvent, hitTest, hitTest, isMyEvent, isVisible, mapRegionChanged, propagateEvent, removed, removePropertyChangeListener, removePropertyChangeListener, repaint, setCanvas, setMyCursor, setName, setProperty, setProviderID, setSRID, setVisible, toXMLElement, update
-
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.maps.core.Layer
added, clear, fromXMLElement, getCanvas, getDataMBR, getFullExtent, getIcon, getName, getProviderID, getSRID, hitTest, hitTest, isVisible, mapRegionChanged, removed, repaint, setCanvas, setName, setProviderID, setSRID, setVisible, toXMLElement, update
-
Methods inherited from interface oracle.spatial.network.nfe.vis.maps.util.PropertySupport
addPropertyChangeListener, addPropertyChangeListener, getProperties, getProperty, getProperty, getPropertyChangeListeners, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener, setProperty
-
-
-
-
Constructor Detail
-
NFEEditVertexTool
public NFEEditVertexTool(MapCanvas canvas, NFEModel model, NFESelectionTool selectionTool)
Allocates a new edit vertex tool- Parameters:
canvas
- the current MapCanvasmodel
- the current NFE modelselectionTool
- an underlying selection tool used for selecting lines to be altered by the tool
-
-
Method Detail
-
getTargetGeoObj
public GeoObject getTargetGeoObj()
Gets the GeoObject to be modified- Returns:
-
handleEvent
public boolean handleEvent(java.util.EventObject evt)
Description copied from interface:Layer
The main method that performs event handling for this tool. Returns whether the event should be propagated to other layers down stream (further down the layer stack) after the event has been handled.- Specified by:
handleEvent
in interfaceLayer
- Overrides:
handleEvent
in classNFETool
-
mouseMoved
protected boolean mouseMoved(java.awt.event.MouseEvent evt)
Description copied from class:NFETool
Called when a mouse moved event is registered- Overrides:
mouseMoved
in classNFETool
- Parameters:
evt
- a mouse event event- Returns:
- true if the event should be propagated
-
mouseClicked
protected boolean mouseClicked(java.awt.event.MouseEvent evt)
Description copied from class:NFETool
Called when a mouse clicked event is registered- Overrides:
mouseClicked
in classNFETool
- Parameters:
evt
- a mouse event- Returns:
- true if the event should be propagated
-
render
public long render(java.awt.Graphics2D g)
Description copied from interface:Layer
Renders the layer contents to the given Graphics.- Specified by:
render
in interfaceLayer
- Overrides:
render
in classBasicLayer
- Parameters:
g
- the graphics object- Returns:
- the rendering time in milliseconds.
-
drawVertices
protected void drawVertices(java.awt.Graphics2D g, double[] vertices)
-
drawSnapPoint
protected void drawSnapPoint(java.awt.Graphics2D g, oracle.sdovis.edit.util.JGeometrySegmentPoint snapPoint)
-
-