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

org.deegree.graphics.sld
Class Halo

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

public class Halo
extends java.lang.Object
implements Marshallable

Incarnation of a sld:Halo-element. A Halo is a type of Fill that is applied to the backgrounds of font glyphs. The use of halos greatly improves the readability of text labels.

Version:
$Revision: 26665 $ $Date: 2010-09-09 20:44:38 +0200 (Do, 09 Sep 2010) $
Author:
Andreas Poth , Markus Schneider

Constructor Summary
Halo(ParameterValueType radius, Fill fill, Stroke stroke)
          Create a new Halo -instance.
 
Method Summary
 java.lang.String exportAsXML()
          exports the content of the Halo as XML formated String
 Fill getFill()
          A Fill allows area geometries to be filled.
 ParameterValueType getRadius()
          The Radius element gives the absolute size of a halo radius in pixels encoded as a floating-point number.
 double getRadius(Feature feature)
          The Radius element gives the absolute size of a halo radius in pixels encoded as a floating-point number.
 Stroke getStroke()
          Returns the underlying Stroke -instance.
 void setFill(Fill fill)
          Sets the underlying Fill -instance.
 void setRadius(double radius)
           
 void setRadius(ParameterValueType radius)
          Sets the value for the radius of the halo.
 void setStroke(Stroke stroke)
          Sets the underlying Stroke -instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Halo

public Halo(ParameterValueType radius,
            Fill fill,
            Stroke stroke)
Create a new Halo -instance.

Parameters:
radius - radius to be used for the halo, use null for a rectangle styled halo
fill - defines the fill style, use null for default style
stroke - defines the stroke style, use null for default style
Method Detail

getFill

public Fill getFill()
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.

Returns:
the underlying Fill -object or null

setFill

public void setFill(Fill fill)
Sets the underlying Fill -instance.

Parameters:
fill - defines the fill color and pattern

getRadius

public ParameterValueType getRadius()
The Radius element gives the absolute size of a halo radius in pixels encoded as a floating-point number. The radius is taken from the outside edge of a font glyph to extend the area of coverage of the glyph (and the inside edge of holes in the glyphs). The halo of a text label is considered to be a single shape. The default radius is one pixel. Negative values are not allowed.

Returns:
the radius definition as ParameterValueType, or null if it has not been specified

setRadius

public void setRadius(ParameterValueType radius)
Sets the value for the radius of the halo.

Parameters:
radius - radius to be used for the halo, use null for a rectangle styled halo

getRadius

public double getRadius(Feature feature)
                 throws FilterEvaluationException
The Radius element gives the absolute size of a halo radius in pixels encoded as a floating-point number. The radius is taken from the outside edge of a font glyph to extend the area of coverage of the glyph (and the inside edge of holes in the glyphs). The halo of a text label is considered to be a single shape. The default radius is one pixel. Negative values are not allowed.

Parameters:
feature - specifies the Feature to be used for evaluation of the underlying 'sld:ParameterValueType'
Returns:
the radius value, or -1 if it has not been specified
Throws:
FilterEvaluationException - if the evaluation fails

setRadius

public void setRadius(double radius)
Parameters:
radius - radius to be set for the halo
See Also:


getStroke

public Stroke getStroke()
Returns the underlying Stroke -instance.

Returns:
the underlying Stroke -object or null

setStroke

public void setStroke(Stroke stroke)
Sets the underlying Stroke -instance.

Parameters:
stroke - defines the stroke color and pattern

exportAsXML

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

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

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