Package com.luciad.gui
Class TLcdAnchoredIcon
java.lang.Object
com.luciad.gui.TLcdAnchoredIcon
- All Implemented Interfaces:
ILcdAnchoredIcon
,ILcdIcon
,ILcdCloneable
,Serializable
,Cloneable
This ILcdAnchoredIcon wraps an icon, and can provide an anchor point.
- See Also:
-
Constructor Summary
ConstructorDescriptionTLcdAnchoredIcon
(ILcdIcon aDelegateIcon) Create a new anchored icon based on the given icon, with the anchor point in the center of the icon.TLcdAnchoredIcon
(ILcdIcon aDelegateIcon, Point aAnchorPoint) Create a new anchored icon based on the given icon, with the given anchor point. -
Method Summary
Modifier and TypeMethodDescriptionvoid
anchorPointSFCT
(Point aPointSFCT) Updates the given point to the location of the icon's anchor point, in relative coordinates with respect to the top left.clone()
MakesObject.clone()
public.boolean
int
Returns the fixed height of the icon.int
Returns the fixed width of the icon.int
hashCode()
void
Draw theILcdIcon
at the specified location.void
setAnchorPoint
(Point aAnchorPoint) Sets the anchor point of this icon.toString()
-
Constructor Details
-
TLcdAnchoredIcon
Create a new anchored icon based on the given icon, with the anchor point in the center of the icon.- Parameters:
aDelegateIcon
- a given icon.
-
TLcdAnchoredIcon
Create a new anchored icon based on the given icon, with the given anchor point.- Parameters:
aDelegateIcon
- a given icon.aAnchorPoint
- a given anchor point.
-
-
Method Details
-
setAnchorPoint
Sets the anchor point of this icon.- Parameters:
aAnchorPoint
- the new anchor point for this icon.
-
anchorPointSFCT
Description copied from interface:ILcdAnchoredIcon
Updates the given point to the location of the icon's anchor point, in relative coordinates with respect to the top left. The x-coordinate of the anchor point typically lies between 0 and getWidth(). The y-coordinate typically lies between 0 and getHeight().- Specified by:
anchorPointSFCT
in interfaceILcdAnchoredIcon
- Parameters:
aPointSFCT
- the point that has to be moved to the location of the anchor point of this icon.
-
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:
c
- a Component to retrieve properties from.g
- the Graphics on which the icon will be painted.x
- the x position where the icon will be painted. x is the first coordinate of the top left corner point of the icon.y
- 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.
-
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:
-
toString
-
equals
-
hashCode
public int hashCode()
-