Changeset 2924 in josm for trunk/src/org/openstreetmap/josm/gui
- Timestamp:
- 2010-02-02T18:54:51+01:00 (15 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/gui/preferences
- Files:
-
- 1 added
- 1 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/preferences/PluginPreference.java
r2864 r2924 41 41 import org.openstreetmap.josm.gui.HelpAwareOptionPane; 42 42 import org.openstreetmap.josm.gui.help.HelpUtil; 43 import org.openstreetmap.josm.gui.preferences.plugin.PluginListPanel; 43 44 import org.openstreetmap.josm.gui.preferences.plugin.PluginPreferencesModel; 44 import org.openstreetmap.josm.gui.preferences.plugin.Plugin PreferencesPanel;45 import org.openstreetmap.josm.gui.preferences.plugin.PluginUpdatePolicyPanel; 45 46 import org.openstreetmap.josm.gui.widgets.SelectAllOnFocusGainedDecorator; 46 47 import org.openstreetmap.josm.plugins.PluginDownloadTask; … … 94 95 95 96 private JTextField tfFilter; 96 private Plugin PreferencesPanel pnlPluginPreferences;97 private PluginListPanel pnlPluginPreferences; 97 98 private PluginPreferencesModel model; 98 99 private JScrollPane spPluginPreferences; 100 private PluginUpdatePolicyPanel pnlPluginUpdatePolicy; 101 99 102 /** 100 103 * is set to true if this preference pane has been selected … … 132 135 } 133 136 134 protected JPanel build ContentPane() {137 protected JPanel buildPluginListPanel() { 135 138 JPanel pnl = new JPanel(new BorderLayout()); 136 139 pnl.add(buildSearchFieldPanel(), BorderLayout.NORTH); 137 140 model = new PluginPreferencesModel(); 138 spPluginPreferences = new JScrollPane(pnlPluginPreferences = new Plugin PreferencesPanel(model));141 spPluginPreferences = new JScrollPane(pnlPluginPreferences = new PluginListPanel(model)); 139 142 spPluginPreferences.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER); 140 143 spPluginPreferences.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED); … … 157 160 } 158 161 162 protected JPanel buildContentPanel() { 163 JPanel pnl = new JPanel(new BorderLayout()); 164 JTabbedPane tpPluginPreferences = new JTabbedPane(); 165 tpPluginPreferences.add(buildPluginListPanel()); 166 tpPluginPreferences.add(pnlPluginUpdatePolicy =new PluginUpdatePolicyPanel()); 167 tpPluginPreferences.setTitleAt(0, tr("Plugins")); 168 tpPluginPreferences.setTitleAt(1, tr("Plugin update policy")); 169 170 pnl.add(tpPluginPreferences, BorderLayout.CENTER); 171 return pnl; 172 } 173 159 174 public void addGui(final PreferenceTabbedPane gui) { 160 175 GridBagConstraints gc = new GridBagConstraints(); … … 163 178 gc.anchor = GridBagConstraints.NORTHWEST; 164 179 gc.fill = GridBagConstraints.BOTH; 165 gui.plugins.add(buildContentPane(), gc); 180 gui.plugins.add(buildContentPanel(), gc); 166 181 pnlPluginPreferences.refreshView(); 167 182 gui.addChangeListener(new PluginPreferenceActivationListener(gui.plugins)); … … 255 270 if (! pluginPreferencesActivated) 256 271 return false; 272 pnlPluginUpdatePolicy.rememberInPreferences(); 257 273 if (model.isActivePluginsChanged()) { 258 274 LinkedList<String> l = new LinkedList<String>(model.getSelectedPluginNames()); -
trunk/src/org/openstreetmap/josm/gui/preferences/plugin/PluginListPanel.java
r2921 r2924 25 25 import org.openstreetmap.josm.tools.OpenBrowser; 26 26 27 public class Plugin PreferencesPanel extends VerticallyScrollablePanel{28 private static final Logger logger = Logger.getLogger(Plugin PreferencesPanel.class.getName());27 public class PluginListPanel extends VerticallyScrollablePanel{ 28 private static final Logger logger = Logger.getLogger(PluginListPanel.class.getName()); 29 29 30 30 private PluginPreferencesModel model; 31 31 32 public Plugin PreferencesPanel() {32 public PluginListPanel() { 33 33 model = new PluginPreferencesModel(); 34 34 setLayout(new GridBagLayout()); 35 35 } 36 36 37 public Plugin PreferencesPanel(PluginPreferencesModel model) {37 public PluginListPanel(PluginPreferencesModel model) { 38 38 this.model = model; 39 39 setLayout(new GridBagLayout());
Note:
See TracChangeset
for help on using the changeset viewer.