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