Ignore:
Timestamp:
2012-12-25T23:43:22+01:00 (11 years ago)
Author:
Don-vip
Message:

Allow to access directly to validator preferences from validator dialog with a small preferences button left to pin button.
Generic approach in order to be reused by plugins using dialogs.
This leads to some changes in preferences settings system, but without any break in compatibility.
The only impact is the deprecation of some public JTabbedPane fields, that will be removed mid-2013.

File:
1 edited

Legend:

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

    r5601 r5631  
    6161
    6262    private PluginPreference() {
    63         super("plugin", tr("Plugins"), tr("Configure available plugins."));
     63        super("plugin", tr("Plugins"), tr("Configure available plugins."), false, new JTabbedPane());
    6464    }
    6565
     
    163163    }
    164164
    165     protected JPanel buildContentPanel() {
    166         JPanel pnl = new JPanel(new BorderLayout());
    167         JTabbedPane tpPluginPreferences = new JTabbedPane();
    168         tpPluginPreferences.add(buildPluginListPanel());
    169         tpPluginPreferences.add(pnlPluginUpdatePolicy  =new PluginUpdatePolicyPanel());
    170         tpPluginPreferences.setTitleAt(0, tr("Plugins"));
    171         tpPluginPreferences.setTitleAt(1, tr("Plugin update policy"));
    172 
    173         pnl.add(tpPluginPreferences, BorderLayout.CENTER);
    174         return pnl;
     165    protected JTabbedPane buildContentPane() {
     166        JTabbedPane pane = getTabPane();
     167        pane.addTab(tr("Plugins"), buildPluginListPanel());
     168        pane.addTab(tr("Plugin update policy"), pnlPluginUpdatePolicy = new PluginUpdatePolicyPanel());
     169        return pane;
    175170    }
    176171
     
    182177        gc.fill = GridBagConstraints.BOTH;
    183178        PreferencePanel plugins = gui.createPreferenceTab(this);
    184         plugins.add(buildContentPanel(), gc);
     179        plugins.add(buildContentPane(), gc);
    185180        readLocalPluginInformation();
    186181        pluginPreferencesActivated = true;
Note: See TracChangeset for help on using the changeset viewer.