Class TLcdSLDGraphic
- All Implemented Interfaces:
ILcdDataObject
,ILcdCloneable
,ILcdDeepCloneable
,Cloneable
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
A builder for SLD graphics. -
Constructor Summary
ConstructorDescriptionEmpty constructor.TLcdSLDGraphic
(TLcdDataType aDataType) Empty constructor.TLcdSLDGraphic
(TLcdSLDParameterValue aOpacity, TLcdSLDParameterValue aSize, TLcdSLDParameterValue aRotation, Object[] aGraphics) Constructor for given parameters. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addGraphic
(Object aGraphic) Adds a TLcdSLDMark or TLcdSLDExternalGraphic to this TLcdSLDGraphic.Returns the value of the property that maps to theAnchorPoint
element.getExternalGraphic
(int aIndex) Returns the external graphic at the given index.Returns the value of the property that maps to the choice between theExternalGraphic
andMark
elements.getGraphic
(int aIndex) Gets the graphic at a given position.int
Returns the marks and external graphics count.getMark
(int aIndex) Returns the mark at the given index.Returns the value of the property that maps to theOpacity
element.Returns the value of the property that maps to theRotation
element.getSize()
Returns the value of the property that maps to theSize
element.void
insertGraphicAt
(Object aGraphic, int aIndex) Inserts a mark or external graphic at a given position.boolean
isGraphicExternalGraphic
(int aIndex) Checks whether the graphic at a given position is an external graphic.boolean
isGraphicMark
(int aIndex) Checks whether the graphic at a given position is a mark.static TLcdSLDGraphic.Builder
<TLcdSLDGraphic> Creates a new builder with the default values.void
removeGraphic
(Object aGraphic) Removes a mark or external graphic.void
setAnchorPoint
(TLcdSLDAnchorPoint aValue) Sets the value of the property that maps to theAnchorPoint
element.void
setOpacity
(TLcdSLDParameterValue aValue) Sets the value of the property that maps to theOpacity
element.void
setRotation
(TLcdSLDParameterValue aValue) Sets the value of the property that maps to theRotation
element.void
setSize
(TLcdSLDParameterValue aValue) Sets the value of the property that maps to theSize
element.
-
Constructor Details
-
TLcdSLDGraphic
public TLcdSLDGraphic()Empty constructor. -
TLcdSLDGraphic
public TLcdSLDGraphic(TLcdSLDParameterValue aOpacity, TLcdSLDParameterValue aSize, TLcdSLDParameterValue aRotation, Object[] aGraphics) Constructor for given parameters.- Parameters:
aOpacity
- the given graphic opacity.aSize
- the given graphic size.aRotation
- the given graphic rotation.aGraphics
- the marks and external graphics.
-
TLcdSLDGraphic
Empty constructor.
-
-
Method Details
-
getGraphicCount
public int getGraphicCount()Returns the marks and external graphics count.- Returns:
- the marks and external graphics count.
-
addGraphic
Adds a TLcdSLDMark or TLcdSLDExternalGraphic to this TLcdSLDGraphic.- Parameters:
aGraphic
- an instance of TLcdMark or TLcdSLDExternalGraphic
-
insertGraphicAt
Inserts a mark or external graphic at a given position.- Parameters:
aGraphic
- the mark or external graphic.aIndex
- the index of the given position.
-
removeGraphic
Removes a mark or external graphic.- Parameters:
aGraphic
- the mark or external graphic to be removed.
-
isGraphicMark
public boolean isGraphicMark(int aIndex) Checks whether the graphic at a given position is a mark.- Parameters:
aIndex
- the index of the given position.- Returns:
- true if the graphic at a given position is a mark. False if not.
-
isGraphicExternalGraphic
public boolean isGraphicExternalGraphic(int aIndex) Checks whether the graphic at a given position is an external graphic.- Parameters:
aIndex
- the index of the given position.- Returns:
- true if the graphic at a given position is an external graphic. False if not.
-
getGraphic
Gets the graphic at a given position.- Parameters:
aIndex
- the index of the given position.- Returns:
- the graphic at a given position.
-
getMark
Returns the mark at the given index. Note that this method does not check whether the graphic at that index is indeed a TLcdSLDMark instance. If not a ClassCastException will be thrown.- Parameters:
aIndex
- the index of the mark in the collection of all Graphics.- Returns:
- the mark at the given index.
- See Also:
-
getExternalGraphic
Returns the external graphic at the given index. Note that this method does not check whether the graphic at that index is indeed a TLcdSLDExternalGraphic instance. If not a ClassCastException will be thrown.- Parameters:
aIndex
- the index of the external graphic in the collection of all Graphics.- Returns:
- the external graphic at the given index.
- See Also:
-
newBuilder
Creates a new builder with the default values.- Returns:
- the new builder.
- Since:
- 2012.1
-
getGraphic
Returns the value of the property that maps to the choice between theExternalGraphic
andMark
elements.The possible values for this property are instances of
java.util.List
with elements of class- Returns:
- the value of the
GRAPHIC_PROPERTY
property.
-
getOpacity
Returns the value of the property that maps to theOpacity
element.The parameter should evaluate to a decimal number between 0 and 1.
- Returns:
- the value of the
OPACITY_PROPERTY
property.
-
setOpacity
Sets the value of the property that maps to theOpacity
element.The parameter should evaluate to a decimal number between 0 and 1.
- Parameters:
aValue
- the value to set for theOPACITY_PROPERTY
property.
-
getSize
Returns the value of the property that maps to theSize
element.The size is the absolute height of the graphic, specified in the unit of measure of the symbolizer. The width will be set so that the original aspect ratio is preserved. If no size is set, the graphic will maintain its native size. The parameter should evaluate to a number.
- Returns:
- the value of the
SIZE_PROPERTY
property.
-
setSize
Sets the value of the property that maps to theSize
element.The size is the absolute height of the graphic, specified in the unit of measure of the symbolizer. The width will be set so that the original aspect ratio is preserved. If no size is set, the graphic will maintain its native size. The parameter should evaluate to a number.
- Parameters:
aValue
- the value to set for theSIZE_PROPERTY
property.
-
getRotation
Returns the value of the property that maps to theRotation
element.The parameter should evaluate to a number in degrees, decimals are possible.
- Returns:
- the value of the
ROTATION_PROPERTY
property.
-
setRotation
Sets the value of the property that maps to theRotation
element.The parameter should evaluate to a number in degrees, decimals are possible.
- Parameters:
aValue
- the value to set for theROTATION_PROPERTY
property.
-
getAnchorPoint
Returns the value of the property that maps to theAnchorPoint
element.An "AnchorPoint" identifies the location inside of a text label to use an an 'anchor' for positioning it relative to a point geometry.
- Returns:
- the value of the
ANCHOR_POINT_PROPERTY
property.
-
setAnchorPoint
Sets the value of the property that maps to theAnchorPoint
element.An "AnchorPoint" identifies the location inside of a text label to use an an 'anchor' for positioning it relative to a point geometry.
- Parameters:
aValue
- the value to set for theANCHOR_POINT_PROPERTY
property.
-