public class TextOverlayIcon extends ImageIcon
Note: it appears that you need to extend ImageIcon
in order to have
Swing render "disabled" (= grayed out) versions of this icon. There is no
other reason to do this.
ImageIcon.AccessibleImageIcon
Constructor and Description |
---|
TextOverlayIcon(Icon aIcon,
String aTextOverlay)
Creates a new TextOverlayIcon instance, placing the text in the center of
the icon.
|
TextOverlayIcon(Icon aIcon,
String aTextOverlay,
int aPosition)
Creates a new TextOverlayIcon instance, placing the text at the given
position.
|
getAccessibleContext, getDescription, getIconHeight, getIconWidth, getImage, getImageLoadStatus, getImageObserver, loadImage, paintIcon, setDescription, setImage, setImageObserver, toString
public TextOverlayIcon(Icon aIcon, String aTextOverlay)
aIcon
- the icon that should be overlayed;aTextOverlay
- the text that is to overlayed;public TextOverlayIcon(Icon aIcon, String aTextOverlay, int aPosition)
aIcon
- the icon that should be overlayed;aTextOverlay
- the text that is to overlayed;aPosition
- on of the SwingConstants
values that denotes the overlay
position.Copyright © 2015 L'Xtreme IT consultancy. All rights reserved.