Package com.jidesoft.icons
Class MenuCheckIcon
- java.lang.Object
-
- com.jidesoft.icons.MenuCheckIcon
-
- All Implemented Interfaces:
java.io.Serializable,javax.swing.Icon,javax.swing.plaf.UIResource
public class MenuCheckIcon extends java.lang.Object implements javax.swing.Icon, javax.swing.plaf.UIResource, java.io.SerializableIcon wrapper class for check icons. The only thing this class does is to check the selection before it really paints its wrapped icon. The reason we provide this class is that similar mechanism resides in Swing and we cannot override it. So if we just update the UI with normal icons, the icon could be displayed unexpectedly. With this icon wrapper class, you can get exactly the same behavior with Swing default icons.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description MenuCheckIcon(javax.swing.ImageIcon icon)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetIconHeight()intgetIconWidth()voidpaintIcon(java.awt.Component c, java.awt.Graphics g, int x, int y)
-
-
-
Method Detail
-
getIconHeight
public int getIconHeight()
- Specified by:
getIconHeightin interfacejavax.swing.Icon
-
getIconWidth
public int getIconWidth()
- Specified by:
getIconWidthin interfacejavax.swing.Icon
-
paintIcon
public void paintIcon(java.awt.Component c, java.awt.Graphics g, int x, int y)- Specified by:
paintIconin interfacejavax.swing.Icon
-
-