Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| deegree 2.4 (2010/11/11 10:47 build-27-official)
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.deegree.graphics.sld
Class Fill

    java.lang.Object
      org.deegree.graphics.sld.Drawing
          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: 18195 $ $Date: 2009-06-18 17:55:39 +0200 (Do, 18. Jun 2009) $
Author:
  Katharina Lupp , Markus Schneider

Field Summary
`static 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`.
`protected` | `Fill(HashMap<String,Object> cssParams, GraphicFill graphicFill)` Constructs a new `Fill`.

Method Summary
`String` | `exportAsXML()` exports the content of the CssParameter as XML formated String
`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'.
`void` | `setFill(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 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

    protected Fill(HashMap<String,Object> cssParams,
                   GraphicFill graphicFill)

  Constructs a new `Fill`.

  Parameters:
    `cssParams` -
    `graphicFill` -

Method Detail

### getFill

    public 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(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

### exportAsXML

    public String exportAsXML()

  exports the content of the CssParameter as XML formated String

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

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| deegree 2.4 (2010/11/11 10:47 build-27-official)
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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