Package com.luciad.format.s52
Class TLcdS52Symbol
java.lang.Object
com.luciad.format.s52.TLcdS52Symbol
- All Implemented Interfaces:
ILcdRotation,ILcdS52Icon,ILcdIcon,ILcdCloneable,Serializable,Cloneable
This class represents an icon from the S-52 symbology.
Such an icon is composed of zero or more of the following shapes:

- arc
- circle
- polyline
- polygon
An S-52 symbol has a pivot point, that acts as the center point of the symbol, around which
the symbol should be rotated and scaled. When decoded into a TLcdS52Symbol,
the shapes defining the symbol are translated and the icon size is adapted, such that the
pivot point corresponds to the center of the icon.
The bounding box of the symbol can also be retrieved, and is defined relatively to the left-upper corner of the icon.
The image below illustrates the relationship between a symbol definition
in the S-52 standard, and the corresponding symbol representation in TLcdS52Symbol.

- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()MakesObject.clone()public.booleanintReturns the width of the bounding box of this symbol.intReturns the height of the bounding box of this symbol.intReturns the X coordinate of the upper left corner of the bounding box of this symbol.intReturns the Y coordinate of the upper left corner of the bounding box of this symbol.getColor()ILcdIcon[]Returns the components of which this symbol is composed.intReturns the fixed height of the icon.intReturns the fixed width of the icon.getShape()inthashCode()voidDraw theILcdIconat the specified location.static voidsetColorProvider(ILcdS52ColorProvider aColorProvider) Deprecated.this static method shouldn't be used anymore.voidsetComponents(ILcdIcon[] aComponents) Sets the components of which this symbol is to be composed.voidsetIconHeight(int aIconHeight) Sets the icon height of this icon.voidsetIconWidth(int aIconWidth) Sets the icon width of this icon.voidsetRotationAngle(double aRotation) Sets the rotation for this object.toString()
-
Constructor Details
-
TLcdS52Symbol
public TLcdS52Symbol()Creates a new, emptyTLcdS52Symbol.
-
-
Method Details
-
setColorProvider
Deprecated.this static method shouldn't be used anymore. Color retrieval functions should be implemented by the icons that make up the symbol.Sets theILcdS52ColorProviderto be used for the visualization of S-52 symbols.- Parameters:
aColorProvider- the color provider to be sued.
-
setIconWidth
public void setIconWidth(int aIconWidth) Sets the icon width of this icon.- Parameters:
aIconWidth- the icon height of this icon.
-
setIconHeight
public void setIconHeight(int aIconHeight) Sets the icon height of this icon.- Parameters:
aIconHeight- the icon height of this icon.
-
getComponents
Returns the components of which this symbol is composed.- Returns:
- an array containing the components of which symbol icon is composed.
-
setComponents
Sets the components of which this symbol is to be composed.- Parameters:
aComponents- an array containing the icon of which this symbol is to be composed.
-
setRotationAngle
public void setRotationAngle(double aRotation) Description copied from interface:ILcdRotationSets the rotation for this object.- Specified by:
setRotationAnglein interfaceILcdRotation- Parameters:
aRotation- the rotation for this object.
-
getShape
- Specified by:
getShapein interfaceILcdS52Icon
-
getColor
- Specified by:
getColorin interfaceILcdS52Icon
-
paintIcon
Description copied from interface:ILcdIconDraw theILcdIconat the specified location.ILcdIconimplementations may use theComponentargument to get properties useful for painting, e.g. the foreground or background color.- Specified by:
paintIconin interfaceILcdIcon- Parameters:
aComponent- a Component to retrieve properties from.aGraphics- the Graphics on which the icon will be painted.aX- the x position where the icon will be painted. x is the first coordinate of the top left corner point of the icon.aY- the y position where the icon will be painted. y is the second coordinate of the top left corner point of the icon.
-
getIconHeight
public int getIconHeight()Description copied from interface:ILcdIconReturns the fixed height of the icon.- Specified by:
getIconHeightin interfaceILcdIcon- Returns:
- the fixed height of the icon.
-
getIconWidth
public int getIconWidth()Description copied from interface:ILcdIconReturns the fixed width of the icon.- Specified by:
getIconWidthin interfaceILcdIcon- Returns:
- the fixed width of the icon.
-
clone
Description copied from interface:ILcdCloneableMakes
When for example extending fromObject.clone()public.java.lang.Object, it can be implemented like this:public Object clone() { try { return super.clone(); } catch ( CloneNotSupportedException e ) { // Cannot happen: extends from Object and implements Cloneable (see also Object.clone) throw new RuntimeException( e ); } }- Specified by:
clonein interfaceILcdCloneable- Overrides:
clonein classObject- See Also:
-
getBoundingBoxX
public int getBoundingBoxX()Returns the X coordinate of the upper left corner of the bounding box of this symbol.- Returns:
- the X coordinate of the upper left corner of the bounding box.
-
getBoundingBoxY
public int getBoundingBoxY()Returns the Y coordinate of the upper left corner of the bounding box of this symbol.- Returns:
- the Y coordinate of the upper left corner of the bounding box.
-
getBoundingBoxWidth
public int getBoundingBoxWidth()Returns the height of the bounding box of this symbol.- Returns:
- the height of the bounding box.
-
getBoundingBoxHeight
public int getBoundingBoxHeight()Returns the width of the bounding box of this symbol.- Returns:
- the width of the bounding box.
-
equals
-
hashCode
public int hashCode() -
toString
-