|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
Defines methods for modifying the appearance of features on the map (for example when
highlighting). Users should typically create instances of this class by extending
FeatureModifier.Adapter and overriding the required methods. As an example, the
following code creates a FeatureModifier that will render map features
in blue:
new FeatureModifier.Adapter() {
public Paint getPaint(Paint paint, RenderingContext context) {
return Color.BLUE;
}
}
The interface currently deals with all fields contained in
LineStyle2D,
PolygonStyle2D,
MarkStyle2D and
GraphicStyle2D.
| Nested Class Summary | |
static class |
FeatureModifier.Adapter
A base (identity) implementation of the FeatureModifier interface.
|
| 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. |
| Method Detail |
public java.awt.Shape getShape(java.awt.Shape shape,
RenderingContext context)
shape - The default Shape for the current feature.context - The rendering context, which contains the current map scale.
Shape object to use for the current feature.
public java.awt.Paint getPaint(java.awt.Paint paint,
RenderingContext context)
paint - The default Paint for the current feature.context - The rendering context, which contains the current map scale.
Paint object to use for the current feature.
public java.awt.Stroke getStroke(java.awt.Stroke stroke,
RenderingContext context)
stroke - The default Stroke for the current feature.context - The rendering context, which contains the current map scale.
Stroke object to use for the current feature.
public float getRotation(float rotation,
RenderingContext context)
rotation - The default rotation for the current feature.context - The rendering context, which contains the current map scale.
public float getOpacity(float opacity,
RenderingContext context)
opacity - The default opacity for the current feature.context - The rendering context, which contains the current map scale.
public int getSize(int size,
RenderingContext context)
size - The original size of graphic imagescontext - The rendering context, which contains the current map scale.
public java.awt.image.RenderedImage getRenderedImage(java.awt.image.RenderedImage image,
RenderingContext context)
image - The default rendered image for the current feature.context - The rendering context, which contains the current map scale.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||