org.geotools.styling
Class StyleFactoryImpl

java.lang.Object
  extended by AbstractStyleFactory
      extended by org.geotools.styling.StyleFactoryImpl

public class StyleFactoryImpl
extends AbstractStyleFactory

Factory for creating Styles. All style elements are returned as Interfaces from org.geotools.core as opposed to Implementations from org.geotools.defaultcore.

Version:
$Id: StyleFactoryImpl.java 30556 2008-06-06 15:57:45Z aaime $
Author:
iant

Constructor Summary
  StyleFactoryImpl()
           
protected StyleFactoryImpl(FilterFactory factory)
           
 
Method Summary
 AnchorPoint createAnchorPoint(Expression x, Expression y)
           
 ChannelSelection createChannelSelection(SelectedChannelType[] channels)
           
 ColorMap createColorMap()
           
 ColorMapEntry createColorMapEntry()
           
 ContrastEnhancement createContrastEnhancement()
           
 ContrastEnhancement createContrastEnhancement(Expression gammaValue)
           
 Graphic createDefaultGraphic()
           
 Displacement createDisplacement(Expression x, Expression y)
           
 Extent createExtent(String name, String value)
           
 ExternalGraphic createExternalGraphic(String uri, String format)
           
 ExternalGraphic createExternalGraphic(URL url, String format)
           
 FeatureTypeConstraint createFeatureTypeConstraint(String featureTypeName, Filter filter, Extent[] extents)
           
 FeatureTypeStyle createFeatureTypeStyle()
           
 FeatureTypeStyle createFeatureTypeStyle(Rule[] rules)
           
 Fill createFill(Expression color)
           
 Fill createFill(Expression color, Expression opacity)
           
 Fill createFill(Expression color, Expression backgroundColor, Expression opacity, Graphic graphicFill)
           
 Font createFont(Expression fontFamily, Expression fontStyle, Expression fontWeight, Expression fontSize)
           
 Graphic createGraphic(ExternalGraphic[] externalGraphics, Mark[] marks, Symbol[] symbols, Expression opacity, Expression size, Expression rotation)
           
 Halo createHalo(Fill fill, Expression radius)
           
 ImageOutline createImageOutline(Symbolizer symbolizer)
           
 LayerFeatureConstraints createLayerFeatureConstraints(FeatureTypeConstraint[] featureTypeConstraints)
           
 LinePlacement createLinePlacement(Expression offset)
           
 LineSymbolizer createLineSymbolizer()
           
 LineSymbolizer createLineSymbolizer(Stroke stroke, String geometryPropertyName)
           
 Mark createMark()
           
 Mark createMark(Expression wellKnownName, Stroke stroke, Fill fill, Expression size, Expression rotation)
           
 NamedLayer createNamedLayer()
           
 NamedStyle createNamedStyle()
           
 PointPlacement createPointPlacement(AnchorPoint anchorPoint, Displacement displacement, Expression rotation)
           
 PointSymbolizer createPointSymbolizer()
           
 PointSymbolizer createPointSymbolizer(Graphic graphic, String geometryPropertyName)
           
 PolygonSymbolizer createPolygonSymbolizer()
           
 PolygonSymbolizer createPolygonSymbolizer(Stroke stroke, Fill fill, String geometryPropertyName)
           
 RasterSymbolizer createRasterSymbolizer()
           
 RasterSymbolizer createRasterSymbolizer(String geometryPropertyName, Expression opacity, ChannelSelection channel, Expression overlap, ColorMap colorMap, ContrastEnhancement cenhancement, ShadedRelief relief, Symbolizer outline)
           
 RemoteOWS createRemoteOWS(String service, String onlineResource)
           
 Rule createRule()
           
 SelectedChannelType createSelectedChannelType(String name, ContrastEnhancement enhancement)
           
 SelectedChannelType createSelectedChannelType(String name, Expression gammaValue)
           
 ShadedRelief createShadedRelief(Expression reliefFactor)
           
 Stroke createStroke(Expression color, Expression width)
          A convienice method to make a simple stroke
 Stroke createStroke(Expression color, Expression width, Expression opacity)
          A convienice method to make a simple stroke
 Stroke createStroke(Expression color, Expression width, Expression opacity, Expression lineJoin, Expression lineCap, float[] dashArray, Expression dashOffset, Graphic graphicFill, Graphic graphicStroke)
          creates a stroke
 Style createStyle()
           
 StyledLayerDescriptor createStyledLayerDescriptor()
           
 TextSymbolizer createTextSymbolizer()
           
 TextSymbolizer createTextSymbolizer(Fill fill, Font[] fonts, Halo halo, Expression label, LabelPlacement labelPlacement, String geometryPropertyName)
           
 TextSymbolizer2 createTextSymbolizer(Fill fill, Font[] fonts, Halo halo, Expression label, LabelPlacement labelPlacement, String geometryPropertyName, Graphic graphic)
           
 UserLayer createUserLayer()
           
 Mark getCircleMark()
           
 Mark getCrossMark()
           
 Fill getDefaultFill()
           
 Font getDefaultFont()
          Creates a defaultFont which is valid on all machines.
 Graphic getDefaultGraphic()
           
 LineSymbolizer getDefaultLineSymbolizer()
           
 Mark getDefaultMark()
           
 PointPlacement getDefaultPointPlacement()
          returns a default PointPlacement with a 0,0 anchorPoint and a displacement of 0,0 and a rotation of 0
 PointSymbolizer getDefaultPointSymbolizer()
           
 PolygonSymbolizer getDefaultPolygonSymbolizer()
           
 RasterSymbolizer getDefaultRasterSymbolizer()
           
 Stroke getDefaultStroke()
           
 Style getDefaultStyle()
           
 TextSymbolizer getDefaultTextSymbolizer()
          Creates a default Text Symbolizer, using the defaultFill, defaultFont and defaultPointPlacement, Sets the geometry attribute name to be geometry:text.
 Mark getSquareMark()
           
 Mark getStarMark()
           
 Mark getTriangleMark()
           
 Mark getXMark()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StyleFactoryImpl

public StyleFactoryImpl()

StyleFactoryImpl

protected StyleFactoryImpl(FilterFactory factory)
Method Detail

createStyle

public Style createStyle()

createNamedStyle

public NamedStyle createNamedStyle()

createPointSymbolizer

public PointSymbolizer createPointSymbolizer()

createPointSymbolizer

public PointSymbolizer createPointSymbolizer(Graphic graphic,
                                             String geometryPropertyName)

createPolygonSymbolizer

public PolygonSymbolizer createPolygonSymbolizer()

createPolygonSymbolizer

public PolygonSymbolizer createPolygonSymbolizer(Stroke stroke,
                                                 Fill fill,
                                                 String geometryPropertyName)

createLineSymbolizer

public LineSymbolizer createLineSymbolizer()

createLineSymbolizer

public LineSymbolizer createLineSymbolizer(Stroke stroke,
                                           String geometryPropertyName)

createTextSymbolizer

public TextSymbolizer createTextSymbolizer()

createTextSymbolizer

public TextSymbolizer createTextSymbolizer(Fill fill,
                                           Font[] fonts,
                                           Halo halo,
                                           Expression label,
                                           LabelPlacement labelPlacement,
                                           String geometryPropertyName)

createTextSymbolizer

public TextSymbolizer2 createTextSymbolizer(Fill fill,
                                            Font[] fonts,
                                            Halo halo,
                                            Expression label,
                                            LabelPlacement labelPlacement,
                                            String geometryPropertyName,
                                            Graphic graphic)

createExtent

public Extent createExtent(String name,
                           String value)

createFeatureTypeConstraint

public FeatureTypeConstraint createFeatureTypeConstraint(String featureTypeName,
                                                         Filter filter,
                                                         Extent[] extents)

createLayerFeatureConstraints

public LayerFeatureConstraints createLayerFeatureConstraints(FeatureTypeConstraint[] featureTypeConstraints)

createFeatureTypeStyle

public FeatureTypeStyle createFeatureTypeStyle()

createFeatureTypeStyle

public FeatureTypeStyle createFeatureTypeStyle(Rule[] rules)

createRule

public Rule createRule()

createImageOutline

public ImageOutline createImageOutline(Symbolizer symbolizer)

createStroke

public Stroke createStroke(Expression color,
                           Expression width)
A convienice method to make a simple stroke

Parameters:
color - the color of the line
width - the width of the line
Returns:
the stroke object
See Also:
org.geotools.stroke

createStroke

public Stroke createStroke(Expression color,
                           Expression width,
                           Expression opacity)
A convienice method to make a simple stroke

Parameters:
color - the color of the line
width - The width of the line
opacity - The opacity of the line
Returns:
The stroke
See Also:
org.geotools.stroke

createStroke

public Stroke createStroke(Expression color,
                           Expression width,
                           Expression opacity,
                           Expression lineJoin,
                           Expression lineCap,
                           float[] dashArray,
                           Expression dashOffset,
                           Graphic graphicFill,
                           Graphic graphicStroke)
creates a stroke

Parameters:
color - The color of the line
width - The width of the line
opacity - The opacity of the line
lineJoin - - the type of Line joint
lineCap - - the type of line cap
dashArray - - an array of floats describing the dashes in the line
dashOffset - - where in the dash array to start drawing from
graphicFill - - a graphic object to fill the line with
graphicStroke - - a graphic object to draw the line with
Returns:
The completed stroke.
Throws:
IllegalArgumentException - DOCUMENT ME!
See Also:
org.geotools.stroke

createFill

public Fill createFill(Expression color,
                       Expression backgroundColor,
                       Expression opacity,
                       Graphic graphicFill)

createFill

public Fill createFill(Expression color,
                       Expression opacity)

createFill

public Fill createFill(Expression color)

createMark

public Mark createMark(Expression wellKnownName,
                       Stroke stroke,
                       Fill fill,
                       Expression size,
                       Expression rotation)

getSquareMark

public Mark getSquareMark()

getCircleMark

public Mark getCircleMark()

getCrossMark

public Mark getCrossMark()

getXMark

public Mark getXMark()

getTriangleMark

public Mark getTriangleMark()

getStarMark

public Mark getStarMark()

createMark

public Mark createMark()

createGraphic

public Graphic createGraphic(ExternalGraphic[] externalGraphics,
                             Mark[] marks,
                             Symbol[] symbols,
                             Expression opacity,
                             Expression size,
                             Expression rotation)

createExternalGraphic

public ExternalGraphic createExternalGraphic(String uri,
                                             String format)

createExternalGraphic

public ExternalGraphic createExternalGraphic(URL url,
                                             String format)

createFont

public Font createFont(Expression fontFamily,
                       Expression fontStyle,
                       Expression fontWeight,
                       Expression fontSize)

createLinePlacement

public LinePlacement createLinePlacement(Expression offset)

createPointPlacement

public PointPlacement createPointPlacement(AnchorPoint anchorPoint,
                                           Displacement displacement,
                                           Expression rotation)

createAnchorPoint

public AnchorPoint createAnchorPoint(Expression x,
                                     Expression y)

createDisplacement

public Displacement createDisplacement(Expression x,
                                       Expression y)

createHalo

public Halo createHalo(Fill fill,
                       Expression radius)

getDefaultFill

public Fill getDefaultFill()

getDefaultLineSymbolizer

public LineSymbolizer getDefaultLineSymbolizer()

getDefaultMark

public Mark getDefaultMark()

getDefaultPointSymbolizer

public PointSymbolizer getDefaultPointSymbolizer()

getDefaultPolygonSymbolizer

public PolygonSymbolizer getDefaultPolygonSymbolizer()

getDefaultStroke

public Stroke getDefaultStroke()

getDefaultStyle

public Style getDefaultStyle()

getDefaultTextSymbolizer

public TextSymbolizer getDefaultTextSymbolizer()
Creates a default Text Symbolizer, using the defaultFill, defaultFont and defaultPointPlacement, Sets the geometry attribute name to be geometry:text. No Halo is set. The label is not set

Returns:
A default TextSymbolizer

getDefaultFont

public Font getDefaultFont()
Creates a defaultFont which is valid on all machines. The font is of size 10, Style and Weight normal and uses a serif font.

Returns:
the default Font
Throws:
RuntimeException - DOCUMENT ME!

createDefaultGraphic

public Graphic createDefaultGraphic()

getDefaultGraphic

public Graphic getDefaultGraphic()

getDefaultPointPlacement

public PointPlacement getDefaultPointPlacement()
returns a default PointPlacement with a 0,0 anchorPoint and a displacement of 0,0 and a rotation of 0

Returns:
a default PointPlacement.

createRasterSymbolizer

public RasterSymbolizer createRasterSymbolizer()

createRasterSymbolizer

public RasterSymbolizer createRasterSymbolizer(String geometryPropertyName,
                                               Expression opacity,
                                               ChannelSelection channel,
                                               Expression overlap,
                                               ColorMap colorMap,
                                               ContrastEnhancement cenhancement,
                                               ShadedRelief relief,
                                               Symbolizer outline)

getDefaultRasterSymbolizer

public RasterSymbolizer getDefaultRasterSymbolizer()

createChannelSelection

public ChannelSelection createChannelSelection(SelectedChannelType[] channels)

createColorMap

public ColorMap createColorMap()

createColorMapEntry

public ColorMapEntry createColorMapEntry()

createContrastEnhancement

public ContrastEnhancement createContrastEnhancement()

createContrastEnhancement

public ContrastEnhancement createContrastEnhancement(Expression gammaValue)

createSelectedChannelType

public SelectedChannelType createSelectedChannelType(String name,
                                                     ContrastEnhancement enhancement)

createSelectedChannelType

public SelectedChannelType createSelectedChannelType(String name,
                                                     Expression gammaValue)

createStyledLayerDescriptor

public StyledLayerDescriptor createStyledLayerDescriptor()

createUserLayer

public UserLayer createUserLayer()

createNamedLayer

public NamedLayer createNamedLayer()

createRemoteOWS

public RemoteOWS createRemoteOWS(String service,
                                 String onlineResource)

createShadedRelief

public ShadedRelief createShadedRelief(Expression reliefFactor)