Package org.geotools.map.legend
Interface GlyphFactory
-
- All Known Implementing Classes:
DefaultGlyphFactory
public interface GlyphFactory
Used to draw the little pictures that appear in a Legend.We are making this an interface so that applications can implement their own icons as needed.
- Author:
- Jody Garnett
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Icon
geometry(Color color, Color fill)
Icon
geometry(Rule rule)
Icon
grid(Color color1, Color color2, Color color3, Color color4)
Icon
icon(SimpleFeatureType schema)
Make a basic representation of the provided FeatureType.Icon
icon(Layer layer)
Glyph for the provided layer.Icon
line(Color line, int width)
Produces a simple Icon representing a line.Icon
line(Rule rule)
Produce a simple Icon representing a point.Icon
palette(Color[] colors)
Icon
point(Color point, Color fill)
Produce a simple Icon representing a point.Icon
point(Rule rule)
Produce a simple Icon representing a point.Icon
polygon(Color color, Color fill, int width)
Icon
polygon(Rule rule)
Icon
swatch(Color color)
-
-
-
Method Detail
-
point
Icon point(Color point, Color fill)
Produce a simple Icon representing a point.- Parameters:
point
- Color of the Pointfill
- Color inside the Point- Returns:
- Icon representing a Point
-
point
Icon point(Rule rule)
Produce a simple Icon representing a point.At a minimum this code is the same as:
PointSymbolizer symbolizer = SLD.pointSymbolizer( rule ); return glyphFactory.point( SLD.pointColor( symbolizer ), SLD.fillColor( symbolizer ) );
Implementations have the option of going into greater detail, picking up on TextSymbolizers and so on.
- Parameters:
rule
- Rule used to render a Point- Returns:
- Icon representing a Point
-
line
Icon line(Color line, int width)
Produces a simple Icon representing a line.- Parameters:
line
- Line colourwidth
- Line width
-
line
Icon line(Rule rule)
Produce a simple Icon representing a point.At a minimum this code is the same as:
LineSymbolizer symbolizer = SLD.lineSymbolizer( rule ); return glyphFactory.point( SLD.lineColor( symbolizer ), SLD.lineWidth( symbolizer ) );
Implementations have the option of going into greater detail, picking up on TextSymbolizers and so on.
- Parameters:
rule
- Rule used to render a Point- Returns:
- Icon representing a Point
-
icon
Icon icon(SimpleFeatureType schema)
Make a basic representation of the provided FeatureType.
-
-