Ignore:
Timestamp:
2014-01-10T19:24:34+01:00 (10 years ago)
Author:
Don-vip
Message:

see #9508 - refactor validator preferences + handling of JScrollPane policies ("vertical as needed" / "horizontal as needed" are default policies)

Location:
trunk/src/org/openstreetmap/josm/gui/preferences/server
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/preferences/server/AuthenticationPreference.java

    r6623 r6666  
    3737        gui.getServerPreference().addApiUrlChangeListener(pnlAuthPreferences);
    3838        gui.getServerPreference().addSubTab(this, tr("Authentication"),
    39                 ServerAccessPreference.wrapVerticallyScrollablePanel(pnlAuthPreferences),
     39                pnlAuthPreferences.getVerticalScrollPane(),
    4040                tr("Configure your identity and how to authenticate at the OSM server"));
    4141    }
  • trunk/src/org/openstreetmap/josm/gui/preferences/server/ProxyPreference.java

    r6623 r6666  
    4141        pnlProxyPreferences = new ProxyPreferencesPanel();
    4242        gui.getServerPreference().addSubTab(this, tr("Proxy settings"),
    43                 ServerAccessPreference.wrapVerticallyScrollablePanel(pnlProxyPreferences),
     43                pnlProxyPreferences.getVerticalScrollPane(),
    4444                tr("Configure whether to use a proxy server"));
    4545    }
  • trunk/src/org/openstreetmap/josm/gui/preferences/server/ServerAccessPreference.java

    r6623 r6666  
    1111
    1212import javax.swing.JPanel;
    13 import javax.swing.JScrollPane;
    1413import javax.swing.JTabbedPane;
    1514
     
    1918import org.openstreetmap.josm.gui.preferences.PreferenceSettingFactory;
    2019import org.openstreetmap.josm.gui.preferences.PreferenceTabbedPane;
    21 import org.openstreetmap.josm.gui.widgets.VerticallyScrollablePanel;
    2220
    2321/**
     
    4240    /** indicates whether to use the default OSM URL or not */
    4341    private OsmApiUrlInputPanel pnlApiUrlPreferences;
    44 
    45     /**
    46      * Embeds a vertically scrollable panel in a {@link JScrollPane}
    47      * @param panel the panel
    48      * @return the scroll pane
    49      */
    50     public static JScrollPane wrapVerticallyScrollablePanel(VerticallyScrollablePanel panel) {
    51         JScrollPane sp = new JScrollPane(panel);
    52         sp.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
    53         sp.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
    54         return sp;
    55     }
    5642
    5743    /**
Note: See TracChangeset for help on using the changeset viewer.