< prev index next >

src/share/classes/com/sun/java/swing/plaf/motif/MotifGraphicsUtils.java

Print this page
rev 1581 : 6693507: There are unnecessary compilation warnings in the com.sun.java.swing.plaf.motif package
Summary: Removed unnecessary castings and other warnings
Reviewed-by: peterz
Contributed-by: Florian Brunner <fbrunnerlist@gmx.ch>

*** 223,241 **** // Paint the Icon if(b.getIcon() != null) { Icon icon; if(!model.isEnabled()) { ! icon = (Icon) b.getDisabledIcon(); } else if(model.isPressed() && model.isArmed()) { ! icon = (Icon) b.getPressedIcon(); if(icon == null) { // Use default icon ! icon = (Icon) b.getIcon(); } } else { ! icon = (Icon) b.getIcon(); } if (icon!=null) { icon.paintIcon(c, g, iconRect.x, iconRect.y); } --- 223,241 ---- // Paint the Icon if(b.getIcon() != null) { Icon icon; if(!model.isEnabled()) { ! icon = b.getDisabledIcon(); } else if(model.isPressed() && model.isArmed()) { ! icon = b.getPressedIcon(); if(icon == null) { // Use default icon ! icon = b.getIcon(); } } else { ! icon = b.getIcon(); } if (icon!=null) { icon.paintIcon(c, g, iconRect.x, iconRect.y); }
< prev index next >