deegree 2.5 (2011/06/29 09:44 build-8-official)

org.deegree.graphics.sld
Class Fill

java.lang.Object
  extended by org.deegree.graphics.sld.Drawing
      extended by org.deegree.graphics.sld.Fill
All Implemented Interfaces:
Marshallable

public class Fill
extends Drawing
implements Marshallable

A Fill allows area geometries to be filled. There are two types of fills: solid-color and repeated GraphicFill. In general, if a Fill element is omitted in its containing element, no fill will be rendered. The default is a solid 50%-gray (color "#808080") opaque fill.

Version:
$Revision: 27181 $ $Date: 2010-10-05 15:24:30 +0200 (Di, 05 Okt 2010) $
Author:
Katharina Lupp , Markus Schneider

Field Summary
static java.awt.Color FILL_DEFAULT
          default fill color is #808080
static double OPACITY_DEFAULT
          Opacity is 1
 
Fields inherited from class org.deegree.graphics.sld.Drawing
cssParams, graphicFill
 
Constructor Summary
protected Fill()
          Constructs a new Fill.
  Fill(java.util.Map<java.lang.String,java.lang.Object> cssParams, GraphicFill graphicFill)
          Constructs a new Fill.
 
Method Summary
 java.lang.String exportAsXML()
          exports the content of the CssParameter as XML formated String
 java.awt.Color getFill(Feature feature)
          Returns the (evaluated) value of the fill's CssParameter 'fill'.
 double getOpacity(Feature feature)
          Returns the (evaluated) value of the fill's CssParameter 'fill-opacity'.
 java.lang.String getSymbol(Feature feature)
           
 void setFill(java.awt.Color color)
          sets the value of the fill's CssParameter 'fill' as a simple color
 void setOpacity(double opacity)
          sets the value of the opacity's CssParameter 'opacity' as a value.
 
Methods inherited from class org.deegree.graphics.sld.Drawing
addCssParameter, getCssParameters, getGraphicFill, removeCssParameter, setCssParameters, setGraphicFill
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FILL_DEFAULT

public static final java.awt.Color FILL_DEFAULT
default fill color is #808080


OPACITY_DEFAULT

public static final double OPACITY_DEFAULT
Opacity is 1

See Also:
Constant Field Values
Constructor Detail

Fill

protected Fill()
Constructs a new Fill.


Fill

public Fill(java.util.Map<java.lang.String,java.lang.Object> cssParams,
            GraphicFill graphicFill)
Constructs a new Fill.

Parameters:
cssParams -
graphicFill -
Method Detail

getFill

public java.awt.Color getFill(Feature feature)
                       throws FilterEvaluationException
Returns the (evaluated) value of the fill's CssParameter 'fill'.

Parameters:
feature - specifies the Feature to be used for evaluation of the underlying 'sld:ParameterValueType'
Returns:
the (evaluated) value of the parameter
Throws:
FilterEvaluationException - if the evaluation fails or the value is invalid

setFill

public void setFill(java.awt.Color color)
sets the value of the fill's CssParameter 'fill' as a simple color

Parameters:
color - color to be set

getOpacity

public double getOpacity(Feature feature)
                  throws FilterEvaluationException
Returns the (evaluated) value of the fill's CssParameter 'fill-opacity'.

Parameters:
feature - specifies the Feature to be used for evaluation of the underlying 'sld:ParameterValueType'
Returns:
the (evaluated) value of the parameter
Throws:
FilterEvaluationException - if the evaluation fails or the value is invalid

setOpacity

public void setOpacity(double opacity)
sets the value of the opacity's CssParameter 'opacity' as a value. Valid values ranges from 0 .. 1. If a value < 0 is passed it will be set to 0. If a value > 1 is passed it will be set to 1.

Parameters:
opacity - opacity to be set

getSymbol

public java.lang.String getSymbol(Feature feature)
                           throws FilterEvaluationException
Throws:
FilterEvaluationException

exportAsXML

public java.lang.String exportAsXML()
exports the content of the CssParameter as XML formated String

Specified by:
exportAsXML in interface Marshallable
Returns:
xml representation of the CssParameter

deegree 2.5 (2011/06/29 09:44 build-8-official)

an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org