Package com.nomagic.ui
Class AlphaCompositeIcon
- java.lang.Object
-
- com.nomagic.ui.AlphaCompositeIcon
-
- All Implemented Interfaces:
ResizableIcon
,java.lang.Cloneable
,javax.swing.Icon
@OpenApiAll public class AlphaCompositeIcon extends java.lang.Object implements ResizableIcon
Paints wrapped icon with alpha composite.
-
-
Constructor Summary
Constructors Constructor Description AlphaCompositeIcon(javax.swing.Icon icon)
AlphaCompositeIcon(javax.swing.Icon icon, java.awt.Composite composite)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AlphaCompositeIcon
clone()
Returns cloned instance of this icon.int
getIconHeight()
int
getIconWidth()
void
paintIcon(java.awt.Component c, java.awt.Graphics g, int x, int y)
void
paintIcon(java.awt.Component c, java.awt.Graphics g, int x, int y, int w, int h)
Draw the icon in the given bounds.
-
-
-
Method Detail
-
paintIcon
public void paintIcon(java.awt.Component c, java.awt.Graphics g, int x, int y)
- Specified by:
paintIcon
in interfacejavax.swing.Icon
-
paintIcon
public void paintIcon(@CheckForNull java.awt.Component c, java.awt.Graphics g, int x, int y, int w, int h)
Description copied from interface:ResizableIcon
Draw the icon in the given bounds. Icon implementations may use the Component argument to get properties useful for painting, e.g. the foreground or background color.- Specified by:
paintIcon
in interfaceResizableIcon
- Parameters:
c
- the given component.g
- the graphics to paint on.x
- x coordinate.y
- y coordinate.w
- width to paint.h
- height to paint.
-
clone
public AlphaCompositeIcon clone()
Description copied from interface:ResizableIcon
Returns cloned instance of this icon.- Specified by:
clone
in interfaceResizableIcon
- Overrides:
clone
in classjava.lang.Object
- Returns:
- cloned instance.
-
getIconWidth
public int getIconWidth()
- Specified by:
getIconWidth
in interfacejavax.swing.Icon
-
getIconHeight
public int getIconHeight()
- Specified by:
getIconHeight
in interfacejavax.swing.Icon
-
-