Package ca.cgjennings.ui.theme
Class PaintSampleIcon
- java.lang.Object
-
- ca.cgjennings.ui.theme.AbstractThemedIcon
-
- ca.cgjennings.ui.theme.PaintSampleIcon
-
- All Implemented Interfaces:
ThemedIcon
,javax.swing.Icon
public class PaintSampleIcon extends AbstractThemedIcon
Icon that shows what a paint looks like by using it to fill a shape.- Author:
- Chris Jennings
-
-
Field Summary
-
Fields inherited from class ca.cgjennings.ui.theme.AbstractThemedIcon
disabled, height, 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 PaintSampleIcon(java.awt.Paint paint)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PaintSampleIcon
derive(int newWidth, int newHeight)
Returns a new icon that renders the same image as this icon, but at a different size.protected void
paintIcon(java.awt.Component c, java.awt.Graphics2D g, int x, int y)
-
Methods inherited from class ca.cgjennings.ui.theme.AbstractThemedIcon
disabled, getIconHeight, getIconWidth, paintIcon, 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, gigantic, large, medium, mediumLarge, mediumSmall, small, tiny, veryLarge
-
-
-
-
Method Detail
-
derive
public PaintSampleIcon derive(int newWidth, int newHeight)
Description copied from interface:ThemedIcon
Returns a new icon that renders the same image as this icon, but at a different size.- Parameters:
newWidth
- the new width ≥ 1newHeight
- the new height ≥ 1- Returns:
- an icon with the revised dimensions
-
paintIcon
protected void paintIcon(java.awt.Component c, java.awt.Graphics2D g, int x, int y)
- Specified by:
paintIcon
in classAbstractThemedIcon
-
-