public class DecoratableIcon
extends java.lang.Object
implements javax.swing.Icon
| Constructor and Description |
|---|
DecoratableIcon(javax.swing.Icon mainIcon)
Constructor.
|
DecoratableIcon(int width,
javax.swing.Icon mainIcon)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addDecorationIcon(javax.swing.Icon decoration)
Adds a decoration icon.
|
int |
getIconHeight() |
int |
getIconWidth() |
void |
paintIcon(java.awt.Component c,
java.awt.Graphics g,
int x,
int y) |
void |
setDeprecated(boolean deprecated)
Sets whether this icon is for a deprecated item.
|
void |
setMainIcon(javax.swing.Icon icon)
Sets the main icon.
|
public DecoratableIcon(javax.swing.Icon mainIcon)
mainIcon - The "main" icon. This cannot be null.public DecoratableIcon(int width,
javax.swing.Icon mainIcon)
width - The width for this icon.mainIcon - The "main" icon. This cannot be null.public void addDecorationIcon(javax.swing.Icon decoration)
decoration - A new decoration icon. This cannot be
null.setMainIcon(Icon)public int getIconHeight()
getIconHeight in interface javax.swing.Iconpublic int getIconWidth()
getIconWidth in interface javax.swing.Iconpublic void paintIcon(java.awt.Component c,
java.awt.Graphics g,
int x,
int y)
paintIcon in interface javax.swing.Iconpublic void setDeprecated(boolean deprecated)
deprecated - Whether this icon is for a deprecated item.public void setMainIcon(javax.swing.Icon icon)
icon - The "main" icon. This cannot be null.addDecorationIcon(Icon)