Class LayeredIcon
- java.lang.Object
-
- org.pushingpixels.radiance.component.api.common.icon.LayeredIcon
-
- All Implemented Interfaces:
javax.swing.Icon
,RadianceIcon
public class LayeredIcon extends java.lang.Object implements RadianceIcon
Decorator icon that layers icons one on top of the other. The original icons are drawn and resized together as one layered stack.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.pushingpixels.radiance.common.api.icon.RadianceIcon
RadianceIcon.ColorFilter, RadianceIcon.Factory
-
-
Field Summary
Fields Modifier and Type Field Description protected RadianceIcon[]
layers
The layer icons.
-
Constructor Summary
Constructors Constructor Description LayeredIcon(RadianceIcon... layers)
Creates a new layered icon.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getIconHeight()
int
getIconWidth()
void
paintIcon(java.awt.Component c, java.awt.Graphics g, int x, int y)
void
setColorFilter(RadianceIcon.ColorFilter colorFilter)
void
setDimension(java.awt.Dimension newDimension)
Changes the dimension ofthis
icon.boolean
supportsColorFilter()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.pushingpixels.radiance.common.api.icon.RadianceIcon
toImage
-
-
-
-
Field Detail
-
layers
protected RadianceIcon[] layers
The layer icons.
-
-
Constructor Detail
-
LayeredIcon
public LayeredIcon(RadianceIcon... layers)
Creates a new layered icon.- Parameters:
layers
- Layer icons.
-
-
Method Detail
-
setDimension
public void setDimension(java.awt.Dimension newDimension)
Description copied from interface:RadianceIcon
Changes the dimension ofthis
icon.- Specified by:
setDimension
in interfaceRadianceIcon
- Parameters:
newDimension
- New dimension forthis
icon.
-
supportsColorFilter
public boolean supportsColorFilter()
- Specified by:
supportsColorFilter
in interfaceRadianceIcon
-
setColorFilter
public void setColorFilter(RadianceIcon.ColorFilter colorFilter)
- Specified by:
setColorFilter
in interfaceRadianceIcon
-
getIconHeight
public int getIconHeight()
- Specified by:
getIconHeight
in interfacejavax.swing.Icon
-
getIconWidth
public int getIconWidth()
- Specified by:
getIconWidth
in interfacejavax.swing.Icon
-
paintIcon
public void paintIcon(java.awt.Component c, java.awt.Graphics g, int x, int y)
- Specified by:
paintIcon
in interfacejavax.swing.Icon
-
-