Class DecoratableIcon
java.lang.Object
org.fife.rsta.ac.java.DecoratableIcon
- All Implemented Interfaces:
Icon
-
Field Summary
FieldsModifier and TypeFieldDescriptionThe "decoration" icons.private static final intThe width of a decoratable icon (16 + 8 + 8, - 8 for overlap).private booleanWhether this icon is for a "deprecated" item.private IconThe "main" icon (the icon that is decorated).private intThe width of this icon. -
Constructor Summary
ConstructorsConstructorDescriptionDecoratableIcon(int width, Icon mainIcon) Constructor.DecoratableIcon(Icon mainIcon) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddDecorationIcon(Icon decoration) Adds a decoration icon.intintvoidvoidsetDeprecated(boolean deprecated) Sets whether this icon is for a deprecated item.voidsetMainIcon(Icon icon) Sets the main icon.
-
Field Details
-
width
private int widthThe width of this icon. -
mainIcon
The "main" icon (the icon that is decorated). -
decorations
-
deprecated
private boolean deprecatedWhether this icon is for a "deprecated" item. -
DEFAULT_WIDTH
private static final int DEFAULT_WIDTHThe width of a decoratable icon (16 + 8 + 8, - 8 for overlap).- See Also:
-
-
Constructor Details
-
DecoratableIcon
Constructor.- Parameters:
mainIcon- The "main" icon. This cannot benull.
-
DecoratableIcon
Constructor.- Parameters:
width- The width for this icon.mainIcon- The "main" icon. This cannot benull.
-
-
Method Details
-
addDecorationIcon
Adds a decoration icon.- Parameters:
decoration- A new decoration icon. This cannot benull.- See Also:
-
getIconHeight
public int getIconHeight()- Specified by:
getIconHeightin interfaceIcon
-
getIconWidth
public int getIconWidth()- Specified by:
getIconWidthin interfaceIcon
-
paintIcon
-
setDeprecated
public void setDeprecated(boolean deprecated) Sets whether this icon is for a deprecated item.- Parameters:
deprecated- Whether this icon is for a deprecated item.
-
setMainIcon
Sets the main icon.- Parameters:
icon- The "main" icon. This cannot benull.- See Also:
-