org.geotools.legend
Class DefaultGlyphFactory

java.lang.Object
  extended by org.geotools.legend.DefaultGlyphFactory
All Implemented Interfaces:
GlyphFactory

public class DefaultGlyphFactory
extends java.lang.Object
implements GlyphFactory


Constructor Summary
DefaultGlyphFactory()
           
 
Method Summary
 javax.swing.Icon geometry(java.awt.Color color, java.awt.Color fill)
           
 javax.swing.Icon geometry(Rule rule)
           
 javax.swing.Icon grid(java.awt.Color color1, java.awt.Color color2, java.awt.Color color3, java.awt.Color color4)
           
 javax.swing.Icon icon(MapLayer layer)
          Glyph for the provided layer.
 javax.swing.Icon icon(org.opengis.feature.simple.SimpleFeatureType schema)
          Make a basic representation of the provided FeatureType.
 javax.swing.Icon line(java.awt.Color line, int width)
          Produces a simple Icon representing a line.
 javax.swing.Icon line(Rule rule)
          Produce a simple Icon representing a point.
 javax.swing.Icon palette(java.awt.Color[] colors)
           
 javax.swing.Icon point(java.awt.Color point, java.awt.Color fill)
          Produce a simple Icon representing a point.
 javax.swing.Icon point(Rule rule)
          Produce a simple Icon representing a point.
 javax.swing.Icon polygon(java.awt.Color color, java.awt.Color fill, int width)
           
 javax.swing.Icon polygon(Rule rule)
           
 javax.swing.Icon swatch(java.awt.Color color)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultGlyphFactory

public DefaultGlyphFactory()
Method Detail

icon

public javax.swing.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 javax.swing.Icon polygon(Rule rule)
Specified by:
polygon in interface GlyphFactory

geometry

public javax.swing.Icon geometry(java.awt.Color color,
                                 java.awt.Color fill)
Specified by:
geometry in interface GlyphFactory

geometry

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

grid

public javax.swing.Icon grid(java.awt.Color color1,
                             java.awt.Color color2,
                             java.awt.Color color3,
                             java.awt.Color color4)
Specified by:
grid in interface GlyphFactory

icon

public javax.swing.Icon icon(org.opengis.feature.simple.SimpleFeatureType schema)
Description copied from interface: GlyphFactory
Make a basic representation of the provided FeatureType.

Specified by:
icon in interface GlyphFactory
Returns:

line

public javax.swing.Icon line(java.awt.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 javax.swing.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 javax.swing.Icon palette(java.awt.Color[] colors)
Specified by:
palette in interface GlyphFactory

point

public javax.swing.Icon point(java.awt.Color point,
                              java.awt.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 javax.swing.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 javax.swing.Icon polygon(java.awt.Color color,
                                java.awt.Color fill,
                                int width)
Specified by:
polygon in interface GlyphFactory

swatch

public javax.swing.Icon swatch(java.awt.Color color)
Specified by:
swatch in interface GlyphFactory


Copyright © 1996-2010 Geotools. All Rights Reserved.