Class 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 Detail

      • scbar

        protected oracle.mapviewer.share.ScaleBar scbar
      • scbarRender

        protected oracle.sdovis.ScaleBarRenderer scbarRender
      • img

        protected java.awt.image.BufferedImage img
      • isReady

        protected boolean isReady
    • Constructor Detail

      • ScaleBarLayer

        public ScaleBarLayer​(MapCanvas parent)
    • Method Detail

      • 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 interface Layer
        Overrides:
        handleEvent in class BasicLayer
      • 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 interface Layer
        Overrides:
        render in class BasicLayer
        Parameters:
        g - the graphics object
        Returns:
        the rendering time in milliseconds.
      • setVisible

        public void setVisible​(boolean v)
        Description copied from interface: Layer
        Sets the visibility of this layer.
        Specified by:
        setVisible in interface Layer
        Overrides:
        setVisible in class BasicLayer
      • mapRegionChanged

        public void mapRegionChanged​(MapRegionEvent e)
        Description copied from interface: Layer
        When 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:
        mapRegionChanged in interface Layer
        Overrides:
        mapRegionChanged in class BasicLayer