|
swingx Version 2005-08-19 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jdesktop.swingx.JavaBean
org.jdesktop.swingx.painter.AbstractPainter
org.jdesktop.swingx.painter.ImagePainter
org.jdesktop.swingx.painter.IconPainter
public class IconPainter
An ImagePainter subclass that provides convenience methods "setIcon" and "getIcon" to use Icons (and ImageIcons) rather than Images directly. Because this class uses "Icon" and because there is a "getImage" method from the parent class, sometimes an intermediate BufferedImage will be created to generate the image to return. This should be fairly performant, but will of course have some overhead. To avoid this overhead, use an ImageIcon where possible.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.jdesktop.swingx.painter.ImagePainter |
---|
ImagePainter.Style |
Constructor Summary | |
---|---|
IconPainter()
Create a new IconPainter |
|
IconPainter(Icon icon)
Create a new IconPainter with the specified icon. |
Method Summary | |
---|---|
Icon |
getIcon()
|
Image |
getImage()
|
void |
setIcon(Icon icon)
Set the icon to use. |
Methods inherited from class org.jdesktop.swingx.painter.ImagePainter |
---|
getImagePosition, getStyle, paintBackground, setImage, setImagePosition, setImageScale, setStyle |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public IconPainter()
public IconPainter(Icon icon)
icon
- the icon to be paintedMethod Detail |
---|
public void setIcon(Icon icon)
icon
- the Icon to usepublic Icon getIcon()
public Image getImage()
getImage
in class ImagePainter
|
swingx Version 2005-08-19 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |