Index: trunk/src/org/openstreetmap/josm/gui/MapFrame.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/MapFrame.java	(revision 2010)
+++ trunk/src/org/openstreetmap/josm/gui/MapFrame.java	(revision 2011)
@@ -247,3 +247,21 @@
         }
     }
+
+    /**
+     * Replies the instance of a toggle dialog of type <code>type</code> managed by this
+     * map frame
+     * 
+     * @param <T>
+     * @param type the class of the toggle dialog, i.e. UserListDialog.class
+     * @return the instance of a toggle dialog of type <code>type</code> managed by this
+     * map frame; null, if no such dialog exists
+     * 
+     */
+    public <T> ToggleDialog getToggleDialog(Class<T> type) {
+        for (ToggleDialog td : allDialogs) {
+            if (type.isInstance(td))
+                return td;
+        }
+        return null;
+    }
 }
