org.deegree_impl.graphics.sld
Class TextSymbolizer_Impl

java.lang.Object
  extended byorg.deegree_impl.graphics.sld.Symbolizer_Impl
      extended byorg.deegree_impl.graphics.sld.TextSymbolizer_Impl
All Implemented Interfaces:
Marshallable, Symbolizer, TextSymbolizer

public class TextSymbolizer_Impl
extends Symbolizer_Impl
implements TextSymbolizer, Marshallable

Used to render a text label, according to the parameters. A missing Geometry, Label, Font, or LabelPlacement element selects the default value or behavior for the element. The default Label, Font, and LabelPlacement are system- dependent. Multiple Font elements may be used to specify alternate fonts in order of preference in case a map server does not support the first preference. A missing Halo or Fill element means that no halo or fill will be plotted, respectively. The Fill is rendered over top of the Halo, and the Halo includes the interiors of the font glyphs.

Version:
$Revision: 1.11 $ $Date: 2004/02/19 10:08:56 $
Author:
Katharina Lupp, Markus Schneider

Field Summary
private  Fill fill
           
private  Font font
           
private  Halo halo
           
private  ParameterValueType label
           
private  LabelPlacement labelPlacement
           
 
Fields inherited from class org.deegree_impl.graphics.sld.Symbolizer_Impl
geometry, maxDenominator, minDenominator
 
Constructor Summary
(package private) TextSymbolizer_Impl(Geometry geometry, ParameterValueType label, Font font, LabelPlacement labelPlacement, Halo halo, Fill fill, double min, double max)
          constructor initializing the class with the
 
Method Summary
 java.lang.String exportAsXML()
          exports the content of the TextSymbolizer as XML formated String
 Fill getFill()
          A Fill allows area geometries to be filled.
 Font getFont()
          Identifies a Font of a certain family, style, and size.
 Halo getHalo()
          A Halo is an extension (sub-type) of a Fill and is applied to the backgrounds of font glyphs.
 ParameterValueType getLabel()
          returns the Label as a ParameterValueType to be renderd
 LabelPlacement getLabelPlacement()
          Used to position a label relative to a point or a line string.
 void setFill(Fill fill)
          sets the
 void setFont(Font font)
          Sets a Font of a certain family, style, and size.
 void setHalo(Halo halo)
          sets
 void setLabel(ParameterValueType label)
          sets the
 void setLabelPlacement(LabelPlacement labelPlacement)
          sets the
 
Methods inherited from class org.deegree_impl.graphics.sld.Symbolizer_Impl
getGeometry, getMaxScaleDenominator, getMinScaleDenominator, setGeometry, setMaxScaleDenominator, setMinScaleDenominator
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.deegree.graphics.sld.Symbolizer
getGeometry, getMaxScaleDenominator, getMinScaleDenominator, setGeometry, setMaxScaleDenominator, setMinScaleDenominator
 

Field Detail

fill

private Fill fill

font

private Font font

halo

private Halo halo

labelPlacement

private LabelPlacement labelPlacement

label

private ParameterValueType label
Constructor Detail

TextSymbolizer_Impl

TextSymbolizer_Impl(Geometry geometry,
                    ParameterValueType label,
                    Font font,
                    LabelPlacement labelPlacement,
                    Halo halo,
                    Fill fill,
                    double min,
                    double max)
constructor initializing the class with the

Method Detail

getLabel

public ParameterValueType getLabel()
returns the Label as a ParameterValueType to be renderd

Specified by:
getLabel in interface TextSymbolizer
Returns:
the label

setLabel

public void setLabel(ParameterValueType label)
sets the
Specified by:
setLabel in interface TextSymbolizer
Parameters:
label - the label

getFont

public Font getFont()
Identifies a Font of a certain family, style, and size.

Specified by:
getFont in interface TextSymbolizer
Returns:
the font

setFont

public void setFont(Font font)
Sets a Font of a certain family, style, and size.

Specified by:
setFont in interface TextSymbolizer
Parameters:
font - the font

getLabelPlacement

public LabelPlacement getLabelPlacement()
Used to position a label relative to a point or a line string. For a point, you can specify the anchor point of the label and a linear displacement from the point (so that you can also plot a graphic symbol at the point). For a line-string placement, you can specify a perpendicular offset (so you can draw a stroke on the line).

MORE PARAMETERS ARE PROBABLY NEEDED HERE.

Specified by:
getLabelPlacement in interface TextSymbolizer
Returns:
the labelPlacement

setLabelPlacement

public void setLabelPlacement(LabelPlacement labelPlacement)
sets the

Specified by:
setLabelPlacement in interface TextSymbolizer
Parameters:
labelPlacement - the labelPlacement

getHalo

public Halo getHalo()
A Halo is an extension (sub-type) of a Fill and is applied to the backgrounds of font glyphs. Either a Radius or a Block halo type can be used. The radius is computed from the outside edge of the font glyph (or inside of "holes"). The default is a Radius of 1.0 (pixels) but if no Halo is selected in a containing structure, no halo will be rendered. The default is a solid white (Color "#FFFFFF") opaque halo.

Specified by:
getHalo in interface TextSymbolizer
Returns:
the halo

setHalo

public void setHalo(Halo halo)
sets

Specified by:
setHalo in interface TextSymbolizer
Parameters:
halo - the halo

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.

Specified by:
getFill in interface TextSymbolizer
Returns:
the fill

setFill

public void setFill(Fill fill)
sets the

Specified by:
setFill in interface TextSymbolizer
Parameters:
fill - the fill

exportAsXML

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

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