org.jhotdraw.gui.plaf.palette
Class MultiIcon
- java.lang.Object
-
- org.jhotdraw.gui.plaf.palette.MultiIcon
-
- All Implemented Interfaces:
- javax.swing.Icon
- Direct Known Subclasses:
- PaletteSliderThumbIcon
public abstract class MultiIcon extends java.lang.Object implements javax.swing.IconAn icon which paints one out of multiple icons depending on the state of the component. MultiIcon can lazily create the icons from a tiled image.
-
-
Constructor Summary
Constructors Constructor and Description MultiIcon(javax.swing.Icon[] icons)Creates a new instance from an array of icons.MultiIcon(java.awt.Image[] images)Creates a new instance from an array of images.MultiIcon(java.awt.Image tiledImage, int tileCount, boolean isTiledHorizontaly)Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description intgetIconHeight()intgetIconWidth()voidpaintIcon(java.awt.Component c, java.awt.Graphics g, int x, int y)
-
-
-
Constructor Detail
-
MultiIcon
public MultiIcon(javax.swing.Icon[] icons)
Creates a new instance from an array of icons. All icons must have the same dimensions. If an icon is null, an icon is derived for the state from the other icons.
-
MultiIcon
public MultiIcon(java.awt.Image[] images)
Creates a new instance from an array of images. All icons must have the same dimensions. If an icon is null, an icon is derived for the state from the other icons.
-
MultiIcon
public MultiIcon(java.awt.Image tiledImage, int tileCount, boolean isTiledHorizontaly)Creates a new instance. The icon representations are created lazily from the tiled image.
-
-
Method Detail
-
getIconHeight
public int getIconHeight()
- Specified by:
getIconHeightin interfacejavax.swing.Icon
-
getIconWidth
public int getIconWidth()
- Specified by:
getIconWidthin interfacejavax.swing.Icon
-
paintIcon
public void paintIcon(java.awt.Component c, java.awt.Graphics g, int x, int y)- Specified by:
paintIconin interfacejavax.swing.Icon
-
-
DataMelt 3.0 © DataMelt by jWork.ORG