public static class TLcdSLDTextSymbolizer.Builder<T> extends Object
Modifier and Type | Method and Description |
---|---|
TLcdSLDTextSymbolizer.Builder<T> |
bold()
Sets the font weight to bold.
|
T |
buildSymbolizer()
Builds the symbolizer with the set parameters.
|
TLcdSLDTextSymbolizer.Builder<T> |
fill(TLcdSLDFill aFill)
Sets the fill of the label.
|
TLcdSLDTextSymbolizer.Builder<T> |
fillColor(Color aColor)
Set the label fill color.
|
TLcdSLDTextSymbolizer.Builder<T> |
fillColor(ILcdOGCExpression aFillColorExpression)
Specifies an OGC expression to use for the label fill color..
|
TLcdSLDTextSymbolizer.Builder<T> |
fillOpacity(double aOpacity)
Sets the opacity for the label color.
|
TLcdSLDTextSymbolizer.Builder<T> |
font(TLcdSLDFont aFont)
Sets the font of the symbolizer.
|
TLcdSLDTextSymbolizer.Builder<T> |
fontFamily(String aFontFamily)
Sets the font family.
|
TLcdSLDTextSymbolizer.Builder<T> |
fontSize(int aFontSize)
Sets the size of the font.
|
TLcdSLDTextSymbolizer.Builder<T> |
geometry(TLcdOGCFunction aGeometryFunction)
Specifies the geometry that is styled by this symbolizer.
|
TLcdSLDTextSymbolizer.Builder<T> |
geometry(TLcdOGCPropertyName aGeometry)
Specifies the geometry that is styled by this symbolizer.
|
TLcdSLDTextSymbolizer.Builder<T> |
geometry(TLcdSLDGeometry aGeometry)
Sets the geometry of the symbolizer.
|
TLcdSLDGraphic.Builder<TLcdSLDTextSymbolizer.Builder<T>> |
graphic()
Returns a builder for the graphic that should be used by the text symbolizer.
|
TLcdSLDTextSymbolizer.Builder<T> |
halo(TLcdSLDHalo aHalo)
Sets the label halo.
|
TLcdSLDTextSymbolizer.Builder<T> |
haloColor(Color aColor)
Sets the color of the halo.
|
TLcdSLDTextSymbolizer.Builder<T> |
haloColor(ILcdOGCExpression aHaloColorExpression)
Specifies an OGC expression to use for the halo color.
|
TLcdSLDTextSymbolizer.Builder<T> |
haloOpacity(double aOpacity)
Sets the opacity of the halo.
|
TLcdSLDTextSymbolizer.Builder<T> |
haloRadius(double aRadius)
Sets the radius of the halo.
|
TLcdSLDTextSymbolizer.Builder<T> |
italic()
Sets the font style to italic.
|
TLcdSLDTextSymbolizer.Builder<T> |
label(ILcdOGCExpression aExpression)
Sets the OGC expression that evaluates to a label.
|
TLcdSLDTextSymbolizer.Builder<T> |
linePlacement(double aOffset)
Specifies that the label should be placed along a line.
|
TLcdSLDTextSymbolizer.Builder<T> |
linePlacement(TLcdSLDLinePlacement aLinePlacement)
Specifies the line placement for the label.
|
TLcdSLDPointPlacement.Builder<TLcdSLDTextSymbolizer.Builder<T>> |
pointPlacement()
Starts the definition of a new point placement which will be used as point placement for the label.
|
TLcdSLDTextSymbolizer.Builder<T> |
pointPlacement(TLcdSLDPointPlacement aPointPlacement)
Specifies the point placement for the label.
|
TLcdSLDTextSymbolizer.Builder<T> |
vendorOption(String aName,
String aValue)
Adds a vendor option.
|
public TLcdSLDTextSymbolizer.Builder<T> geometry(TLcdOGCPropertyName aGeometry)
Specifies the geometry that is styled by this symbolizer.
This method must not be called when geometry(TLcdSLDGeometry)
or geometry(TLcdOGCFunction)
has already been called.
aGeometry
- A property name that points to a compatible geometry. Must not be null
TLcdOGCFilterFactory.property(TLcdDataType,
com.luciad.datamodel.TLcdDataProperty...)
public TLcdSLDTextSymbolizer.Builder<T> geometry(TLcdOGCFunction aGeometryFunction)
Specifies the geometry that is styled by this symbolizer.
This method must not be called when geometry(TLcdSLDGeometry)
or geometry(TLcdOGCPropertyName)
has already been called.
aGeometryFunction
- A function that determines a compatible geometry. Must not be null
TLcdOGCFilterFactory.function(String, ILcdOGCExpression...)
public TLcdSLDTextSymbolizer.Builder<T> geometry(TLcdSLDGeometry aGeometry)
Sets the geometry of the symbolizer.
This method must not be called when geometry(TLcdOGCPropertyName)
or geometry(TLcdOGCFunction)
has already been called.
aGeometry
- The geometry. Must not be null
public TLcdSLDTextSymbolizer.Builder<T> font(TLcdSLDFont aFont)
Sets the font of the symbolizer.
This method must not be called when fontFamily(String)
, fontSize(int)
,
italic()
or bold()
has already been called.
aFont
- The font. Must not be null
public TLcdSLDTextSymbolizer.Builder<T> fontSize(int aFontSize)
Sets the size of the font.
This method must not be called when font(TLcdSLDFont)
has already been called.
aFontSize
- A font size. Must be greater than 0public TLcdSLDTextSymbolizer.Builder<T> fontFamily(String aFontFamily)
Sets the font family.
This method must not be called when font(TLcdSLDFont)
has already been called.
aFontFamily
- A font family. Typical family names for font families can be found in the
java.awt.Font
class. Must not be null
public TLcdSLDTextSymbolizer.Builder<T> italic()
Sets the font style to italic.
This method must not be called when font(TLcdSLDFont)
has already been called.
public TLcdSLDTextSymbolizer.Builder<T> bold()
Sets the font weight to bold.
This method must not be called when font(TLcdSLDFont)
has already been called.
public TLcdSLDTextSymbolizer.Builder<T> label(ILcdOGCExpression aExpression)
label(TLcdOGCFilterFactory.property("ns0:theName",Collections.singletonMap("ns0","MyNamespace")));
aExpression
- A valid OGC expression. Must not be null
public TLcdSLDTextSymbolizer.Builder<T> linePlacement(double aOffset)
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()
or pointPlacement(TLcdSLDPointPlacement)
has
already been called.
aOffset
- The distance from the line at which the label should be placed. Expressed in
pixels.public TLcdSLDTextSymbolizer.Builder<T> linePlacement(TLcdSLDLinePlacement aLinePlacement)
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()
or pointPlacement(TLcdSLDPointPlacement)
has
already been called.
aLinePlacement
- The line placement. Must not be null
public TLcdSLDPointPlacement.Builder<TLcdSLDTextSymbolizer.Builder<T>> 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)
or linePlacement(TLcdSLDLinePlacement)
has
already been called.
public TLcdSLDTextSymbolizer.Builder<T> pointPlacement(TLcdSLDPointPlacement aPointPlacement)
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)
or linePlacement(TLcdSLDLinePlacement)
has
already been called.
aPointPlacement
- The point placement. Must not be null
public TLcdSLDTextSymbolizer.Builder<T> halo(TLcdSLDHalo aHalo)
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)
or haloOpacity(double)
has already been called.
aHalo
- The halo. Must not be null
public TLcdSLDTextSymbolizer.Builder<T> haloRadius(double aRadius)
Sets the radius of the halo.
This method must not be called when halo(TLcdSLDHalo)
has already been called.
aRadius
- The radius, expressed in pixels. Must not be negativepublic TLcdSLDTextSymbolizer.Builder<T> haloColor(Color aColor)
Sets the color of the halo.
This method must not be called when halo(TLcdSLDHalo)
or haloColor(ILcdOGCExpression)
has already been called.
aColor
- The color. Must not be null
public TLcdSLDTextSymbolizer.Builder<T> haloColor(ILcdOGCExpression aHaloColorExpression)
Specifies an OGC expression to use for the halo color.
This method must not be called when halo(TLcdSLDHalo)
or haloColor(java.awt.Color)
has already been called.
aHaloColorExpression
- AN OGC expression that evaluates to a color. Must not be null
public TLcdSLDTextSymbolizer.Builder<T> haloOpacity(double aOpacity)
Sets the opacity of the halo.
This method must not be called when halo(TLcdSLDHalo)
has already been called.
aOpacity
- The opacity. Must be between 0.0 and 1.0public TLcdSLDTextSymbolizer.Builder<T> fill(TLcdSLDFill aFill)
Sets the fill of the label.
This method must not be called when fillColor(java.awt.Color)
or fillOpacity(double)
has already been called.
aFill
- The fill. Must not be null
public TLcdSLDTextSymbolizer.Builder<T> fillColor(Color aColor)
Set the label fill color. The opacity is determined by the fillOpacity(double)
method.
This method must not be called when fill(TLcdSLDFill)
or fillColor(ILcdOGCExpression)
has already been called.
aColor
- A valid color. Must not be null
public TLcdSLDTextSymbolizer.Builder<T> fillColor(ILcdOGCExpression aFillColorExpression)
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)
or fillColor(java.awt.Color)
has already been called.
aFillColorExpression
- An OGC expression that evaluates to a color. Must not be null
public TLcdSLDTextSymbolizer.Builder<T> fillOpacity(double aOpacity)
Sets the opacity for the label color.
This method must not be called when fill(TLcdSLDFill)
has already been called.
aOpacity
- An opacity between 0.0 and 1.0.public TLcdSLDGraphic.Builder<TLcdSLDTextSymbolizer.Builder<T>> 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.
TLcdSLDGraphic
TLcdSLDGraphic.newBuilder()
public TLcdSLDTextSymbolizer.Builder<T> vendorOption(String aName, String aValue)
Adds a vendor option.
aName
- the name of the vendor optionaValue
- the value of the vendor optionpublic T 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.