Package com.inductiveautomation.rm.swing
Class RMIconUtils
- java.lang.Object
-
- com.inductiveautomation.rm.swing.RMIconUtils
-
public class RMIconUtils extends java.lang.Object
Some useful Icon utilities and subclasses.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
RMIconUtils.BorderIcon
An icon implementation that renders a border on another icon.static class
RMIconUtils.CompositeIcon
An icon implementation that draws two icons.static class
RMIconUtils.CompositeIcon2
An icon implementation that draws two icons.static class
RMIconUtils.LabelIcon
An icon implementation that uses a JLabel.static class
RMIconUtils.ShapeIcon
A simple icon implementation to draw a given shape in a given color in a given size.static class
RMIconUtils.SpacerIcon
An icon implementation that renders a border on another icon.static class
RMIconUtils.StretcherIcon
An icon implementation that stretches another icon to specified with.
-
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.
-
-
-
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.
-
-