org.geotools.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
 Icon geometry(Color color, Color fill)
           
 Icon geometry(Rule rule)
           
 Icon grid(Color color1, Color color2, Color color3, Color color4)
           
 Icon icon(MapLayer layer)
          Glyph for the provided layer.
 Icon icon(SimpleFeatureType schema)
          Make a basic representation of the provided FeatureType.
 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 Point
fill - 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 colour
width - Line width
Returns:

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

geometry

Icon geometry(Color color,
              Color fill)

geometry

Icon geometry(Rule rule)

polygon

Icon polygon(Color color,
             Color fill,
             int width)

polygon

Icon polygon(Rule rule)

grid

Icon grid(Color color1,
          Color color2,
          Color color3,
          Color color4)

swatch

Icon swatch(Color color)

palette

Icon palette(Color[] colors)

icon

Icon icon(SimpleFeatureType schema)
Make a basic representation of the provided FeatureType.

Parameters:
schema -
Returns:

icon

Icon icon(MapLayer layer)
Glyph for the provided layer.

At a minimum the icon will be based on:

Parameters:
layer -
Returns:
Icon For the provided layer


Copyright © 1996-2014 Geotools. All Rights Reserved.