public class TLcdCompositeIcon extends Object implements ILcdResizeableIcon, Cloneable
ILcdResizeableIcon
composed from multiple ILcdResizeableIcon
s.Constructor and Description |
---|
TLcdCompositeIcon() |
Modifier and Type | Method and Description |
---|---|
void |
addIcon(ILcdResizeableIcon aIcon)
Add an icon.
|
Object |
clone()
Makes
Object.clone() public. |
boolean |
equals(Object o) |
ILcdResizeableIcon |
getIcon(int aIndex)
Get the sub icon at the given index.
|
int |
getIconCount()
Get number of sub icons.
|
int |
getIconHeight()
Returns the fixed height of the icon.
|
int |
getIconWidth()
Returns the fixed width of the icon.
|
int |
hashCode() |
void |
paintIcon(Component aComponent,
Graphics aGraphics,
int aX,
int aY)
Draw the
ILcdIcon at the specified location. |
void |
removeAll()
Remove all icons.
|
void |
removeIcon(ILcdResizeableIcon aIcon)
Remove an icon.
|
void |
setIconHeight(int aHeight)
Set the height of the icon.
|
void |
setIconWidth(int aWidth)
Set the width of the icon.
|
public void addIcon(ILcdResizeableIcon aIcon)
aIcon
- an ILcdResizeableIcon.public void removeIcon(ILcdResizeableIcon aIcon)
aIcon
- an ILcdResizeableIcon.public void removeAll()
public int getIconCount()
public ILcdResizeableIcon getIcon(int aIndex)
aIndex
- the index.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()
public int getIconHeight()
ILcdIcon
getIconHeight
in interface ILcdIcon
public int getIconWidth()
ILcdIcon
getIconWidth
in interface ILcdIcon
public void setIconWidth(int aWidth)
ILcdResizeableIcon
setIconWidth
in interface ILcdResizeableIcon
aWidth
- the new width.public void setIconHeight(int aHeight)
ILcdResizeableIcon
setIconHeight
in interface ILcdResizeableIcon
aHeight
- the new height.public void paintIcon(Component aComponent, Graphics aGraphics, int aX, int aY)
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
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.