diff --git a/src/share/classes/com/sun/java/swing/plaf/motif/MotifGraphicsUtils.java b/src/share/classes/com/sun/java/swing/plaf/motif/MotifGraphicsUtils.java index d6783e7375dfb2fa294c9e3c736955a4faa7acce..31425407792b8cb1beb1e1fc1da08dec4d1291e6 100644 --- a/src/share/classes/com/sun/java/swing/plaf/motif/MotifGraphicsUtils.java +++ b/src/share/classes/com/sun/java/swing/plaf/motif/MotifGraphicsUtils.java @@ -225,15 +225,15 @@ public class MotifGraphicsUtils implements SwingConstants 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) { diff --git a/src/share/classes/com/sun/java/swing/plaf/motif/MotifInternalFrameTitlePane.java b/src/share/classes/com/sun/java/swing/plaf/motif/MotifInternalFrameTitlePane.java index 251555a592fbf6b8dd97c6836e63878e40565ab8..737a36d2eb56bc2022a3117c10413dc0747db325 100644 --- a/src/share/classes/com/sun/java/swing/plaf/motif/MotifInternalFrameTitlePane.java +++ b/src/share/classes/com/sun/java/swing/plaf/motif/MotifInternalFrameTitlePane.java @@ -86,18 +86,18 @@ public class MotifInternalFrameTitlePane protected void assembleSystemMenu() { systemMenu = new JPopupMenu(); - JMenuItem mi = (JMenuItem)systemMenu.add(new JMenuItem(restoreAction)); + JMenuItem mi = systemMenu.add(new JMenuItem(restoreAction)); mi.setMnemonic('R'); - mi = (JMenuItem) systemMenu.add(new JMenuItem(moveAction)); + mi = systemMenu.add(new JMenuItem(moveAction)); mi.setMnemonic('M'); - mi = (JMenuItem) systemMenu.add(new JMenuItem(sizeAction)); + mi = systemMenu.add(new JMenuItem(sizeAction)); mi.setMnemonic('S'); - mi = (JMenuItem) systemMenu.add(new JMenuItem(iconifyAction)); + mi = systemMenu.add(new JMenuItem(iconifyAction)); mi.setMnemonic('n'); - mi = (JMenuItem) systemMenu.add(new JMenuItem(maximizeAction)); + mi = systemMenu.add(new JMenuItem(maximizeAction)); mi.setMnemonic('x'); systemMenu.add(new JSeparator()); - mi = (JMenuItem) systemMenu.add(new JMenuItem(closeAction)); + mi = systemMenu.add(new JMenuItem(closeAction)); mi.setMnemonic('C'); systemButton = new SystemButton(); @@ -157,7 +157,7 @@ public class MotifInternalFrameTitlePane } public void propertyChange(PropertyChangeEvent evt) { - String prop = (String)evt.getPropertyName(); + String prop = evt.getPropertyName(); JInternalFrame f = (JInternalFrame)evt.getSource(); boolean value = false; if (JInternalFrame.IS_SELECTED_PROPERTY.equals(prop)) { diff --git a/src/share/classes/com/sun/java/swing/plaf/motif/MotifLookAndFeel.java b/src/share/classes/com/sun/java/swing/plaf/motif/MotifLookAndFeel.java index 63994ff67320566c18b709606409ea7d7e4d4269..fb12c25644f902ee76d3238ce35b76ed446d8b47 100644 --- a/src/share/classes/com/sun/java/swing/plaf/motif/MotifLookAndFeel.java +++ b/src/share/classes/com/sun/java/swing/plaf/motif/MotifLookAndFeel.java @@ -290,7 +290,7 @@ public class MotifLookAndFeel extends BasicLookAndFeel Object unselectedTabBackground = new UIDefaults.LazyValue() { public Object createValue(UIDefaults table) { - Color c = (Color)table.getColor("control"); + Color c = table.getColor("control"); return new ColorUIResource(Math.max((int)(c.getRed()*.85),0), Math.max((int)(c.getGreen()*.85),0), Math.max((int)(c.getBlue()*.85),0)); @@ -299,7 +299,7 @@ public class MotifLookAndFeel extends BasicLookAndFeel Object unselectedTabForeground = new UIDefaults.LazyValue() { public Object createValue(UIDefaults table) { - Color c = (Color)table.getColor("controlText"); + Color c = table.getColor("controlText"); return new ColorUIResource(Math.max((int)(c.getRed()*.85),0), Math.max((int)(c.getGreen()*.85),0), Math.max((int)(c.getBlue()*.85),0)); @@ -308,7 +308,7 @@ public class MotifLookAndFeel extends BasicLookAndFeel Object unselectedTabShadow = new UIDefaults.LazyValue() { public Object createValue(UIDefaults table) { - Color c = (Color)table.getColor("control"); + Color c = table.getColor("control"); Color base = new Color(Math.max((int)(c.getRed()*.85),0), Math.max((int)(c.getGreen()*.85),0), Math.max((int)(c.getBlue()*.85),0)); @@ -318,7 +318,7 @@ public class MotifLookAndFeel extends BasicLookAndFeel Object unselectedTabHighlight = new UIDefaults.LazyValue() { public Object createValue(UIDefaults table) { - Color c = (Color)table.getColor("control"); + Color c = table.getColor("control"); Color base = new Color(Math.max((int)(c.getRed()*.85),0), Math.max((int)(c.getGreen()*.85),0), Math.max((int)(c.getBlue()*.85),0));