Package ca.cgjennings.ui.theme
Class AbstractThemedIcon
- java.lang.Object
-
- ca.cgjennings.ui.theme.AbstractThemedIcon
-
- All Implemented Interfaces:
ThemedIcon
,javax.swing.Icon
- Direct Known Subclasses:
PaintSampleIcon
,ThemedGlyphIcon
,ThemedImageIcon
,ThemedSingleImageIcon
public abstract class AbstractThemedIcon extends java.lang.Object implements ThemedIcon
Abstract base class for themed icons.- Author:
- Chris Jennings
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
disabled
protected int
height
protected int
width
-
Fields inherited from interface ca.cgjennings.ui.theme.ThemedIcon
GIGANTIC, LARGE, MEDIUM, MEDIUM_LARGE, MEDIUM_SMALL, SMALL, TINY, VERY_LARGE
-
-
Constructor Summary
Constructors Constructor Description AbstractThemedIcon()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description ThemedIcon
disabled()
Returns a new icon that renders the same image as this icon, but as if for a permanently disabled component.int
getIconHeight()
int
getIconWidth()
protected abstract void
paintIcon(java.awt.Component c, java.awt.Graphics2D g, int x, int y)
void
paintIcon(java.awt.Component c, java.awt.Graphics g, int x, int y)
java.lang.String
toString()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface ca.cgjennings.ui.theme.ThemedIcon
derive, derive, gigantic, large, medium, mediumLarge, mediumSmall, small, tiny, veryLarge
-
-
-
-
Method Detail
-
disabled
public ThemedIcon disabled()
Description copied from interface:ThemedIcon
Returns a new icon that renders the same image as this icon, but as if for a permanently disabled component.- Specified by:
disabled
in interfaceThemedIcon
- Returns:
- a disabled verison of the icon
-
paintIcon
public final void paintIcon(java.awt.Component c, java.awt.Graphics g, int x, int y)
- Specified by:
paintIcon
in interfacejavax.swing.Icon
-
paintIcon
protected abstract void paintIcon(java.awt.Component c, java.awt.Graphics2D g, int x, int y)
-
getIconWidth
public int getIconWidth()
- Specified by:
getIconWidth
in interfacejavax.swing.Icon
-
getIconHeight
public int getIconHeight()
- Specified by:
getIconHeight
in interfacejavax.swing.Icon
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-