org.geotools.renderer.event
Class FeatureModifier.Adapter

java.lang.Object
  extended byorg.geotools.renderer.event.FeatureModifier.Adapter
All Implemented Interfaces:
FeatureModifier
Enclosing class:
FeatureModifier

public static class FeatureModifier.Adapter
extends java.lang.Object
implements FeatureModifier

A base (identity) implementation of the FeatureModifier interface. Users should typically extend this to obtain the behaviour they want.

Version:
$Id: FeatureModifier.java 17672 2006-01-19 00:25:55Z desruisseaux $
Author:
Julian Elliott

Nested Class Summary
 
Nested classes inherited from class org.geotools.renderer.event.FeatureModifier
FeatureModifier.Adapter
 
Constructor Summary
FeatureModifier.Adapter()
          Default constructor.
 
Method Summary
 float getOpacity(float opacity, RenderingContext context)
          Returns a modified opacity (for graphic features)..
 java.awt.Paint getPaint(java.awt.Paint paint, RenderingContext context)
          Returns a modified paint object for a particular feature..
 java.awt.image.RenderedImage getRenderedImage(java.awt.image.RenderedImage image, RenderingContext context)
          Returns a modified rendered image (for graphic features)..
 float getRotation(float rotation, RenderingContext context)
          Returns a modified rotation (for mark, graphic and text features)..
 java.awt.Shape getShape(java.awt.Shape shape, RenderingContext context)
          Returns a modified shape object for a particular feature..
 int getSize(int size, RenderingContext context)
          Returns a modified size (for graphic features)..
 java.awt.Stroke getStroke(java.awt.Stroke stroke, RenderingContext context)
          Returns a modified awt stroke object for a particular feature..
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FeatureModifier.Adapter

public FeatureModifier.Adapter()
Default constructor.

Method Detail

getShape

public java.awt.Shape getShape(java.awt.Shape shape,
                               RenderingContext context)
Returns a modified shape object for a particular feature.. The default implementation returns the shape unchanged.

Specified by:
getShape in interface FeatureModifier
Parameters:
shape - The default Shape for the current feature.
context - The rendering context, which contains the current map scale.
Returns:
The Shape object to use for the current feature.

getPaint

public java.awt.Paint getPaint(java.awt.Paint paint,
                               RenderingContext context)
Returns a modified paint object for a particular feature.. The default implementation returns the paint unchanged.

Specified by:
getPaint in interface FeatureModifier
Parameters:
paint - The default Paint for the current feature.
context - The rendering context, which contains the current map scale.
Returns:
The Paint object to use for the current feature.

getStroke

public java.awt.Stroke getStroke(java.awt.Stroke stroke,
                                 RenderingContext context)
Returns a modified awt stroke object for a particular feature.. The default implementation returns the stroke unchanged.

Specified by:
getStroke in interface FeatureModifier
Parameters:
stroke - The default Stroke for the current feature.
context - The rendering context, which contains the current map scale.
Returns:
The new Stroke object to use for the current feature.

getRotation

public float getRotation(float rotation,
                         RenderingContext context)
Returns a modified rotation (for mark, graphic and text features).. The default implementation returns the rotation unchanged.

Specified by:
getRotation in interface FeatureModifier
Parameters:
rotation - The default rotation for the current feature.
context - The rendering context, which contains the current map scale.
Returns:
The rotation to use for the current feature.

getOpacity

public float getOpacity(float opacity,
                        RenderingContext context)
Returns a modified opacity (for graphic features).. The default implementation returns the opacity unchanged.

Specified by:
getOpacity in interface FeatureModifier
Parameters:
opacity - The default opacity for the current feature.
context - The rendering context, which contains the current map scale.
Returns:
The opacity to use for the current feature.

getSize

public int getSize(int size,
                   RenderingContext context)
Returns a modified size (for graphic features).. The default implementation returns the size unchanged.

Specified by:
getSize in interface FeatureModifier
Parameters:
size - The original size of graphic images
context - The rendering context, which contains the current map scale.
Returns:
The size of graphic images to use for the current feature.

getRenderedImage

public java.awt.image.RenderedImage getRenderedImage(java.awt.image.RenderedImage image,
                                                     RenderingContext context)
Returns a modified rendered image (for graphic features).. The default implementation returns the image unchanged.

Specified by:
getRenderedImage in interface FeatureModifier
Parameters:
image - The default rendered image for the current feature.
context - The rendering context, which contains the current map scale.
Returns:
Tthe rendered image to use for the current feature.


Copyright © GeoTools. All Rights Reserved.