Index: trunk/src/org/openstreetmap/josm/gui/MenuScroller.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/MenuScroller.java	(revision 7451)
+++ trunk/src/org/openstreetmap/josm/gui/MenuScroller.java	(revision 7452)
@@ -33,6 +33,5 @@
 /**
  * A class that provides scrolling capabilities to a long menu dropdown or
- * popup menu.  A number of items can optionally be frozen at the top and/or
- * bottom of the menu.
+ * popup menu. A number of items can optionally be frozen at the top of the menu.
  * <P>
  * <B>Implementation note:</B>  The default number of items to display
@@ -52,5 +51,4 @@
     private int interval;
     private int topFixedCount;
-    private int bottomFixedCount;
     private int firstIndex = 0;
     private int keepVisibleIndex = -1;
@@ -169,6 +167,5 @@
      * Registers a menu to be scrolled, with the specified number of items
      * to display in the scrolling region, the specified scrolling interval,
-     * and the specified numbers of items fixed at the top and bottom of the
-     * menu.
+     * and the specified numbers of items fixed at the top of the menu.
      *
      * @param menu the menu
@@ -176,13 +173,11 @@
      * @param interval the scroll interval, in milliseconds
      * @param topFixedCount the number of items to fix at the top.  May be 0.
-     * @param bottomFixedCount the number of items to fix at the bottom. May be 0
      * @throws IllegalArgumentException if scrollCount or interval is 0 or
-     * negative or if topFixedCount or bottomFixedCount is negative
+     * negative or if topFixedCount is negative
      * @return the MenuScroller
      */
     public static MenuScroller setScrollerFor(JMenu menu, int scrollCount, int interval,
-            int topFixedCount, int bottomFixedCount) {
-        return new MenuScroller(menu, scrollCount, interval,
-                topFixedCount, bottomFixedCount);
+            int topFixedCount) {
+        return new MenuScroller(menu, scrollCount, interval, topFixedCount);
     }
 
@@ -190,6 +185,5 @@
      * Registers a popup menu to be scrolled, with the specified number of items
      * to display in the scrolling region, the specified scrolling interval,
-     * and the specified numbers of items fixed at the top and bottom of the
-     * popup menu.
+     * and the specified numbers of items fixed at the top of the popup menu.
      *
      * @param menu the popup menu
@@ -197,13 +191,11 @@
      * @param interval the scroll interval, in milliseconds
      * @param topFixedCount the number of items to fix at the top.  May be 0
-     * @param bottomFixedCount the number of items to fix at the bottom.  May be 0
      * @throws IllegalArgumentException if scrollCount or interval is 0 or
-     * negative or if topFixedCount or bottomFixedCount is negative
+     * negative or if topFixedCount is negative
      * @return the MenuScroller
      */
     public static MenuScroller setScrollerFor(JPopupMenu menu, int scrollCount, int interval,
-            int topFixedCount, int bottomFixedCount) {
-        return new MenuScroller(menu, scrollCount, interval,
-                topFixedCount, bottomFixedCount);
+            int topFixedCount) {
+        return new MenuScroller(menu, scrollCount, interval, topFixedCount);
     }
 
@@ -267,5 +259,5 @@
      */
     public MenuScroller(JMenu menu, int scrollCount, int interval) {
-        this(menu, scrollCount, interval, 0, 0);
+        this(menu, scrollCount, interval, 0);
     }
 
@@ -281,5 +273,5 @@
      */
     public MenuScroller(JPopupMenu menu, int scrollCount, int interval) {
-        this(menu, scrollCount, interval, 0, 0);
+        this(menu, scrollCount, interval, 0);
     }
 
@@ -288,5 +280,5 @@
      * specified number of items to display in the scrolling region, the
      * specified scrolling interval, and the specified numbers of items fixed at
-     * the top and bottom of the menu.
+     * the top of the menu.
      *
      * @param menu the menu
@@ -294,11 +286,9 @@
      * @param interval the scroll interval, in milliseconds
      * @param topFixedCount the number of items to fix at the top.  May be 0
-     * @param bottomFixedCount the number of items to fix at the bottom.  May be 0
      * @throws IllegalArgumentException if scrollCount or interval is 0 or
-     * negative or if topFixedCount or bottomFixedCount is negative
-     */
-    public MenuScroller(JMenu menu, int scrollCount, int interval,
-            int topFixedCount, int bottomFixedCount) {
-        this(menu.getPopupMenu(), scrollCount, interval, topFixedCount, bottomFixedCount);
+     * negative or if topFixedCount is negative
+     */
+    public MenuScroller(JMenu menu, int scrollCount, int interval, int topFixedCount) {
+        this(menu.getPopupMenu(), scrollCount, interval, topFixedCount);
     }
 
@@ -307,5 +297,5 @@
      * specified number of items to display in the scrolling region, the
      * specified scrolling interval, and the specified numbers of items fixed at
-     * the top and bottom of the popup menu.
+     * the top of the popup menu.
      *
      * @param menu the popup menu
@@ -313,15 +303,13 @@
      * @param interval the scroll interval, in milliseconds
      * @param topFixedCount the number of items to fix at the top.  May be 0
-     * @param bottomFixedCount the number of items to fix at the bottom.  May be 0
      * @throws IllegalArgumentException if scrollCount or interval is 0 or
-     * negative or if topFixedCount or bottomFixedCount is negative
-     */
-    public MenuScroller(JPopupMenu menu, int scrollCount, int interval,
-            int topFixedCount, int bottomFixedCount) {
+     * negative or if topFixedCount is negative
+     */
+    public MenuScroller(JPopupMenu menu, int scrollCount, int interval, int topFixedCount) {
         if (scrollCount <= 0 || interval <= 0) {
             throw new IllegalArgumentException("scrollCount and interval must be greater than 0");
         }
-        if (topFixedCount < 0 || bottomFixedCount < 0) {
-            throw new IllegalArgumentException("topFixedCount and bottomFixedCount cannot be negative");
+        if (topFixedCount < 0) {
+            throw new IllegalArgumentException("topFixedCount cannot be negative");
         }
 
@@ -331,5 +319,4 @@
         setInterval(interval);
         setTopFixedCount(topFixedCount);
-        setBottomFixedCount(bottomFixedCount);
 
         this.menu = menu;
@@ -406,22 +393,4 @@
         }
         this.topFixedCount = topFixedCount;
-    }
-
-    /**
-     * Returns the number of items fixed at the bottom of the menu or popup menu.
-     *
-     * @return the number of items
-     */
-    public int getBottomFixedCount() {
-        return bottomFixedCount;
-    }
-
-    /**
-     * Sets the number of items to fix at the bottom of the menu or popup menu.
-     *
-     * @param bottomFixedCount the number of items
-     */
-    public void setBottomFixedCount(int bottomFixedCount) {
-        this.bottomFixedCount = bottomFixedCount;
     }
 
@@ -487,8 +456,8 @@
 
             firstIndex = Math.max(topFixedCount, firstIndex);
-            firstIndex = Math.min(numOfNonSepItems - bottomFixedCount - scrollCount, firstIndex);
+            firstIndex = Math.min(numOfNonSepItems - scrollCount, firstIndex);
 
             upItem.setEnabled(firstIndex > topFixedCount);
-            downItem.setEnabled(firstIndex + scrollCount < numOfNonSepItems - bottomFixedCount);
+            downItem.setEnabled(firstIndex + scrollCount < numOfNonSepItems);
 
             menu.removeAll();
@@ -505,11 +474,4 @@
             }
             menu.add(downItem);
-
-            if (bottomFixedCount > 0) {
-                menu.addSeparator();
-            }
-            for (int i = menuItems.length - bottomFixedCount; i < menuItems.length; i++) {
-                menu.add(menuItems[i]);
-            }
 
             int preferredWidth = 0;
@@ -546,5 +508,5 @@
             int numOfNonSepItems = getNumberOfNonSeparatorItems(menuItems);
             if (keepVisibleIndex >= topFixedCount
-                    && keepVisibleIndex <= numOfNonSepItems - bottomFixedCount
+                    && keepVisibleIndex <= numOfNonSepItems
                     && (keepVisibleIndex > firstIndex + scrollCount
                     || keepVisibleIndex < firstIndex)) {
@@ -552,5 +514,5 @@
                 firstIndex = Math.max(firstIndex, keepVisibleIndex - scrollCount + 1);
             }
-            if (numOfNonSepItems > topFixedCount + scrollCount + bottomFixedCount) {
+            if (numOfNonSepItems > topFixedCount + scrollCount) {
                 refreshMenu();
             }
