Index: trunk/src/org/openstreetmap/josm/actions/DialogsToggleAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/DialogsToggleAction.java	(revision 7743)
+++ trunk/src/org/openstreetmap/josm/actions/DialogsToggleAction.java	(revision 7746)
@@ -8,7 +8,6 @@
 import java.awt.event.KeyEvent;
 
-import javax.swing.Icon;
-
 import org.openstreetmap.josm.Main;
+import org.openstreetmap.josm.tools.ImageProvider;
 import org.openstreetmap.josm.tools.Shortcut;
 
@@ -25,5 +24,5 @@
     public DialogsToggleAction() {
         super(tr("Toggle dialogs panel"),
-              (Icon) null, /* no icon */
+              (ImageProvider) null, /* no icon */
               tr("Toggle dialogs panel, maximize mapview"),
               Shortcut.registerShortcut("menu:view:dialogspanel", tr("Toggle dialogs panel"),KeyEvent.VK_TAB, Shortcut.DIRECT),
Index: trunk/src/org/openstreetmap/josm/actions/ToggleAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/ToggleAction.java	(revision 7743)
+++ trunk/src/org/openstreetmap/josm/actions/ToggleAction.java	(revision 7746)
@@ -7,5 +7,4 @@
 
 import javax.swing.ButtonModel;
-import javax.swing.Icon;
 import javax.swing.JCheckBox;
 import javax.swing.JCheckBoxMenuItem;
@@ -15,4 +14,5 @@
 
 import org.openstreetmap.josm.Main;
+import org.openstreetmap.josm.tools.ImageProvider;
 import org.openstreetmap.josm.tools.Shortcut;
 
@@ -40,5 +40,5 @@
      * @param installAdapters false, if you don't want to install layer changed and selection changed adapters
      */
-    public ToggleAction(String name, Icon icon, String tooltip, Shortcut shortcut, boolean registerInToolbar, String toolbarId, boolean installAdapters) {
+    public ToggleAction(String name, ImageProvider icon, String tooltip, Shortcut shortcut, boolean registerInToolbar, String toolbarId, boolean installAdapters) {
         super(name, icon, tooltip, shortcut, registerInToolbar, toolbarId, installAdapters);
         // It is required to set the SELECTED_KEY to a non-null value in order to let Swing components update it
@@ -82,5 +82,5 @@
         }
     }
-    
+
     /**
      * Adds a button model
@@ -103,5 +103,5 @@
         }
     }
-    
+
     protected void notifySelectedState() {
         boolean selected = isSelected();
@@ -121,9 +121,9 @@
      */
     protected final void toggleSelectedState(ActionEvent e) {
-        if (e == null || !(e.getSource() instanceof JToggleButton || 
-                           e.getSource() instanceof JCheckBox || 
-                           e.getSource() instanceof JRadioButton || 
-                           e.getSource() instanceof JCheckBoxMenuItem || 
-                           e.getSource() instanceof JRadioButtonMenuItem 
+        if (e == null || !(e.getSource() instanceof JToggleButton ||
+                           e.getSource() instanceof JCheckBox ||
+                           e.getSource() instanceof JRadioButton ||
+                           e.getSource() instanceof JCheckBoxMenuItem ||
+                           e.getSource() instanceof JRadioButtonMenuItem
                            )) {
             setSelected(!isSelected());
