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 AlphaCompositeIconclone()Returns cloned instance of this icon.intgetIconHeight()intgetIconWidth()voidpaintIcon(java.awt.Component c, java.awt.Graphics g, int x, int y)voidpaintIcon(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:
paintIconin 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:ResizableIconDraw 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:
paintIconin 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:ResizableIconReturns cloned instance of this icon.- Specified by:
clonein interfaceResizableIcon- Overrides:
clonein classjava.lang.Object- Returns:
- cloned instance.
-
getIconWidth
public int getIconWidth()
- Specified by:
getIconWidthin interfacejavax.swing.Icon
-
getIconHeight
public int getIconHeight()
- Specified by:
getIconHeightin interfacejavax.swing.Icon
-
-