src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/WindowsIconFactory.java

Print this page




 304                 g.setColor(UIManager.getColor("InternalFrame.resizeIconHighlight"));
 305                 g.drawLine(0, 11, 11, 0);
 306                 g.drawLine(4, 11, 11, 4);
 307                 g.drawLine(8, 11, 11, 8);
 308 
 309                 g.setColor(UIManager.getColor("InternalFrame.resizeIconShadow"));
 310                 g.drawLine(1, 11, 11, 1);
 311                 g.drawLine(2, 11, 11, 2);
 312                 g.drawLine(5, 11, 11, 5);
 313                 g.drawLine(6, 11, 11, 6);
 314                 g.drawLine(9, 11, 11, 9);
 315                 g.drawLine(10, 11, 11, 10);
 316             }
 317             public int getIconWidth() { return 13; }
 318             public int getIconHeight() { return 13; }
 319         };
 320 
 321     @SuppressWarnings("serial") // Same-version serialization only
 322     private static class CheckBoxIcon implements Icon, Serializable
 323     {
 324         final static int csize = 13;
 325         public void paintIcon(Component c, Graphics g, int x, int y) {
 326             JCheckBox cb = (JCheckBox) c;
 327             ButtonModel model = cb.getModel();
 328             XPStyle xp = XPStyle.getXP();
 329 
 330             if (xp != null) {
 331                 State state;
 332                 if (model.isSelected()) {
 333                     state = State.CHECKEDNORMAL;
 334                     if (!model.isEnabled()) {
 335                         state = State.CHECKEDDISABLED;
 336                     } else if (model.isPressed() && model.isArmed()) {
 337                         state = State.CHECKEDPRESSED;
 338                     } else if (model.isRollover()) {
 339                         state = State.CHECKEDHOT;
 340                     }
 341                 } else {
 342                     state = State.UNCHECKEDNORMAL;
 343                     if (!model.isEnabled()) {
 344                         state = State.UNCHECKEDDISABLED;




 304                 g.setColor(UIManager.getColor("InternalFrame.resizeIconHighlight"));
 305                 g.drawLine(0, 11, 11, 0);
 306                 g.drawLine(4, 11, 11, 4);
 307                 g.drawLine(8, 11, 11, 8);
 308 
 309                 g.setColor(UIManager.getColor("InternalFrame.resizeIconShadow"));
 310                 g.drawLine(1, 11, 11, 1);
 311                 g.drawLine(2, 11, 11, 2);
 312                 g.drawLine(5, 11, 11, 5);
 313                 g.drawLine(6, 11, 11, 6);
 314                 g.drawLine(9, 11, 11, 9);
 315                 g.drawLine(10, 11, 11, 10);
 316             }
 317             public int getIconWidth() { return 13; }
 318             public int getIconHeight() { return 13; }
 319         };
 320 
 321     @SuppressWarnings("serial") // Same-version serialization only
 322     private static class CheckBoxIcon implements Icon, Serializable
 323     {
 324         static final int csize = 13;
 325         public void paintIcon(Component c, Graphics g, int x, int y) {
 326             JCheckBox cb = (JCheckBox) c;
 327             ButtonModel model = cb.getModel();
 328             XPStyle xp = XPStyle.getXP();
 329 
 330             if (xp != null) {
 331                 State state;
 332                 if (model.isSelected()) {
 333                     state = State.CHECKEDNORMAL;
 334                     if (!model.isEnabled()) {
 335                         state = State.CHECKEDDISABLED;
 336                     } else if (model.isPressed() && model.isArmed()) {
 337                         state = State.CHECKEDPRESSED;
 338                     } else if (model.isRollover()) {
 339                         state = State.CHECKEDHOT;
 340                     }
 341                 } else {
 342                     state = State.UNCHECKEDNORMAL;
 343                     if (!model.isEnabled()) {
 344                         state = State.UNCHECKEDDISABLED;