Class TLcdSLDTextSymbolizer.Builder<T>
- Enclosing class:
TLcdSLDTextSymbolizer
- Since:
- 2012.1
-
Method Summary
Modifier and TypeMethodDescriptionbold()
Sets the font weight to bold.Builds the symbolizer with the set parameters.fill
(TLcdSLDFill aFill) Sets the fill of the label.fillColor
(ILcdOGCExpression aFillColorExpression) Specifies an OGC expression to use for the label fill color..Set the label fill color.fillOpacity
(double aOpacity) Sets the opacity for the label color.font
(TLcdSLDFont aFont) Sets the font of the symbolizer.fontFamily
(String aFontFamily) Sets the font family.fontSize
(int aFontSize) Sets the size of the font.geometry
(TLcdOGCFunction aGeometryFunction) Specifies the geometry that is styled by this symbolizer.geometry
(TLcdOGCPropertyName aGeometry) Specifies the geometry that is styled by this symbolizer.geometry
(TLcdSLDGeometry aGeometry) Sets the geometry of the symbolizer.graphic()
Returns a builder for the graphic that should be used by the text symbolizer.halo
(TLcdSLDHalo aHalo) Sets the label halo.haloColor
(ILcdOGCExpression aHaloColorExpression) Specifies an OGC expression to use for the halo color.Sets the color of the halo.haloOpacity
(double aOpacity) Sets the opacity of the halo.haloRadius
(double aRadius) Sets the radius of the halo.italic()
Sets the font style to italic.label
(ILcdOGCExpression aExpression) Sets the OGC expression that evaluates to a label.linePlacement
(double aOffset) Specifies that the label should be placed along a line.linePlacement
(TLcdSLDLinePlacement aLinePlacement) Specifies the line placement for the label.Starts the definition of a new point placement which will be used as point placement for the label.pointPlacement
(TLcdSLDPointPlacement aPointPlacement) Specifies the point placement for the label.vendorOption
(String aName, String aValue) Adds a vendor option.
-
Method Details
-
geometry
Specifies the geometry that is styled by this symbolizer.
This method must not be called when
geometry(TLcdSLDGeometry)
orgeometry(TLcdOGCFunction)
has already been called.- Parameters:
aGeometry
- A property name that points to a compatible geometry. Must not benull
- Returns:
- this builder
- See Also:
-
geometry
Specifies the geometry that is styled by this symbolizer.
This method must not be called when
geometry(TLcdSLDGeometry)
orgeometry(TLcdOGCPropertyName)
has already been called.- Parameters:
aGeometryFunction
- A function that determines a compatible geometry. Must not benull
- Returns:
- this builder
- Since:
- 2020.1
- See Also:
-
geometry
Sets the geometry of the symbolizer.
This method must not be called when
geometry(TLcdOGCPropertyName)
orgeometry(TLcdOGCFunction)
has already been called.- Parameters:
aGeometry
- The geometry. Must not benull
- Returns:
- This builder.
-
font
Sets the font of the symbolizer.
This method must not be called when
fontFamily(String)
,fontSize(int)
,italic()
orbold()
has already been called.- Parameters:
aFont
- The font. Must not benull
- Returns:
- This builder
-
fontSize
Sets the size of the font.
This method must not be called when
font(TLcdSLDFont)
has already been called.- Parameters:
aFontSize
- A font size. Must be greater than 0- Returns:
- this builder
-
fontFamily
Sets the font family.
This method must not be called when
font(TLcdSLDFont)
has already been called.- Parameters:
aFontFamily
- A font family. Typical family names for font families can be found in thejava.awt.Font
class. Must not benull
- Returns:
- this builder
-
italic
Sets the font style to italic.
This method must not be called when
font(TLcdSLDFont)
has already been called.- Returns:
- this builder
-
bold
Sets the font weight to bold.
This method must not be called when
font(TLcdSLDFont)
has already been called.- Returns:
- this builder
-
label
Sets the OGC expression that evaluates to a label. For example:label(TLcdOGCFilterFactory.property("ns0:theName",Collections.singletonMap("ns0","MyNamespace")));
- Parameters:
aExpression
- A valid OGC expression. Must not benull
- Returns:
- this builder
-
linePlacement
Specifies that the label should be placed along a line. This assumes that the geometry is some type of curve.
A line placement is mutually exclusive with a point placement. This method must not be called when
pointPlacement()
orpointPlacement(TLcdSLDPointPlacement)
has already been called.- Parameters:
aOffset
- The distance from the line at which the label should be placed. Expressed in pixels.- Returns:
- This builder.
-
linePlacement
Specifies the line placement for the label. This assumes that the geometry is some type of curve.
A line placement is mutually exclusive with a point placement. This method must not be called when
pointPlacement()
orpointPlacement(TLcdSLDPointPlacement)
has already been called.- Parameters:
aLinePlacement
- The line placement. Must not benull
- Returns:
- This builder.
-
pointPlacement
Starts the definition of a new point placement which will be used as point placement for the label. End creation of the point placement by calling
TLcdSLDPointPlacement.Builder.build()
to return to this text symbolizer builder.A point placement is mutually exclusive with a line placement. This method must not be called when
linePlacement(double)
orlinePlacement(TLcdSLDLinePlacement)
has already been called.- Returns:
- A builder for point placements.
-
pointPlacement
Specifies the point placement for the label.
A point placement is mutually exclusive with a line placement. This method must not be called when
linePlacement(double)
orlinePlacement(TLcdSLDLinePlacement)
has already been called.- Parameters:
aPointPlacement
- The point placement. Must not benull
- Returns:
- This builder.
-
halo
Sets the label halo. A halo can be used to increase the readability of the label.
This method must not be called when
haloRadius(double)
,haloColor(java.awt.Color)
orhaloOpacity(double)
has already been called.- Parameters:
aHalo
- The halo. Must not benull
- Returns:
- This builder.
-
haloRadius
Sets the radius of the halo.
This method must not be called when
halo(TLcdSLDHalo)
has already been called.- Parameters:
aRadius
- The radius, expressed in pixels. Must not be negative- Returns:
- This builder
-
haloColor
Sets the color of the halo.
This method must not be called when
halo(TLcdSLDHalo)
orhaloColor(ILcdOGCExpression)
has already been called.- Parameters:
aColor
- The color. Must not benull
- Returns:
- This builder.
-
haloColor
Specifies an OGC expression to use for the halo color.
This method must not be called when
halo(TLcdSLDHalo)
orhaloColor(java.awt.Color)
has already been called.- Parameters:
aHaloColorExpression
- AN OGC expression that evaluates to a color. Must not benull
- Returns:
- This builder.
-
haloOpacity
Sets the opacity of the halo.
This method must not be called when
halo(TLcdSLDHalo)
has already been called.- Parameters:
aOpacity
- The opacity. Must be between 0.0 and 1.0- Returns:
- This builder
-
fill
Sets the fill of the label.
This method must not be called when
fillColor(java.awt.Color)
orfillOpacity(double)
has already been called.- Parameters:
aFill
- The fill. Must not benull
- Returns:
- This builder
-
fillColor
Set the label fill color. The opacity is determined by the
fillOpacity(double)
method.This method must not be called when
fill(TLcdSLDFill)
orfillColor(ILcdOGCExpression)
has already been called.- Parameters:
aColor
- A valid color. Must not benull
- Returns:
- This builder.
-
fillColor
Specifies an OGC expression to use for the label fill color.. The opacity is determined by the
fillOpacity(double)
method.This method must not be called when
fill(TLcdSLDFill)
orfillColor(java.awt.Color)
has already been called.- Parameters:
aFillColorExpression
- An OGC expression that evaluates to a color. Must not benull
- Returns:
- This builder.
-
fillOpacity
Sets the opacity for the label color.
This method must not be called when
fill(TLcdSLDFill)
has already been called.- Parameters:
aOpacity
- An opacity between 0.0 and 1.0.- Returns:
- this builder
-
graphic
Returns a builder for the graphic that should be used by the text symbolizer.
This method must not be called when
graphic()
has already been called.- Returns:
- a builder for a
TLcdSLDGraphic
- Since:
- 2022.0
- See Also:
-
vendorOption
Adds a vendor option.
- Parameters:
aName
- the name of the vendor optionaValue
- the value of the vendor option- Returns:
- this builder
- Since:
- 2022.0
-
buildSymbolizer
Builds the symbolizer with the set parameters.
This method can only be called once. When you used the builder to build an instance, the builder is no longer valid and should be thrown away.
- Returns:
- the resulting symbolizer
-