Class ScaleBarLayer
- java.lang.Object
-
- oracle.spatial.network.nfe.vis.maps.layer.BasicLayer
-
- oracle.spatial.network.nfe.vis.maps.layer.ui.ScaleBarLayer
-
- All Implemented Interfaces:
Layer,PropertySupport
public class ScaleBarLayer extends BasicLayer
A background layer that sits at the bottom of layer stack, and intercepts primarily mouse wheel zooming and mouse panning events.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.awt.image.BufferedImageimgprotected booleanisReadyprotected oracle.mapviewer.share.ScaleBarscbarprotected oracle.sdovis.ScaleBarRendererscbarRender-
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 ScaleBarLayer(MapCanvas parent)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanhandleEvent(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.longrender(java.awt.Graphics2D g)Renders the layer contents to the given Graphics.voidsetVisible(boolean v)Sets the visibility of this layer.-
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, setCanvas, setMyCursor, setName, setProperty, setProviderID, setSRID, toXMLElement, update
-
-
-
-
Constructor Detail
-
ScaleBarLayer
public ScaleBarLayer(MapCanvas parent)
-
-
Method Detail
-
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.
-
setVisible
public void setVisible(boolean v)
Description copied from interface:LayerSets the visibility of this layer.- Specified by:
setVisiblein interfaceLayer- Overrides:
setVisiblein classBasicLayer
-
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
-
-