Class TLcdSLDGraphic
- All Implemented Interfaces:
ILcdDataObject,ILcdCloneable,ILcdDeepCloneable,Cloneable
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA builder for SLD graphics. -
Constructor Summary
ConstructorsConstructorDescriptionEmpty constructor.TLcdSLDGraphic(TLcdDataType aDataType) Empty constructor.TLcdSLDGraphic(TLcdSLDParameterValue aOpacity, TLcdSLDParameterValue aSize, TLcdSLDParameterValue aRotation, Object[] aGraphics) Constructor for given parameters. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddGraphic(Object aGraphic) Adds a TLcdSLDMark or TLcdSLDExternalGraphic to this TLcdSLDGraphic.Returns the value of the property that maps to theAnchorPointelement.getExternalGraphic(int aIndex) Returns the external graphic at the given index.Returns the value of the property that maps to the choice between theExternalGraphicandMarkelements.getGraphic(int aIndex) Gets the graphic at a given position.intReturns 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 theOpacityelement.Returns the value of the property that maps to theRotationelement.getSize()Returns the value of the property that maps to theSizeelement.voidinsertGraphicAt(Object aGraphic, int aIndex) Inserts a mark or external graphic at a given position.booleanisGraphicExternalGraphic(int aIndex) Checks whether the graphic at a given position is an external graphic.booleanisGraphicMark(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.voidremoveGraphic(Object aGraphic) Removes a mark or external graphic.voidsetAnchorPoint(TLcdSLDAnchorPoint aValue) Sets the value of the property that maps to theAnchorPointelement.voidsetOpacity(TLcdSLDParameterValue aValue) Sets the value of the property that maps to theOpacityelement.voidsetRotation(TLcdSLDParameterValue aValue) Sets the value of the property that maps to theRotationelement.voidsetSize(TLcdSLDParameterValue aValue) Sets the value of the property that maps to theSizeelement.
-
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 theExternalGraphicandMarkelements.The possible values for this property are instances of
java.util.Listwith elements of class- Returns:
- the value of the
GRAPHIC_PROPERTYproperty.
-
getOpacity
Returns the value of the property that maps to theOpacityelement.The parameter should evaluate to a decimal number between 0 and 1.
- Returns:
- the value of the
OPACITY_PROPERTYproperty.
-
setOpacity
Sets the value of the property that maps to theOpacityelement.The parameter should evaluate to a decimal number between 0 and 1.
- Parameters:
aValue- the value to set for theOPACITY_PROPERTYproperty.
-
getSize
Returns the value of the property that maps to theSizeelement.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_PROPERTYproperty.
-
setSize
Sets the value of the property that maps to theSizeelement.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_PROPERTYproperty.
-
getRotation
Returns the value of the property that maps to theRotationelement.The parameter should evaluate to a number in degrees, decimals are possible.
- Returns:
- the value of the
ROTATION_PROPERTYproperty.
-
setRotation
Sets the value of the property that maps to theRotationelement.The parameter should evaluate to a number in degrees, decimals are possible.
- Parameters:
aValue- the value to set for theROTATION_PROPERTYproperty.
-
getAnchorPoint
Returns the value of the property that maps to theAnchorPointelement.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_PROPERTYproperty.
-
setAnchorPoint
Sets the value of the property that maps to theAnchorPointelement.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_PROPERTYproperty.
-