org.geotools.legend
Class DefaultGlyphFactory

Object
  extended by DefaultGlyphFactory
All Implemented Interfaces:
GlyphFactory

public class DefaultGlyphFactory
extends Object
implements GlyphFactory


Constructor Summary
DefaultGlyphFactory()
           
 
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)
           
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultGlyphFactory

public DefaultGlyphFactory()
Method Detail

icon

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

At a minimum the icon will be based on:

Specified by:
icon in interface GlyphFactory
Parameters:
layer -
Returns:
Icon For the provided layer

polygon

public Icon polygon(Rule rule)
Specified by:
polygon in interface GlyphFactory

geometry

public Icon geometry(Color color,
                     Color fill)
Specified by:
geometry in interface GlyphFactory

geometry

public Icon geometry(Rule rule)
Specified by:
geometry in interface GlyphFactory

grid

public Icon grid(Color color1,
                 Color color2,
                 Color color3,
                 Color color4)
Specified by:
grid in interface GlyphFactory

icon

public Icon icon(SimpleFeatureType schema)
Description copied from interface: GlyphFactory
Make a basic representation of the provided FeatureType.

Specified by:
icon in interface GlyphFactory
Returns:

line

public Icon line(Color line,
                 int width)
Description copied from interface: GlyphFactory
Produces a simple Icon representing a line.

Specified by:
line in interface GlyphFactory
Parameters:
line - Line colour
width - Line width
Returns:

line

public Icon line(Rule rule)
Description copied from interface: GlyphFactory
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.

Specified by:
line in interface GlyphFactory
Parameters:
rule - Rule used to render a Point
Returns:
Icon representing a Point

palette

public Icon palette(Color[] colors)
Specified by:
palette in interface GlyphFactory

point

public Icon point(Color point,
                  Color fill)
Description copied from interface: GlyphFactory
Produce a simple Icon representing a point.

Specified by:
point in interface GlyphFactory
Parameters:
point - Color of the Point
fill - Color inside the Point
Returns:
Icon representing a Point

point

public Icon point(Rule rule)
Description copied from interface: GlyphFactory
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.

Specified by:
point in interface GlyphFactory
Parameters:
rule - Rule used to render a Point
Returns:
Icon representing a Point

polygon

public Icon polygon(Color color,
                    Color fill,
                    int width)
Specified by:
polygon in interface GlyphFactory

swatch

public Icon swatch(Color color)
Specified by:
swatch in interface GlyphFactory


Copyright © 1996-2014 Geotools. All Rights Reserved.