Package com.inductiveautomation.rm.swing
Class RMIconUtils
java.lang.Object
com.inductiveautomation.rm.swing.RMIconUtils
Some useful Icon utilities and subclasses.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classAn icon implementation that renders a border on another icon.static classAn icon implementation that draws two icons.static classAn icon implementation that draws two icons.static classAn icon implementation that uses a JLabel.static classA simple icon implementation to draw a given shape in a given color in a given size.static classAn icon implementation that renders a border on another icon.static classAn icon implementation that stretches another icon to specified with. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic RMIconUtils.CompositeIcon2getCompositeIcon(Icon anIcon1, Icon anIcon2, int anX, int aY) Returns a composite icon for original icon and new icon at x,y.static IconReturns an icon for the given shape, color and size.static BufferedImageReturns an image for the given shape, image size and color.static ImageIcongetImageIcon(Shape aShape, Color aColor, int aWidth, int aHeight) Returns an image icon for the given shape, color and size.static ImageIcongetImageIcon(Icon anIcon) Returns an image icon for given icon.static ImageIcongetImageIcon(Icon anIcon, int aWidth, int aHeight) Returns an image icon for given icon.static voidsetButtonIconAsLabelIcon(AbstractButton aButton) Set button icon.static voidsetRolloverIcons(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 voidsetRolloverIcons(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.
-
Constructor Details
-
RMIconUtils
public RMIconUtils()
-
-
Method Details
-
getIcon
Returns an icon for the given shape, color and size. -
getImageIcon
Returns an image icon for the given shape, color and size. -
getImageIcon
Returns an image icon for given icon. -
getImageIcon
Returns an image icon for given icon. -
getImage
Returns an image for the given shape, image size and color. -
setRolloverIcons
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(@Nonnull 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(Icon anIcon1, Icon anIcon2, int anX, int aY) Returns a composite icon for original icon and new icon at x,y. -
setButtonIconAsLabelIcon
Set button icon.
-