Class RMIconUtils


  • public class RMIconUtils
    extends java.lang.Object
    Some useful Icon utilities and subclasses.
    • Constructor Summary

      Constructors 
      Constructor Description
      RMIconUtils()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static RMIconUtils.CompositeIcon2 getCompositeIcon​(javax.swing.Icon anIcon1, javax.swing.Icon anIcon2, int anX, int aY)
      Returns a composite icon for original icon and new icon at x,y.
      static javax.swing.Icon getIcon​(java.awt.Shape aShape, java.awt.Color aColor, int aWidth, int aHeight)
      Returns an icon for the given shape, color and size.
      static java.awt.image.BufferedImage getImage​(javax.swing.Icon anIcon, int aWidth, int aHeight)
      Returns an image for the given shape, image size and color.
      static javax.swing.ImageIcon getImageIcon​(java.awt.Shape aShape, java.awt.Color aColor, int aWidth, int aHeight)
      Returns an image icon for the given shape, color and size.
      static javax.swing.ImageIcon getImageIcon​(javax.swing.Icon anIcon)
      Returns an image icon for given icon.
      static javax.swing.ImageIcon getImageIcon​(javax.swing.Icon anIcon, int aWidth, int aHeight)
      Returns an image icon for given icon.
      static void setButtonIconAsLabelIcon​(javax.swing.AbstractButton aButton)
      Set button icon.
      static void setRolloverIcons​(javax.swing.AbstractButton aButton, boolean doSelected)
      A convenience method for setting roll-over, pressed and selected icons for a tool bar button with just an icon.
      static void setRolloverIcons​(javax.swing.AbstractButton aButton, boolean doSelected, int w, int h)
      A convenience method for setting roll-over, pressed and selected icons for a tool bar button with just an icon.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • RMIconUtils

        public RMIconUtils()
    • Method Detail

      • getIcon

        public static javax.swing.Icon getIcon​(java.awt.Shape aShape,
                                               java.awt.Color aColor,
                                               int aWidth,
                                               int aHeight)
        Returns an icon for the given shape, color and size.
      • getImageIcon

        public static javax.swing.ImageIcon getImageIcon​(java.awt.Shape aShape,
                                                         java.awt.Color aColor,
                                                         int aWidth,
                                                         int aHeight)
        Returns an image icon for the given shape, color and size.
      • getImageIcon

        public static javax.swing.ImageIcon getImageIcon​(javax.swing.Icon anIcon)
        Returns an image icon for given icon.
      • getImageIcon

        public static javax.swing.ImageIcon getImageIcon​(javax.swing.Icon anIcon,
                                                         int aWidth,
                                                         int aHeight)
        Returns an image icon for given icon.
      • getImage

        public static java.awt.image.BufferedImage getImage​(javax.swing.Icon anIcon,
                                                            int aWidth,
                                                            int aHeight)
        Returns an image for the given shape, image size and color.
      • setRolloverIcons

        public static void setRolloverIcons​(javax.swing.AbstractButton aButton,
                                            boolean doSelected)
        A convenience method for setting roll-over, pressed and selected icons for a tool bar button with just an icon.
      • setRolloverIcons

        public static void setRolloverIcons​(javax.swing.AbstractButton aButton,
                                            boolean doSelected,
                                            int w,
                                            int h)
        A convenience method for setting roll-over, pressed and selected icons for a tool bar button with just an icon.
      • getCompositeIcon

        public static RMIconUtils.CompositeIcon2 getCompositeIcon​(javax.swing.Icon anIcon1,
                                                                  javax.swing.Icon anIcon2,
                                                                  int anX,
                                                                  int aY)
        Returns a composite icon for original icon and new icon at x,y.
      • setButtonIconAsLabelIcon

        public static void setButtonIconAsLabelIcon​(javax.swing.AbstractButton aButton)
        Set button icon.