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 class
An icon implementation that renders a border on another icon.static class
An icon implementation that draws two icons.static class
An icon implementation that draws two icons.static class
An icon implementation that uses a JLabel.static class
A simple icon implementation to draw a given shape in a given color in a given size.static class
An icon implementation that renders a border on another icon.static class
An icon implementation that stretches another icon to specified with. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic RMIconUtils.CompositeIcon2
getCompositeIcon
(Icon anIcon1, Icon anIcon2, int anX, int aY) Returns a composite icon for original icon and new icon at x,y.static Icon
Returns an icon for the given shape, color and size.static BufferedImage
Returns an image for the given shape, image size and color.static ImageIcon
getImageIcon
(Shape aShape, Color aColor, int aWidth, int aHeight) Returns an image icon for the given shape, color and size.static ImageIcon
getImageIcon
(Icon anIcon) Returns an image icon for given icon.static ImageIcon
getImageIcon
(Icon anIcon, int aWidth, int aHeight) Returns an image icon for given icon.static void
setButtonIconAsLabelIcon
(AbstractButton aButton) Set button icon.static void
setRolloverIcons
(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
(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.
-