org.geotools.renderer.j2d
Class StyledMapRenderer

java.lang.Object
  extended byorg.geotools.renderer.j2d.Renderer
      extended byorg.geotools.renderer.j2d.StyledMapRenderer
All Implemented Interfaces:
Renderer2D
Direct Known Subclasses:
StyledLiteRender

public class StyledMapRenderer
extends Renderer

A renderer for rendering . This renderer listen for and invokes RenderedLayer.repaint() automatically on changes.

Version:
$Id: StyledMapRenderer.java 17672 2006-01-19 00:25:55Z desruisseaux $
Author:
Martin Desruisseaux

Field Summary
 
Fields inherited from class org.geotools.renderer.j2d.Renderer
hints, listeners
 
Constructor Summary
StyledMapRenderer(java.awt.Component owner)
          Construct a new renderer for the specified component.
StyledMapRenderer(java.awt.Component owner, RenderedLayerFactory factory)
          Construct a new renderer using the specified factory.
 
Method Summary
protected  void addLayer(MapLayer layer)
          Add a layer to this renderer.
 void insertLayer(MapLayer layer, int position)
          Add a layer to this renderer.
 void removeAllLayers()
          Remove all layers from this renderer.
 void removeLayer(MapLayer layer)
          Remove a layer from this renderer.
 void setMapContext(MapContext mapContext)
          Set a new context as the current one.
 
Methods inherited from class org.geotools.renderer.j2d.Renderer
addLayer, addPropertyChangeListener, addPropertyChangeListener, dispose, getAction, getCoordinateSystem, getLayerCount, getLayers, getLocale, getName, getOffscreenBuffered, getPreferredArea, getPreferredPixelSize, getRenderingHint, getScale, getToolTipText, paint, paint, paint, removeLayer, removePropertyChangeListener, removePropertyChangeListener, setCoordinateSystem, setOffscreenBuffered, setRenderingHint, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StyledMapRenderer

public StyledMapRenderer(java.awt.Component owner)
Construct a new renderer for the specified component.

Parameters:
owner - The widget that own this renderer, or null if none.

StyledMapRenderer

public StyledMapRenderer(java.awt.Component owner,
                         RenderedLayerFactory factory)
Construct a new renderer using the specified factory.

Parameters:
owner - The widget that own this renderer, or null if none.
factory - DOCUMENT ME!
Method Detail

setMapContext

public void setMapContext(MapContext mapContext)
                   throws org.opengis.referencing.operation.TransformException,
                          java.io.IOException,
                          IllegalAttributeException
Set a new context as the current one. This method performs the following steps:

Parameters:
mapContext - The new context, ornull for removing any previous context.
Throws:
org.opengis.referencing.operation.TransformException - DOCUMENT ME!
java.io.IOException - DOCUMENT ME!
IllegalAttributeException - DOCUMENT ME!

addLayer

protected void addLayer(MapLayer layer)
                 throws org.opengis.referencing.operation.TransformException,
                        java.io.IOException,
                        IllegalAttributeException
Add a layer to this renderer. A single Layer may be converted into an arbitrary amount of RenderedLayers. Those rendered layers will have values as 4.0, 4.1, 4.2, etc. where 4 is the layer number, and .0, .1, .2... is the rendered layer number for this particular layer.

Parameters:
layer - The layer to add.
Throws:
org.opengis.referencing.operation.TransformException - if some feature in the layer use an incompatible coordinate system.
java.io.IOException - DOCUMENT ME!
IllegalAttributeException - DOCUMENT ME!
java.lang.AssertionError - DOCUMENT ME!

insertLayer

public void insertLayer(MapLayer layer,
                        int position)
                 throws org.opengis.referencing.operation.TransformException,
                        java.io.IOException,
                        IllegalAttributeException
Add a layer to this renderer. A single Layer may be converted into an arbitrary amount of RenderedLayers. Those rendered layers will have values as 4.0, 4.1, 4.2, etc. where 4 is the layer number, and .0, .1, .2... is the rendered layer number for this particular layer.

Parameters:
layer - The layer to add.
position - DOCUMENT ME!
Throws:
org.opengis.referencing.operation.TransformException - if some feature in the layer use an incompatible coordinate system.
java.io.IOException - DOCUMENT ME!
IllegalAttributeException - DOCUMENT ME!
java.lang.AssertionError - DOCUMENT ME!

removeLayer

public void removeLayer(MapLayer layer)
Remove a layer from this renderer. Nothing is done if the specified layer is null or not found in this renderer.

Parameters:
layer - The layer to remove.

removeAllLayers

public void removeAllLayers()
Remove all layers from this renderer.

Overrides:
removeAllLayers in class Renderer
See Also:
Renderer.addLayer(org.geotools.renderer.j2d.RenderedLayer), Renderer.removeLayer(org.geotools.renderer.j2d.RenderedLayer), Renderer.getLayers(), Renderer.getLayerCount()


Copyright © GeoTools. All Rights Reserved.