Class TLcdSLDPolygonSymbolizer.Builder<T>
- Enclosing class:
TLcdSLDPolygonSymbolizer
- Since:
- 2012.1
-
Method Summary
Modifier and TypeMethodDescriptionBuilds the symbolizer with the set parameters.fill
(TLcdSLDFill aFill) Specifies the fill to use.fillColor
(ILcdOGCExpression aColorExpression) Specifies an OGC expression to use for the fill color.Specifies the fill color for this symbolizer.Returns a builder for the graphic that should be used by the polygon symbolizer.fillGraphic
(TLcdSLDExternalGraphic aExternalGraphic) Specifies an external graphic that is to be used as a fill.fillOpacity
(double aOpacity) Sets the opacity for the fill.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.metre()
Sets the unit of measure for this symbolizer to metre.noFill()
Specifies that no fill should be used.noStroke()
Specifies that no outline should be used.perpendicularOffset
(double aOffset) Sets the perpendicular offset from the original geometry at which the polygon should be drawn.stroke
(TLcdSLDStroke aStroke) Sets the stroke which will be used for the outline.strokeColor
(ILcdOGCExpression aStrokeColorExpression) Specifies an OGC expression to use for the outline color.strokeColor
(Color aColor) Specifies the outline color.strokeDashArray
(int... aDashPattern) Specifies the dash array of the stroke.strokeDashArray
(String aDashPattern) Specifies the dash array of the stroke.strokeOpacity
(double aOpacity) Sets the opacity for the stroke.strokeWidth
(int aWidth) Specifies the outline width.
-
Method Details
-
noFill
Specifies that no fill should be used. This allows for example to only show an outline without the fill.
This method must not be called when any of the other fill methods has already been called.
- Returns:
- This builder
-
fill
Specifies the fill to use.
This method must not be called when
noFill()
or any of the other fill methods has already been called.- Parameters:
aFill
- A valid fill. Must not benull
. UsenoFill()
when you want to disable the fill- Returns:
- This builder
-
fillGraphic
Specifies an external graphic that is to be used as a fill. External graphics can be created using a
TLcdSLDGraphic.Builder
.When this method is used in combination with the
fillOpacity(double)
and/or thefillColor(java.awt.Color)
, the color and opacity will be used as modulation color for the graphic.This method must not be called when
noFill()
,fill(TLcdSLDFill)
orfillGraphic()
has already been called.- Parameters:
aExternalGraphic
- The external graphic. Must not benull
. UsenoFill()
when you want to disable the fill- Returns:
- This builder
-
fillGraphic
Returns a builder for the graphic that should be used by the polygon symbolizer. End creation of the graphic by calling
TLcdSLDGraphic.Builder.buildGraphic()
to return to this polygon symbolizer builder.When this method is used in combination with the
fillOpacity(double)
and/or thefillColor(java.awt.Color)
, the color and opacity will be used as modulation color for the graphic.This method must not be called when
noFill()
,fill(TLcdSLDFill)
orfillGraphic(TLcdSLDExternalGraphic)
has already been called.- Returns:
- a builder for a
TLcdSLDGraphic
- See Also:
-
fillColor
Specifies an OGC expression to use for the fill color.
This method must not be called when
noFill()
,fill(TLcdSLDFill)
,fillColor(java.awt.Color)
has already been called.- Parameters:
aColorExpression
- An OGC expression that evaluates to a color. Must not benull
. UsenoFill()
when you want to disable the fill- Returns:
- This builder
-
fillColor
Specifies the fill color for this symbolizer.
When this method is used in combination with the
fillGraphic()
orfillGraphic(TLcdSLDExternalGraphic)
method, the fill color and opacity will be used as modulation color for the graphic.This method must not be called when
noFill()
,fill(TLcdSLDFill)
,fillColor(ILcdOGCExpression)
has already been called.- Parameters:
aColor
- the fill color. Must not benull
. UsenoFill()
when you want to disable the fill- Returns:
- This builder
-
fillOpacity
Sets the opacity for the fill.
When this method is used in combination with the
fillGraphic()
orfillGraphic(TLcdSLDExternalGraphic)
method, the fill color and opacity will be used as modulation color for the graphic.This method must not be called when
noFill()
orfill(TLcdSLDFill)
has already been called.- Parameters:
aOpacity
- An opacity between 0.0 and 1.0.- Returns:
- This builder
-
noStroke
Specifies that no outline should be used. This allows to show only a fill without an outline.
This method must not be called when any of the other stroke methods has already been called.
- Returns:
- This builder
-
stroke
Sets the stroke which will be used for the outline.
This method must not be called when
noStroke()
or any of the other stroke methods has already been called.- Parameters:
aStroke
- The stroke. Must not benull
. UsenoStroke()
if you do not want an outline- Returns:
- This builder
-
strokeOpacity
Sets the opacity for the stroke.
This method must not be called when
noStroke()
orstroke(TLcdSLDStroke)
has already been called.- Parameters:
aOpacity
- An opacity between 0.0 and 1.0.- Returns:
- This builder
-
strokeWidth
Specifies the outline width. By default this is specified in pixels. Use the
metre()
method to switch the unit of measure to metres.This method must not be called when
noStroke()
orstroke(TLcdSLDStroke)
has already been called.- Parameters:
aWidth
- The width. Must be greater than zero. UsenoStroke()
when you do not want an outline- Returns:
- This builder
-
perpendicularOffset
Sets the perpendicular offset from the original geometry at which the polygon should be drawn. By default, this offset is interpreted as a distance in pixels. Use themetre()
method to switch the unit of measure to metres.- Parameters:
aOffset
- A valid offset.- Returns:
- this builder
- Since:
- 2022.1
-
strokeColor
Specifies an OGC expression to use for the outline color.
This method must not be called when
noStroke()
,stroke(TLcdSLDStroke)
orstrokeColor(java.awt.Color)
has already been called.- Parameters:
aStrokeColorExpression
- An OGC expression that evaluates to a color. Must not benull
. UsenoStroke()
when you do not want an outline- Returns:
- This builder
-
strokeColor
Specifies the outline color.
This method must not be called when
noStroke()
orstroke(TLcdSLDStroke)
has already been called.- Parameters:
aColor
- Outline color. Must not benull
. UsenoStroke()
when you do not want an outline- Returns:
- This builder
-
strokeDashArray
Specifies the dash array of the stroke. The
aDashPattern
parameter should contain alternating dash lengths and gap lengths, in pixels, separated by spaces. For example:"6 3 4 3"
Note that the dash pattern may impact the performance when using a
TLspSLDStyler
. Using patterns with a total length of 2, 4, 8 or 16 is encouraged.This method must not be called when
noStroke()
orstroke(TLcdSLDStroke)
has already been called.- Parameters:
aDashPattern
- The pattern for the dash array. Alternates between dash lengths and gap lengths, in pixels, separated by spaces. Must not benull
. UsenoStroke()
when you do not want an outline- Returns:
- This builder
-
strokeDashArray
Specifies the dash array of the stroke. The
aDashPattern
parameter should contain alternating dash lengths and gap lengths, in pixels. For example:"6 3 4 3"
Note that the dash pattern may impact the performance when using a
TLspSLDStyler
. Using patterns with a total length of 2, 4, 8 or 16 is encouraged.This method must not be called when
noStroke()
orstroke(TLcdSLDStroke)
has already been called.- Parameters:
aDashPattern
- The pattern for the dash array. Alternates between dash lengths and gap lengths, in pixels. Must not benull
. UsenoStroke()
when you do not want an outline- Returns:
- This builder
- Since:
- 2013.0
-
metre
Sets the unit of measure for this symbolizer to metre. The unit of measure is applied to the width of the stroke. The default uom is pixels.- Returns:
- This builder
-
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.
-
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
-