public static class TLcdSLDGraphic.Builder<T> extends Object
Modifier and Type | Method and Description |
---|---|
TLcdSLDGraphic.Builder<T> |
addExternalGraphic(String aHref)
Adds an external graphic based on the specified link.
|
TLcdSLDGraphic.Builder<T> |
addInlineExternalGraphic(String aFileName)
Adds a binary image file.
|
TLcdSLDGraphic.Builder<T> |
addInlineSVGMark(String aFileName)
Creates and adds a mark graphic by loading an SVG from file.
|
TLcdSLDGraphic.Builder<T> |
addMark(String aWellKnownName,
Color aLineColor,
Color aFillColor)
Creates a mark graphic based on a 'well known name'.
|
TLcdSLDGraphic.Builder<T> |
addMark(String aWellKnownName,
Color aLineColor,
Color aFillColor,
double aOpacity)
Creates a mark graphic based on a 'well known name'.
|
TLcdSLDGraphic.Builder<T> |
addMark(TLcdSLDMark aMark)
Adds a mark which will be used for the graphics
|
TLcdSLDGraphic.Builder<T> |
anchorPoint(TLcdSLDAnchorPoint aAnchorPoint)
Sets the anchor point for this graphic.
|
T |
buildGraphic()
Builds the graphic with the set parameters.
|
TLcdSLDGraphic.Builder<T> |
opacity(double aOpacity)
Sets a fixed opacity for this graphic.
|
TLcdSLDGraphic.Builder<T> |
opacity(ILcdOGCExpression aOpacityExpression)
Sets the opacity expression for this graphic.
|
TLcdSLDGraphic.Builder<T> |
rotation(double aRotationInDegrees)
Sets a fixed rotation for this graphic.
|
TLcdSLDGraphic.Builder<T> |
rotation(ILcdOGCExpression aRotationExpression)
Sets a rotation expression for this graphic.
|
TLcdSLDGraphic.Builder<T> |
size(double aSize)
Sets a fixed size for this graphic.
|
TLcdSLDGraphic.Builder<T> |
size(ILcdOGCExpression aSize)
Sets a size expression for this graphic.
|
public TLcdSLDGraphic.Builder<T> size(double aSize)
Sets a fixed size for this graphic. The default interpretation of this size is in pixels. But the unit of measure of the symbolizer can be set to define a world size.
This method must not be called when size(ILcdOGCExpression)
has
already been called.
aSize
- A size in pixels or in a world unit such as meters. Size must be greater than zeropublic TLcdSLDGraphic.Builder<T> size(ILcdOGCExpression aSize)
Sets a size expression for this graphic. The default interpretation of this size is in pixels. But the unit of measure of the symbolizer can be set to define a world size.
This method must not be called when size(double)
has already been called.
aSize
- An expression that evaluates to a size in pixels or in a world
unit such as meters. Must not be null
public TLcdSLDGraphic.Builder<T> rotation(double aRotationInDegrees)
Sets a fixed rotation for this graphic. The interpretation of this rotation is in degrees.
This method must not be called when rotation(ILcdOGCExpression)
has already been called.
aRotationInDegrees
- The rotation in degreespublic TLcdSLDGraphic.Builder<T> rotation(ILcdOGCExpression aRotationExpression)
Sets a rotation expression for this graphic. The expression should evaluate to a number (decimals are possible). The rotation is expressed in degrees.
This method must not be called when rotation(double)
has already been called.
aRotationExpression
- An expression that evaluates to a rotation in
degrees. Must not be null
public TLcdSLDGraphic.Builder<T> opacity(double aOpacity)
Sets a fixed opacity for this graphic. The opacity should be between 0.0 and 1.0
This method must not be called when opacity(ILcdOGCExpression)
has
already been called.
aOpacity
- The opacity value.public TLcdSLDGraphic.Builder<T> opacity(ILcdOGCExpression aOpacityExpression)
Sets the opacity expression for this graphic. The expression should evaluate to a decimal number between 0 and 1.
This method must not be called when opacity(double)
has already been called.
aOpacityExpression
- An expression that evaluates to an opacity in decimals. Must not be null
public TLcdSLDGraphic.Builder<T> anchorPoint(TLcdSLDAnchorPoint aAnchorPoint)
Sets the anchor point for this graphic.
The anchor point defines the location of this graphic, relative to its bounds. The default anchor point is [0.5, 0.5], indicating that the graphic is centered within the bounds of the graphic.
aAnchorPoint
- The anchor point for this graphic. Must not be null
TLcdSLDAnchorPoint
public TLcdSLDGraphic.Builder<T> addExternalGraphic(String aHref)
aHref
- A link that can be resolved to an image. Must not be null
public TLcdSLDGraphic.Builder<T> addInlineExternalGraphic(String aFileName)
aFileName
- The name of a file containing pixel data in a recognized file
format. Must not be null
public TLcdSLDGraphic.Builder<T> addInlineSVGMark(String aFileName)
aFileName
- The SVG filename. Must not be null
public TLcdSLDGraphic.Builder<T> addMark(String aWellKnownName, Color aLineColor, Color aFillColor)
Creates a mark graphic based on a 'well known name'. The possible well
known names are available in TLcdSLDMark
.
For example:
mark( TLcdSLDMark.CIRCLE, Color.green, Color.blue );
aWellKnownName
- A well known name for a TLcdSLDMark
. Must not be
null
aLineColor
- The line color of the mark. Must not be null
aFillColor
- The fill color of the mark. Must not be null
public TLcdSLDGraphic.Builder<T> addMark(String aWellKnownName, Color aLineColor, Color aFillColor, double aOpacity)
Creates a mark graphic based on a 'well known name'. The possible well
known names are available in TLcdSLDMark
.
For example:
mark( TLcdSLDMark.CIRCLE, Color.green, Color.blue, 0.5 );
aWellKnownName
- A well known name for a TLcdSLDMark
. Must not be
null
aLineColor
- The line color of the mark. Must not be null
aFillColor
- The fill color of the mark. Must not be null
aOpacity
- the opacity. Must be between 0 and 1.public TLcdSLDGraphic.Builder<T> addMark(TLcdSLDMark aMark)
aMark
- The markpublic T buildGraphic()
Builds the graphic 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.