Class MapNavLayer
- java.lang.Object
-
- oracle.spatial.network.nfe.vis.maps.layer.BasicLayer
-
- oracle.spatial.network.nfe.vis.maps.layer.ui.MapNavLayer
-
- All Implemented Interfaces:
java.beans.PropertyChangeListener,java.util.EventListener,javax.swing.event.ChangeListener,Layer,ShapeDrawingLayer,PropertySupport
public class MapNavLayer extends BasicLayer implements ShapeDrawingLayer, javax.swing.event.ChangeListener, java.beans.PropertyChangeListener
MapNavLayer renders and handles the events for the Navigation Panel that includes a panning dial, zoom buttons, and if a tile layer is present, a zoom slider
-
-
Field Summary
Fields Modifier and Type Field Description static floatBKGND_ALPHAstatic floatBORDER_ALPHAstatic java.awt.ColorENABLED_BLUEstatic java.awt.ColorMOUSEOVER_BLUEstatic intPAN_DELTAstatic floatZOOMBOX_BKGND_ALPHAstatic floatZOOMBOX_BORDER_ALPHA-
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 MapNavLayer(MapCanvas parent)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleangetSliderEnabled()java.awt.geom.Point2DgetSnapPoint(java.awt.geom.Point2D point)Gets the shape snap point closest to the given pointbooleanhandleEvent(java.util.EventObject evt)The main method that performs event handling for this tool.voidmapRegionChanged(MapRegionEvent e)When the associated canvas's map region is changed, this method is called to notify the layer of the change.voidpropertyChange(java.beans.PropertyChangeEvent evt)longrender(java.awt.Graphics2D g)Renders the layer contents to the given Graphics.voidsetCanvas(MapCanvas canvas)Sets the map canvas on which this layer is displayed.voidsetNumTicks(int numTicks)voidsetShape(java.awt.Shape zoomBox)Sets the shape to be drawnvoidsetSliderEnabled(boolean enabled)voidshapeCompleted(java.awt.event.MouseEvent e)To be called when the shape is completely drawnvoidstateChanged(javax.swing.event.ChangeEvent evt)-
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, propagateEvent, removed, removePropertyChangeListener, removePropertyChangeListener, repaint, setMyCursor, setName, setProperty, setProviderID, setSRID, setVisible, toXMLElement, update
-
-
-
-
Field Detail
-
BORDER_ALPHA
public static final float BORDER_ALPHA
- See Also:
- Constant Field Values
-
BKGND_ALPHA
public static final float BKGND_ALPHA
- See Also:
- Constant Field Values
-
ZOOMBOX_BORDER_ALPHA
public static final float ZOOMBOX_BORDER_ALPHA
- See Also:
- Constant Field Values
-
ZOOMBOX_BKGND_ALPHA
public static final float ZOOMBOX_BKGND_ALPHA
- See Also:
- Constant Field Values
-
ENABLED_BLUE
public static final java.awt.Color ENABLED_BLUE
-
MOUSEOVER_BLUE
public static final java.awt.Color MOUSEOVER_BLUE
-
PAN_DELTA
public static final int PAN_DELTA
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
MapNavLayer
public MapNavLayer(MapCanvas parent)
-
-
Method Detail
-
setCanvas
public void setCanvas(MapCanvas canvas)
Description copied from interface:LayerSets the map canvas on which this layer is displayed.- Specified by:
setCanvasin interfaceLayer- Overrides:
setCanvasin classBasicLayer
-
propertyChange
public void propertyChange(java.beans.PropertyChangeEvent evt)
- Specified by:
propertyChangein interfacejava.beans.PropertyChangeListener
-
stateChanged
public void stateChanged(javax.swing.event.ChangeEvent evt)
- Specified by:
stateChangedin interfacejavax.swing.event.ChangeListener
-
mapRegionChanged
public void mapRegionChanged(MapRegionEvent e)
Description copied from interface:LayerWhen the associated canvas's map region is changed, this method is called to notify the layer of the change. Note that either a device window change (as a result of resizing the application window) or a data window change can cause this method to be invoked. Query the canvas' MapRegion object to get the changed values. Inside a mapRegionChanged() implementation, the layer typically needs to update its data contents accordingly.- Specified by:
mapRegionChangedin interfaceLayer- Overrides:
mapRegionChangedin classBasicLayer
-
handleEvent
public boolean handleEvent(java.util.EventObject evt)
Description copied from interface:LayerThe 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:
handleEventin interfaceLayer- Overrides:
handleEventin classBasicLayer
-
render
public long render(java.awt.Graphics2D g)
Description copied from interface:LayerRenders the layer contents to the given Graphics.- Specified by:
renderin interfaceLayer- Overrides:
renderin classBasicLayer- Parameters:
g- the graphics object- Returns:
- the rendering time in milliseconds.
-
setShape
public void setShape(java.awt.Shape zoomBox)
Description copied from interface:ShapeDrawingLayerSets the shape to be drawn- Specified by:
setShapein interfaceShapeDrawingLayer
-
shapeCompleted
public void shapeCompleted(java.awt.event.MouseEvent e)
Description copied from interface:ShapeDrawingLayerTo be called when the shape is completely drawn- Specified by:
shapeCompletedin interfaceShapeDrawingLayer
-
getSnapPoint
public java.awt.geom.Point2D getSnapPoint(java.awt.geom.Point2D point)
Description copied from interface:ShapeDrawingLayerGets the shape snap point closest to the given point- Specified by:
getSnapPointin interfaceShapeDrawingLayer- Returns:
-
setSliderEnabled
public void setSliderEnabled(boolean enabled)
-
getSliderEnabled
public boolean getSliderEnabled()
-
setNumTicks
public void setNumTicks(int numTicks)
-
-