Ignore:
Timestamp:
2020-10-11T11:46:46+02:00 (4 years ago)
Author:
simon04
Message:

see #7548 - Re-organize the preference dialog (map preferences)

File:
1 edited

Legend:

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

    r17099 r17161  
    5454import javax.swing.JScrollPane;
    5555import javax.swing.JSeparator;
     56import javax.swing.JTabbedPane;
    5657import javax.swing.JTable;
    5758import javax.swing.JToolBar;
     
    16581659     */
    16591660    public final void deferLoading(final DefaultTabPreferenceSetting tab, final Component component) {
    1660         tab.getTabPane().addChangeListener(e -> {
    1661             if (tab.getTabPane().getSelectedComponent() == component) {
     1661        deferLoading(tab.getTabPane(), component);
     1662    }
     1663
     1664    /**
     1665     * Defers loading of sources to the first time the adequate tab is selected.
     1666     * @param tab The tabbed pane
     1667     * @param component The tab component
     1668     * @since 17161
     1669     */
     1670    public final void deferLoading(final JTabbedPane tab, final Component component) {
     1671        tab.addChangeListener(e -> {
     1672            if (tab.getSelectedComponent() == component) {
    16621673                initiallyLoadAvailableSources();
    16631674            }
Note: See TracChangeset for help on using the changeset viewer.