Package com.luciad.format.cgm
Class TLcdCGMIcon
java.lang.Object
com.luciad.format.cgm.TLcdCGMIcon
- All Implemented Interfaces:
ILcdIcon
,ILcdCloneable
,Serializable
,Cloneable
Icon implementation to represent icons that originate from a CGM file.
- Since:
- 2012.0
- See Also:
-
Constructor Summary
ConstructorDescriptionTLcdCGMIcon
(String aSourceName) Creates a new CGM icon for the given source name. -
Method Summary
Modifier and TypeMethodDescriptionclone()
MakesObject.clone()
public.Return the default fill color.Return the default line color.int
Returns the fixed height of the icon.int
Returns the fixed width of the icon.Returns the source name of the icon.void
Draw theILcdIcon
at the specified location.
-
Constructor Details
-
TLcdCGMIcon
Creates a new CGM icon for the given source name.- Parameters:
aSourceName
- a .CGM file source
-
-
Method Details
-
paintIcon
Description copied from interface:ILcdIcon
Draw theILcdIcon
at the specified location.ILcdIcon
implementations may use theComponent
argument to get properties useful for painting, e.g. the foreground or background color.- Specified by:
paintIcon
in 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.
-
getIconWidth
public int getIconWidth()Description copied from interface:ILcdIcon
Returns the fixed width of the icon.- Specified by:
getIconWidth
in interfaceILcdIcon
- Returns:
- the fixed width of the icon.
-
getIconHeight
public int getIconHeight()Description copied from interface:ILcdIcon
Returns the fixed height of the icon.- Specified by:
getIconHeight
in interfaceILcdIcon
- Returns:
- the fixed height of the icon.
-
getSourceName
Returns the source name of the icon.- Returns:
- the source name of the icon.
-
getDefaultLineColor
Return the default line color. This is the first non-null line color encountered for a shape in the icon.- Returns:
- the default line color.
-
getDefaultFillColor
Return the default fill color. This is the first non-null fill color encountered for a closed shape in the icon.- Returns:
- the default fill color.
-
clone
Description copied from interface:ILcdCloneable
Makes
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:
clone
in interfaceILcdCloneable
- Overrides:
clone
in classObject
- See Also:
-