public class TLcdAnchoredIcon extends Object implements ILcdAnchoredIcon, ILcdCloneable
Constructor and Description |
---|
TLcdAnchoredIcon(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.
|
Modifier and Type | Method and Description |
---|---|
void |
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.
|
Object |
clone()
Makes
Object.clone() public. |
boolean |
equals(Object o) |
int |
getIconHeight()
Returns the fixed height of the icon.
|
int |
getIconWidth()
Returns the fixed width of the icon.
|
int |
hashCode() |
void |
paintIcon(Component c,
Graphics g,
int x,
int y)
Draw the
ILcdIcon at the specified location. |
void |
setAnchorPoint(Point aAnchorPoint)
Sets the anchor point of this icon.
|
String |
toString() |
public TLcdAnchoredIcon(ILcdIcon aDelegateIcon)
aDelegateIcon
- a given icon.public void setAnchorPoint(Point aAnchorPoint)
aAnchorPoint
- the new anchor point for this icon.public void anchorPointSFCT(Point aPointSFCT)
ILcdAnchoredIcon
anchorPointSFCT
in interface ILcdAnchoredIcon
aPointSFCT
- the point that has to be moved to the location of the anchor point
of this icon.public void paintIcon(Component c, Graphics g, int x, int y)
ILcdIcon
ILcdIcon
at the specified location. ILcdIcon
implementations
may use the Component
argument to get properties useful for
painting, e.g. the foreground or background color.paintIcon
in interface ILcdIcon
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.public int getIconWidth()
ILcdIcon
getIconWidth
in interface ILcdIcon
public int getIconHeight()
ILcdIcon
getIconHeight
in interface ILcdIcon
public Object clone()
ILcdCloneable
Makes Object.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 );
}
}
clone
in interface ILcdCloneable
clone
in class Object
Object.clone()