org.argouml.swingext
Class DecoratedIcon
java.lang.Object
|
+--javax.swing.ImageIcon
|
+--org.argouml.swingext.DecoratedIcon
- All Implemented Interfaces:
- javax.accessibility.Accessible, javax.swing.Icon, java.io.Serializable
- Direct Known Subclasses:
- DropDownIcon
- public abstract class DecoratedIcon
- extends javax.swing.ImageIcon
The base class for adding simple decorations to existing icons.
This should be extended for each decoration style.
- See Also:
- Serialized Form
Fields inherited from class javax.swing.ImageIcon |
component, tracker |
Constructor Summary |
(package private) |
DecoratedIcon(javax.swing.ImageIcon imageIcon)
Construct a decorated icon made up of the given icon and decorated with
the icon defined in the descendant class. |
Method Summary |
protected void |
init(int[][] buffer)
|
void |
paintIcon(java.awt.Component c,
java.awt.Graphics g,
int x,
int y)
Paints the icon. |
Methods inherited from class javax.swing.ImageIcon |
getAccessibleContext, getDescription, getIconHeight, getIconWidth, getImage, getImageLoadStatus, getImageObserver, loadImage, setDescription, setImage, setImageObserver, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
ROLLOVER
public static final int ROLLOVER
- See Also:
- Constant Field Values
STANDARD
public static final int STANDARD
- See Also:
- Constant Field Values
_buffer
protected int[][] _buffer
_popupIconWidth
protected int _popupIconWidth
_popupIconHeight
protected int _popupIconHeight
_popupIconOffset
private int _popupIconOffset
_imageIcon
private javax.swing.ImageIcon _imageIcon
DecoratedIcon
DecoratedIcon(javax.swing.ImageIcon imageIcon)
- Construct a decorated icon made up of the given icon and decorated with
the icon defined in the descendant class.
init
protected void init(int[][] buffer)
paintIcon
public void paintIcon(java.awt.Component c,
java.awt.Graphics g,
int x,
int y)
- Paints the icon. The top-left corner of the icon is drawn at
the point (x, y) in the coordinate space of the graphics
context g. If this icon has no image observer, this method uses
the c component as the observer.
- Specified by:
paintIcon
in interface javax.swing.Icon
- Overrides:
paintIcon
in class javax.swing.ImageIcon
- Parameters:
c
- the component to be used as the observer if this icon
has no image observerg
- the graphics contextx
- the X coordinate of the icon's top-left cornery
- the Y coordinate of the icon's top-left corner