src/share/classes/com/sun/java/swing/plaf/windows/WindowsIconFactory.java
Print this page
*** 1,7 ****
/*
! * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
--- 1,7 ----
/*
! * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
*** 49,58 ****
--- 49,59 ----
*
* @author David Kloba
* @author Georges Saab
* @author Rich Schiavi
*/
+ @SuppressWarnings("serial") // Same-version serialization only
public class WindowsIconFactory implements Serializable
{
private static Icon frame_closeIcon;
private static Icon frame_iconifyIcon;
private static Icon frame_maxIcon;
*** 158,167 ****
--- 159,169 ----
frame_resizeIcon = new ResizeIcon();
return frame_resizeIcon;
}
+ @SuppressWarnings("serial") // Same-version serialization only
private static class FrameButtonIcon implements Icon, Serializable {
private Part part;
private FrameButtonIcon(Part part) {
this.part = part;
*** 294,303 ****
--- 296,306 ----
}
}
+ @SuppressWarnings("serial") // Same-version serialization only
private static class ResizeIcon implements Icon, Serializable {
public void paintIcon(Component c, Graphics g, int x, int y) {
g.setColor(UIManager.getColor("InternalFrame.resizeIconHighlight"));
g.drawLine(0, 11, 11, 0);
g.drawLine(4, 11, 11, 4);
*** 313,322 ****
--- 316,326 ----
}
public int getIconWidth() { return 13; }
public int getIconHeight() { return 13; }
};
+ @SuppressWarnings("serial") // Same-version serialization only
private static class CheckBoxIcon implements Icon, Serializable
{
final static int csize = 13;
public void paintIcon(Component c, Graphics g, int x, int y) {
JCheckBox cb = (JCheckBox) c;
*** 426,435 ****
--- 430,440 ----
return csize;
}
}
}
+ @SuppressWarnings("serial") // Same-version serialization only
private static class RadioButtonIcon implements Icon, UIResource, Serializable
{
public void paintIcon(Component c, Graphics g, int x, int y) {
AbstractButton b = (AbstractButton) c;
ButtonModel model = b.getModel();
*** 540,549 ****
--- 545,555 ----
}
}
} // end class RadioButtonIcon
+ @SuppressWarnings("serial") // Same-version serialization only
private static class CheckBoxMenuItemIcon implements Icon, UIResource, Serializable
{
public void paintIcon(Component c, Graphics g, int x, int y) {
AbstractButton b = (AbstractButton) c;
ButtonModel model = b.getModel();
*** 565,574 ****
--- 571,581 ----
public int getIconHeight() { return 9; }
} // End class CheckBoxMenuItemIcon
+ @SuppressWarnings("serial") // Same-version serialization only
private static class RadioButtonMenuItemIcon implements Icon, UIResource, Serializable
{
public void paintIcon(Component c, Graphics g, int x, int y) {
AbstractButton b = (AbstractButton) c;
ButtonModel model = b.getModel();
*** 581,590 ****
--- 588,598 ----
public int getIconHeight() { return 12; }
} // End class RadioButtonMenuItemIcon
+ @SuppressWarnings("serial") // Same-version serialization only
private static class MenuItemCheckIcon implements Icon, UIResource, Serializable{
public void paintIcon(Component c, Graphics g, int x, int y) {
/* For debugging:
Color oldColor = g.getColor();
g.setColor(Color.orange);
*** 595,604 ****
--- 603,613 ----
public int getIconWidth() { return 9; }
public int getIconHeight() { return 9; }
} // End class MenuItemCheckIcon
+ @SuppressWarnings("serial") // Same-version serialization only
private static class MenuItemArrowIcon implements Icon, UIResource, Serializable {
public void paintIcon(Component c, Graphics g, int x, int y) {
/* For debugging:
Color oldColor = g.getColor();
g.setColor(Color.green);
*** 609,618 ****
--- 618,628 ----
public int getIconWidth() { return 4; }
public int getIconHeight() { return 8; }
} // End class MenuItemArrowIcon
+ @SuppressWarnings("serial") // Same-version serialization only
private static class MenuArrowIcon implements Icon, UIResource, Serializable {
public void paintIcon(Component c, Graphics g, int x, int y) {
if (WindowsMenuItemUI.isVistaPainting()) {
XPStyle xp = XPStyle.getXP();
State state = State.NORMAL;
*** 720,729 ****
--- 730,740 ----
/**
* CheckIcon for JMenuItem, JMenu, JCheckBoxMenuItem and
* JRadioButtonMenuItem.
* Note: to be used on Vista only.
*/
+ @SuppressWarnings("serial") // Same-version serialization only
private static class VistaMenuItemCheckIcon
implements Icon, UIResource, Serializable {
private final JMenuItem menuItem;
private final Class<? extends JMenuItem> type;