Class AlphaCompositeIcon

java.lang.Object
com.nomagic.ui.AlphaCompositeIcon
All Implemented Interfaces:
ResizableIcon, Cloneable, Icon

@OpenApiAll public class AlphaCompositeIcon extends Object implements ResizableIcon
Paints wrapped icon with alpha composite.
  • Constructor Details

    • AlphaCompositeIcon

      public AlphaCompositeIcon(Icon icon)
    • AlphaCompositeIcon

      public AlphaCompositeIcon(Icon icon, Composite composite)
  • Method Details

    • paintIcon

      public void paintIcon(Component c, Graphics g, int x, int y)
      Specified by:
      paintIcon in interface Icon
    • paintIcon

      public void paintIcon(@CheckForNull Component c, 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 interface ResizableIcon
      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 interface ResizableIcon
      Overrides:
      clone in class Object
      Returns:
      cloned instance.
    • getIconWidth

      public int getIconWidth()
      Specified by:
      getIconWidth in interface Icon
    • getIconHeight

      public int getIconHeight()
      Specified by:
      getIconHeight in interface Icon