org.geotools.styling
Class StyleFactoryImpl

java.lang.Object
  extended byorg.geotools.styling.StyleFactory
      extended byorg.geotools.styling.StyleFactoryImpl
All Implemented Interfaces:
Factory

public class StyleFactoryImpl
extends StyleFactory

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,v 1.15 2004/03/01 15:41:59 aaime Exp $
Author:
iant

Constructor Summary
StyleFactoryImpl()
           
 
Method Summary
 AnchorPoint createAnchorPoint(Expression x, Expression y)
           
 ChannelSelection createChannelSelection(SelectedChannelType[] channels)
           
 ColorMap createColorMap()
           
 ColorMapEntry createColorMapEntry()
           
 Displacement createDisplacement(Expression x, Expression y)
           
 ExternalGraphic createExternalGraphic(java.lang.String uri, java.lang.String format)
           
 ExternalGraphic createExternalGraphic(java.net.URL url, java.lang.String format)
           
 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)
           
 LinePlacement createLinePlacement(Expression offset)
           
 LineSymbolizer createLineSymbolizer()
           
 LineSymbolizer createLineSymbolizer(Stroke stroke, java.lang.String geometryPropertyName)
           
 Mark createMark()
           
 Mark createMark(Expression wellKnownName, Stroke stroke, Fill fill, Expression size, Expression rotation)
           
 NamedStyle createNamedStyle()
           
 PointPlacement createPointPlacement(AnchorPoint anchorPoint, Displacement displacement, Expression rotation)
           
 PointSymbolizer createPointSymbolizer()
           
 PointSymbolizer createPointSymbolizer(Graphic graphic, java.lang.String geometryPropertyName)
           
 PolygonSymbolizer createPolygonSymbolizer()
           
 PolygonSymbolizer createPolygonSymbolizer(Stroke stroke, Fill fill, java.lang.String geometryPropertyName)
           
 RasterSymbolizer createRasterSymbolizer(java.lang.String geometryPropertyName, Expression opacity, ChannelSelection channel, Expression overlap, ColorMap colorMap, ContrastEnhancement cenhancement, ShadedRelief relief, Symbolizer outline)
           
 Rule createRule()
           
 SelectedChannelType createSelectedChannelType(java.lang.String name, Expression enhancement)
           
 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()
           
 TextSymbolizer createTextSymbolizer()
           
 TextSymbolizer createTextSymbolizer(Fill fill, Font[] fonts, Halo halo, Expression label, LabelPlacement labelPlacement, java.lang.String geometryPropertyName)
           
 Mark getCircleMark()
          Convinence method for obtaining a mark of a fixed shape
 Mark getCrossMark()
          Convinence method for obtaining a mark of a fixed shape
 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()
          Convinence method for obtaining a mark of a fixed shape
 Mark getStarMark()
          Convinence method for obtaining a mark of a fixed shape
 Mark getTriangleMark()
          Convinence method for obtaining a mark of a fixed shape
 Mark getXMark()
          Convinence method for obtaining a mark of a fixed shape
 
Methods inherited from class org.geotools.styling.StyleFactory
createStyleFactory, getImplementationHints
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StyleFactoryImpl

public StyleFactoryImpl()
Method Detail

createStyle

public Style createStyle()
Specified by:
createStyle in class StyleFactory

createNamedStyle

public NamedStyle createNamedStyle()
Specified by:
createNamedStyle in class StyleFactory

createPointSymbolizer

public PointSymbolizer createPointSymbolizer()
Specified by:
createPointSymbolizer in class StyleFactory

createPointSymbolizer

public PointSymbolizer createPointSymbolizer(Graphic graphic,
                                             java.lang.String geometryPropertyName)
Specified by:
createPointSymbolizer in class StyleFactory

createPolygonSymbolizer

public PolygonSymbolizer createPolygonSymbolizer()
Specified by:
createPolygonSymbolizer in class StyleFactory

createPolygonSymbolizer

public PolygonSymbolizer createPolygonSymbolizer(Stroke stroke,
                                                 Fill fill,
                                                 java.lang.String geometryPropertyName)
Specified by:
createPolygonSymbolizer in class StyleFactory

createLineSymbolizer

public LineSymbolizer createLineSymbolizer()
Specified by:
createLineSymbolizer in class StyleFactory

createLineSymbolizer

public LineSymbolizer createLineSymbolizer(Stroke stroke,
                                           java.lang.String geometryPropertyName)
Specified by:
createLineSymbolizer in class StyleFactory

createTextSymbolizer

public TextSymbolizer createTextSymbolizer()
Specified by:
createTextSymbolizer in class StyleFactory

createTextSymbolizer

public TextSymbolizer createTextSymbolizer(Fill fill,
                                           Font[] fonts,
                                           Halo halo,
                                           Expression label,
                                           LabelPlacement labelPlacement,
                                           java.lang.String geometryPropertyName)
Specified by:
createTextSymbolizer in class StyleFactory

createFeatureTypeStyle

public FeatureTypeStyle createFeatureTypeStyle()
Specified by:
createFeatureTypeStyle in class StyleFactory

createFeatureTypeStyle

public FeatureTypeStyle createFeatureTypeStyle(Rule[] rules)
Specified by:
createFeatureTypeStyle in class StyleFactory

createRule

public Rule createRule()
Specified by:
createRule in class StyleFactory

createStroke

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

Specified by:
createStroke in class StyleFactory
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

Specified by:
createStroke in class StyleFactory
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

Specified by:
createStroke in class StyleFactory
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:
java.lang.IllegalArgumentException - DOCUMENT ME!
See Also:
org.geotools.stroke

createFill

public Fill createFill(Expression color,
                       Expression backgroundColor,
                       Expression opacity,
                       Graphic graphicFill)
Specified by:
createFill in class StyleFactory

createFill

public Fill createFill(Expression color,
                       Expression opacity)
Specified by:
createFill in class StyleFactory

createFill

public Fill createFill(Expression color)
Specified by:
createFill in class StyleFactory

createMark

public Mark createMark(Expression wellKnownName,
                       Stroke stroke,
                       Fill fill,
                       Expression size,
                       Expression rotation)
Specified by:
createMark in class StyleFactory

getSquareMark

public Mark getSquareMark()
Description copied from class: StyleFactory
Convinence method for obtaining a mark of a fixed shape

Specified by:
getSquareMark in class StyleFactory
Returns:
a Mark that matches the name in this method.

getCircleMark

public Mark getCircleMark()
Description copied from class: StyleFactory
Convinence method for obtaining a mark of a fixed shape

Specified by:
getCircleMark in class StyleFactory
Returns:
a Mark that matches the name in this method.

getCrossMark

public Mark getCrossMark()
Description copied from class: StyleFactory
Convinence method for obtaining a mark of a fixed shape

Specified by:
getCrossMark in class StyleFactory
Returns:
a Mark that matches the name in this method.

getXMark

public Mark getXMark()
Description copied from class: StyleFactory
Convinence method for obtaining a mark of a fixed shape

Specified by:
getXMark in class StyleFactory
Returns:
a Mark that matches the name in this method.

getTriangleMark

public Mark getTriangleMark()
Description copied from class: StyleFactory
Convinence method for obtaining a mark of a fixed shape

Specified by:
getTriangleMark in class StyleFactory
Returns:
a Mark that matches the name in this method.

getStarMark

public Mark getStarMark()
Description copied from class: StyleFactory
Convinence method for obtaining a mark of a fixed shape

Specified by:
getStarMark in class StyleFactory
Returns:
a Mark that matches the name in this method.

createMark

public Mark createMark()
Specified by:
createMark in class StyleFactory

createGraphic

public Graphic createGraphic(ExternalGraphic[] externalGraphics,
                             Mark[] marks,
                             Symbol[] symbols,
                             Expression opacity,
                             Expression size,
                             Expression rotation)
Specified by:
createGraphic in class StyleFactory

createExternalGraphic

public ExternalGraphic createExternalGraphic(java.lang.String uri,
                                             java.lang.String format)
Specified by:
createExternalGraphic in class StyleFactory

createExternalGraphic

public ExternalGraphic createExternalGraphic(java.net.URL url,
                                             java.lang.String format)
Specified by:
createExternalGraphic in class StyleFactory

createFont

public Font createFont(Expression fontFamily,
                       Expression fontStyle,
                       Expression fontWeight,
                       Expression fontSize)
Specified by:
createFont in class StyleFactory

createLinePlacement

public LinePlacement createLinePlacement(Expression offset)
Specified by:
createLinePlacement in class StyleFactory

createPointPlacement

public PointPlacement createPointPlacement(AnchorPoint anchorPoint,
                                           Displacement displacement,
                                           Expression rotation)
Specified by:
createPointPlacement in class StyleFactory

createAnchorPoint

public AnchorPoint createAnchorPoint(Expression x,
                                     Expression y)
Specified by:
createAnchorPoint in class StyleFactory

createDisplacement

public Displacement createDisplacement(Expression x,
                                       Expression y)
Specified by:
createDisplacement in class StyleFactory

createHalo

public Halo createHalo(Fill fill,
                       Expression radius)
Specified by:
createHalo in class StyleFactory

getDefaultFill

public Fill getDefaultFill()
Specified by:
getDefaultFill in class StyleFactory

getDefaultLineSymbolizer

public LineSymbolizer getDefaultLineSymbolizer()
Specified by:
getDefaultLineSymbolizer in class StyleFactory

getDefaultMark

public Mark getDefaultMark()
Specified by:
getDefaultMark in class StyleFactory

getDefaultPointSymbolizer

public PointSymbolizer getDefaultPointSymbolizer()
Specified by:
getDefaultPointSymbolizer in class StyleFactory

getDefaultPolygonSymbolizer

public PolygonSymbolizer getDefaultPolygonSymbolizer()
Specified by:
getDefaultPolygonSymbolizer in class StyleFactory

getDefaultStroke

public Stroke getDefaultStroke()
Specified by:
getDefaultStroke in class StyleFactory

getDefaultStyle

public Style getDefaultStyle()
Specified by:
getDefaultStyle in class StyleFactory

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

Specified by:
getDefaultTextSymbolizer in class StyleFactory
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.

Specified by:
getDefaultFont in class StyleFactory
Returns:
the default Font

getDefaultGraphic

public Graphic getDefaultGraphic()
Specified by:
getDefaultGraphic in class StyleFactory

getDefaultPointPlacement

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

Specified by:
getDefaultPointPlacement in class StyleFactory
Returns:
a default PointPlacement.

createRasterSymbolizer

public RasterSymbolizer createRasterSymbolizer(java.lang.String geometryPropertyName,
                                               Expression opacity,
                                               ChannelSelection channel,
                                               Expression overlap,
                                               ColorMap colorMap,
                                               ContrastEnhancement cenhancement,
                                               ShadedRelief relief,
                                               Symbolizer outline)
Specified by:
createRasterSymbolizer in class StyleFactory

getDefaultRasterSymbolizer

public RasterSymbolizer getDefaultRasterSymbolizer()
Specified by:
getDefaultRasterSymbolizer in class StyleFactory

createChannelSelection

public ChannelSelection createChannelSelection(SelectedChannelType[] channels)
Specified by:
createChannelSelection in class StyleFactory

createColorMap

public ColorMap createColorMap()
Specified by:
createColorMap in class StyleFactory

createColorMapEntry

public ColorMapEntry createColorMapEntry()
Specified by:
createColorMapEntry in class StyleFactory

createSelectedChannelType

public SelectedChannelType createSelectedChannelType(java.lang.String name,
                                                     Expression enhancement)
Specified by:
createSelectedChannelType in class StyleFactory


Copyright © GeoTools. All Rights Reserved.