src/share/classes/com/sun/java/swing/plaf/windows/WindowsIconFactory.java
Print this page
*** 690,700 ****
public Icon getIcon(String type) {
return new VistaMenuItemCheckIcon(type);
}
static int getIconWidth() {
! return XPStyle.getXP().getSkin(null, Part.MP_POPUPCHECK).getWidth()
+ 2 * OFFSET;
}
private static Class<? extends JMenuItem> getType(Component c) {
Class<? extends JMenuItem> rv = null;
--- 690,701 ----
public Icon getIcon(String type) {
return new VistaMenuItemCheckIcon(type);
}
static int getIconWidth() {
! XPStyle xp = XPStyle.getXP();
! return ((xp != null) ? xp.getSkin(null, Part.MP_POPUPCHECK).getWidth() : 16)
+ 2 * OFFSET;
}
private static Class<? extends JMenuItem> getType(Component c) {
Class<? extends JMenuItem> rv = null;
*** 756,768 ****
Icon icon = getIcon();
int height = 0;
if (icon != null) {
height = icon.getIconHeight() + 2 * OFFSET;
} else {
! Skin skin =
! XPStyle.getXP().getSkin(null, Part.MP_POPUPCHECK);
height = skin.getHeight() + 2 * OFFSET;
}
return height;
}
public int getIconWidth() {
--- 757,773 ----
Icon icon = getIcon();
int height = 0;
if (icon != null) {
height = icon.getIconHeight() + 2 * OFFSET;
} else {
! XPStyle xp = XPStyle.getXP();
! if (xp != null) {
! Skin skin = xp.getSkin(null, Part.MP_POPUPCHECK);
height = skin.getHeight() + 2 * OFFSET;
+ } else {
+ height = 16 + 2 * OFFSET;
+ }
}
return height;
}
public int getIconWidth() {