Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/ToggleDialog.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/ToggleDialog.java	(revision 6955)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/ToggleDialog.java	(revision 6956)
@@ -159,4 +159,25 @@
     protected JCheckBoxMenuItem windowMenuItem;
 
+    private final JRadioButtonMenuItem alwaysShown  = new JRadioButtonMenuItem(new AbstractAction(tr("Always shown")) {
+        @Override
+        public void actionPerformed(ActionEvent e) {
+            setIsButtonHiding(ButtonHidingType.ALWAYS_SHOWN);
+        }
+    });
+
+    private final JRadioButtonMenuItem dynamic      = new JRadioButtonMenuItem(new AbstractAction(tr("Dynamic")) {
+        @Override
+        public void actionPerformed(ActionEvent e) {
+            setIsButtonHiding(ButtonHidingType.DYNAMIC);
+        }
+    });
+
+    private final JRadioButtonMenuItem alwaysHidden = new JRadioButtonMenuItem(new AbstractAction(tr("Always hidden")) {
+        @Override
+        public void actionPerformed(ActionEvent e) {
+            setIsButtonHiding(ButtonHidingType.ALWAYS_HIDDEN);
+        }
+    });
+    
     /**
      * The linked preferences class (optional). If set, accessible from the title bar with a dedicated button
@@ -508,5 +529,5 @@
                         @Override
                         public void actionPerformed(ActionEvent e) {
-                            JRadioButtonMenuItem item = (buttonHiding == ButtonHidingType.DYNAMIC) ? popupMenu.alwaysShown : popupMenu.dynamic;
+                            JRadioButtonMenuItem item = (buttonHiding == ButtonHidingType.DYNAMIC) ? alwaysShown : dynamic;
                             item.setSelected(true);
                             item.getAction().actionPerformed(null);
@@ -586,22 +607,4 @@
             private final JMenu buttonHidingMenu = new JMenu(tr("Side buttons"));
 
-            public final JRadioButtonMenuItem alwaysShown  = new JRadioButtonMenuItem(new AbstractAction(tr("Always shown")) {
-                @Override public void actionPerformed(ActionEvent e) {
-                    setIsButtonHiding(ButtonHidingType.ALWAYS_SHOWN);
-                }
-            });
-
-            public final JRadioButtonMenuItem dynamic      = new JRadioButtonMenuItem(new AbstractAction(tr("Dynamic")) {
-                @Override public void actionPerformed(ActionEvent e) {
-                    setIsButtonHiding(ButtonHidingType.DYNAMIC);
-                }
-            });
-
-            public final JRadioButtonMenuItem alwaysHidden = new JRadioButtonMenuItem(new AbstractAction(tr("Always hidden")) {
-                @Override public void actionPerformed(ActionEvent e) {
-                    setIsButtonHiding(ButtonHidingType.ALWAYS_HIDDEN);
-                }
-            });
-
             public DialogPopupMenu() {
                 alwaysShown.setSelected(buttonHiding == ButtonHidingType.ALWAYS_SHOWN);
@@ -714,5 +717,6 @@
 
     /**
-     * Sets the dialogsPanel managing all toggle dialogs
+     * Sets the dialogsPanel managing all toggle dialogs.
+     * @param dialogsPanel The panel managing all toggle dialogs
      */
     public void setDialogsPanel(DialogsPanel dialogsPanel) {
@@ -766,4 +770,8 @@
     }
 
+    /**
+     * Returns the preferred height of this dialog.
+     * @return The preferred height if the toggle dialog is expanded
+     */
     public int getPreferredHeight() {
         return preferredHeight;
@@ -783,5 +791,6 @@
 
     /**
-     * Replies true if this dialog is showing either as docked or as detached dialog
+     * Determines if this dialog is showing either as docked or as detached dialog.
+     * @return {@code true} if this dialog is showing either as docked or as detached dialog
      */
     public boolean isDialogShowing() {
@@ -790,5 +799,6 @@
 
     /**
-     * Replies true if this dialog is docked and expanded
+     * Determines if this dialog is docked and expanded.
+     * @return {@code true} if this dialog is docked and expanded
      */
     public boolean isDialogInDefaultView() {
@@ -797,5 +807,6 @@
 
     /**
-     * Replies true if this dialog is docked and collapsed
+     * Determines if this dialog is docked and collapsed.
+     * @return {@code true} if this dialog is docked and collapsed
      */
     public boolean isDialogInCollapsedView() {
