|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface TextSymbolizer
A symbolizer describes how a feature should appear on a map.
A symbolizer is obtained by specifying one of a small number of different types of symbolizer and then supplying parameters to override its default behaviour.
The text symbolizer describes how to display text labels and the like.
The details of this object are taken from the OGC Styled-Layer Descriptor Report (OGC 02-070) version 1.0.0.:
<xsd:element name="TextSymbolizer" substitutionGroup="sld:Symbolizer">
<xsd:annotation>
<xsd:documentation>
A "TextSymbolizer" is used to render text labels according to
various graphical parameters.
</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:complexContent>
<xsd:extension base="sld:SymbolizerType">
<xsd:sequence>
<xsd:element ref="sld:Geometry" minOccurs="0"/>
<xsd:element ref="sld:Label" minOccurs="0"/>
<xsd:element ref="sld:Font" minOccurs="0"/>
<xsd:element ref="sld:LabelPlacement" minOccurs="0"/>
<xsd:element ref="sld:Halo" minOccurs="0"/>
<xsd:element ref="sld:Fill" minOccurs="0"/>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
</xsd:element>
Renderers can use this information when displaying styled features, though it must be remembered that not all renderers will be able to fully represent strokes as set out by this interface. For example, opacity may not be supported.
Notes:
modules/library/api (gt-api.jar)
Method Summary | |
---|---|
void |
addToOptions(String key,
String value)
Deprecated. Please use getOptions().put( key, value ) |
Fill |
getFill()
Returns the object that indicates how the text will be filled. |
Font |
getFont()
Font to use when rendering this symbolizer. |
Font[] |
getFonts()
Deprecated. use getFont() |
Halo |
getHalo()
A halo fills an extended area outside the glyphs of a rendered text label to make the label easier to read over a background. |
Expression |
getLabel()
Returns the expression that will be evaluated to determine what text is displayed. |
LabelPlacement |
getLabelPlacement()
A LabelPlacement specifies how a text element should be rendered relative to its geometric point or line. |
String |
getOption(String key)
Deprecated. Please use getOptions.get( key ) |
Map<String,String> |
getOptions()
return the map of option |
LabelPlacement |
getPlacement()
Deprecated. Please use getLabelPlacement() |
Expression |
getPriority()
Priority -- null = use the default labeling priority Expression = an expression that evaluates to a number (ie. |
void |
setFill(Fill fill)
Sets the object that indicates how the text will be filled. |
void |
setFont(Font font)
Font used when rendering this symbolizer. |
void |
setFonts(Font[] fonts)
Deprecated. use getFont() setters to modify the set of font faces used |
void |
setGeometryPropertyName(String name)
This property defines the geometry to be used for styling. |
void |
setHalo(Halo halo)
A halo fills an extended area outside the glyphs of a rendered text label to make the label easier to read over a background. |
void |
setLabel(Expression label)
Sets the expression that will be evaluated to determine what text is displayed. |
void |
setLabelPlacement(LabelPlacement labelPlacement)
A LabelPlacement specifies how a text element should be rendered relative to its geometric point or line. |
void |
setPlacement(LabelPlacement labelPlacement)
Deprecated. Please use setLabelPlacement |
void |
setPriority(Expression e)
Priority -- null = use the default labeling priority Expression = an expression that evaluates to a number (ie. |
Methods inherited from interface TextSymbolizer |
---|
accept |
Methods inherited from interface Symbolizer |
---|
getGeometryPropertyName, getName, getUnitOfMeasure |
Methods inherited from interface Symbolizer |
---|
accept, getDescription, setDescription, setName, setUnitOfMeasure |
Methods inherited from interface Symbolizer |
---|
getGeometryPropertyName, getName, getUnitOfMeasure |
Method Detail |
---|
Expression getLabel()
getLabel
in interface TextSymbolizer
void setLabel(Expression label)
getLabel()
for details.
Font[] getFonts()
Font getFont()
getFont
in interface TextSymbolizer
void setFont(Font font)
font
- void setFonts(Font[] fonts)
LabelPlacement getLabelPlacement()
getLabelPlacement
in interface TextSymbolizer
void setLabelPlacement(LabelPlacement labelPlacement)
void setPlacement(LabelPlacement labelPlacement)
LabelPlacement getPlacement()
Halo getHalo()
getHalo
in interface TextSymbolizer
void setHalo(Halo halo)
Fill getFill()
getFill
in interface TextSymbolizer
void setFill(Fill fill)
getFill()
for details.
void setGeometryPropertyName(String name)
name
- The name of the attribute in the feature being styled that
should be used. If null then the default geometry should be
used.void setPriority(Expression e)
Expression getPriority()
void addToOptions(String key, String value)
String getOption(String key)
key
- Map<String,String> getOptions()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |