| 1 | Index: src/org/openstreetmap/josm/gui/dialogs/MapPaintDialog.java
|
|---|
| 2 | ===================================================================
|
|---|
| 3 | --- src/org/openstreetmap/josm/gui/dialogs/MapPaintDialog.java (revision 5506)
|
|---|
| 4 | +++ src/org/openstreetmap/josm/gui/dialogs/MapPaintDialog.java (working copy)
|
|---|
| 5 | @@ -68,6 +68,7 @@
|
|---|
| 6 | import org.openstreetmap.josm.gui.mappaint.StyleSource;
|
|---|
| 7 | import org.openstreetmap.josm.gui.preferences.PreferenceDialog;
|
|---|
| 8 | import org.openstreetmap.josm.gui.preferences.SourceEntry;
|
|---|
| 9 | +import org.openstreetmap.josm.gui.preferences.map.MapPaintPreference;
|
|---|
| 10 | import org.openstreetmap.josm.gui.widgets.HtmlPanel;
|
|---|
| 11 | import org.openstreetmap.josm.gui.widgets.JFileChooserManager;
|
|---|
| 12 | import org.openstreetmap.josm.gui.widgets.PopupMenuLauncher;
|
|---|
| 13 | @@ -452,7 +453,7 @@
|
|---|
| 14 | @Override
|
|---|
| 15 | public void actionPerformed(ActionEvent e) {
|
|---|
| 16 | final PreferenceDialog p =new PreferenceDialog(Main.parent);
|
|---|
| 17 | - p.selectMapPaintPreferenceTab();
|
|---|
| 18 | + p.selectPreferencesTabByClass(MapPaintPreference.class);
|
|---|
| 19 | p.setVisible(true);
|
|---|
| 20 | }
|
|---|
| 21 | }
|
|---|
| 22 | Index: src/org/openstreetmap/josm/gui/preferences/DefaultTabPreferenceSetting.java
|
|---|
| 23 | ===================================================================
|
|---|
| 24 | --- src/org/openstreetmap/josm/gui/preferences/DefaultTabPreferenceSetting.java (revision 5506)
|
|---|
| 25 | +++ src/org/openstreetmap/josm/gui/preferences/DefaultTabPreferenceSetting.java (working copy)
|
|---|
| 26 | @@ -1,65 +1,66 @@
|
|---|
| 27 | -// License: GPL. For details, see LICENSE file.
|
|---|
| 28 | -package org.openstreetmap.josm.gui.preferences;
|
|---|
| 29 | -
|
|---|
| 30 | -import javax.swing.JPanel;
|
|---|
| 31 | -import javax.swing.JScrollPane;
|
|---|
| 32 | -
|
|---|
| 33 | -import org.openstreetmap.josm.tools.GBC;
|
|---|
| 34 | -
|
|---|
| 35 | -public abstract class DefaultTabPreferenceSetting extends DefaultPreferenceSetting implements TabPreferenceSetting {
|
|---|
| 36 | -
|
|---|
| 37 | - private final String iconName;
|
|---|
| 38 | - private final String description;
|
|---|
| 39 | - private final String title;
|
|---|
| 40 | -
|
|---|
| 41 | - public DefaultTabPreferenceSetting() {
|
|---|
| 42 | - this(null, null, null);
|
|---|
| 43 | - }
|
|---|
| 44 | -
|
|---|
| 45 | - public DefaultTabPreferenceSetting(String iconName, String title, String description) {
|
|---|
| 46 | - this(iconName, title, description, false);
|
|---|
| 47 | - }
|
|---|
| 48 | -
|
|---|
| 49 | - public DefaultTabPreferenceSetting(String iconName, String title, String description, boolean isExpert) {
|
|---|
| 50 | - super(isExpert);
|
|---|
| 51 | - this.iconName = iconName;
|
|---|
| 52 | - this.description = description;
|
|---|
| 53 | - this.title = title;
|
|---|
| 54 | - }
|
|---|
| 55 | -
|
|---|
| 56 | - @Override
|
|---|
| 57 | - public String getIconName() {
|
|---|
| 58 | - return iconName;
|
|---|
| 59 | - }
|
|---|
| 60 | -
|
|---|
| 61 | - @Override
|
|---|
| 62 | - public String getTooltip() {
|
|---|
| 63 | - if (getDescription() != null) {
|
|---|
| 64 | - return "<html>"+getDescription()+"</html>";
|
|---|
| 65 | - } else {
|
|---|
| 66 | - return null;
|
|---|
| 67 | - }
|
|---|
| 68 | - }
|
|---|
| 69 | -
|
|---|
| 70 | - @Override
|
|---|
| 71 | - public String getDescription() {
|
|---|
| 72 | - return description;
|
|---|
| 73 | - }
|
|---|
| 74 | -
|
|---|
| 75 | - @Override
|
|---|
| 76 | - public String getTitle() {
|
|---|
| 77 | - return title;
|
|---|
| 78 | - }
|
|---|
| 79 | -
|
|---|
| 80 | - protected final void createPreferenceTabWithScrollPane(PreferenceTabbedPane gui, JPanel panel) {
|
|---|
| 81 | - GBC a = GBC.eol().insets(-5,0,0,0);
|
|---|
| 82 | - a.anchor = GBC.EAST;
|
|---|
| 83 | -
|
|---|
| 84 | - JScrollPane scrollPane = new JScrollPane(panel, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
|
|---|
| 85 | - scrollPane.setBorder(null);
|
|---|
| 86 | -
|
|---|
| 87 | - JPanel tab = gui.createPreferenceTab(this);
|
|---|
| 88 | - tab.add(scrollPane, GBC.eol().fill(GBC.BOTH));
|
|---|
| 89 | - tab.add(GBC.glue(0,10), a);
|
|---|
| 90 | - }
|
|---|
| 91 | -}
|
|---|
| 92 | +// License: GPL. For details, see LICENSE file.
|
|---|
| 93 | +package org.openstreetmap.josm.gui.preferences;
|
|---|
| 94 | +
|
|---|
| 95 | +import javax.swing.JComponent;
|
|---|
| 96 | +import javax.swing.JPanel;
|
|---|
| 97 | +import javax.swing.JScrollPane;
|
|---|
| 98 | +
|
|---|
| 99 | +import org.openstreetmap.josm.tools.GBC;
|
|---|
| 100 | +
|
|---|
| 101 | +public abstract class DefaultTabPreferenceSetting extends DefaultPreferenceSetting implements TabPreferenceSetting {
|
|---|
| 102 | +
|
|---|
| 103 | + private final String iconName;
|
|---|
| 104 | + private final String description;
|
|---|
| 105 | + private final String title;
|
|---|
| 106 | +
|
|---|
| 107 | + public DefaultTabPreferenceSetting() {
|
|---|
| 108 | + this(null, null, null);
|
|---|
| 109 | + }
|
|---|
| 110 | +
|
|---|
| 111 | + public DefaultTabPreferenceSetting(String iconName, String title, String description) {
|
|---|
| 112 | + this(iconName, title, description, false);
|
|---|
| 113 | + }
|
|---|
| 114 | +
|
|---|
| 115 | + public DefaultTabPreferenceSetting(String iconName, String title, String description, boolean isExpert) {
|
|---|
| 116 | + super(isExpert);
|
|---|
| 117 | + this.iconName = iconName;
|
|---|
| 118 | + this.description = description;
|
|---|
| 119 | + this.title = title;
|
|---|
| 120 | + }
|
|---|
| 121 | +
|
|---|
| 122 | + @Override
|
|---|
| 123 | + public String getIconName() {
|
|---|
| 124 | + return iconName;
|
|---|
| 125 | + }
|
|---|
| 126 | +
|
|---|
| 127 | + @Override
|
|---|
| 128 | + public String getTooltip() {
|
|---|
| 129 | + if (getDescription() != null) {
|
|---|
| 130 | + return "<html>"+getDescription()+"</html>";
|
|---|
| 131 | + } else {
|
|---|
| 132 | + return null;
|
|---|
| 133 | + }
|
|---|
| 134 | + }
|
|---|
| 135 | +
|
|---|
| 136 | + @Override
|
|---|
| 137 | + public String getDescription() {
|
|---|
| 138 | + return description;
|
|---|
| 139 | + }
|
|---|
| 140 | +
|
|---|
| 141 | + @Override
|
|---|
| 142 | + public String getTitle() {
|
|---|
| 143 | + return title;
|
|---|
| 144 | + }
|
|---|
| 145 | +
|
|---|
| 146 | + protected final void createPreferenceTabWithScrollPane(PreferenceTabbedPane gui, JComponent panel) {
|
|---|
| 147 | + GBC a = GBC.eol().insets(-5,0,0,0);
|
|---|
| 148 | + a.anchor = GBC.EAST;
|
|---|
| 149 | +
|
|---|
| 150 | + JScrollPane scrollPane = new JScrollPane(panel, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
|
|---|
| 151 | + scrollPane.setBorder(null);
|
|---|
| 152 | +
|
|---|
| 153 | + JPanel tab = gui.createPreferenceTab(this);
|
|---|
| 154 | + tab.add(scrollPane, GBC.eol().fill(GBC.BOTH));
|
|---|
| 155 | + tab.add(GBC.glue(0,10), a);
|
|---|
| 156 | + }
|
|---|
| 157 | +}
|
|---|
| 158 | Index: src/org/openstreetmap/josm/gui/preferences/ToolbarPreferences.java
|
|---|
| 159 | ===================================================================
|
|---|
| 160 | --- src/org/openstreetmap/josm/gui/preferences/ToolbarPreferences.java (revision 5506)
|
|---|
| 161 | +++ src/org/openstreetmap/josm/gui/preferences/ToolbarPreferences.java (working copy)
|
|---|
| 162 | @@ -500,7 +500,7 @@
|
|---|
| 163 | private String movingComponent;
|
|---|
| 164 |
|
|---|
| 165 | public Settings(DefaultMutableTreeNode rootActionsNode) {
|
|---|
| 166 | - super("toolbar", tr("Toolbar customization"), tr("Customize the elements on the toolbar."));
|
|---|
| 167 | + super("toolbar", tr("Toolbar"), tr("Customize the elements on the toolbar."));
|
|---|
| 168 | actionsTreeModel = new DefaultTreeModel(rootActionsNode);
|
|---|
| 169 | actionsTree = new JTree(actionsTreeModel);
|
|---|
| 170 | }
|
|---|
| 171 | Index: src/org/openstreetmap/josm/gui/preferences/PreferenceTabbedPane.java
|
|---|
| 172 | ===================================================================
|
|---|
| 173 | --- src/org/openstreetmap/josm/gui/preferences/PreferenceTabbedPane.java (revision 5506)
|
|---|
| 174 | +++ src/org/openstreetmap/josm/gui/preferences/PreferenceTabbedPane.java (working copy)
|
|---|
| 175 | @@ -33,6 +33,7 @@
|
|---|
| 176 | import org.openstreetmap.josm.gui.preferences.display.ColorPreference;
|
|---|
| 177 | import org.openstreetmap.josm.gui.preferences.display.DisplayPreference;
|
|---|
| 178 | import org.openstreetmap.josm.gui.preferences.display.DrawingPreference;
|
|---|
| 179 | +import org.openstreetmap.josm.gui.preferences.display.GPXSettingsPanel;
|
|---|
| 180 | import org.openstreetmap.josm.gui.preferences.display.LafPreference;
|
|---|
| 181 | import org.openstreetmap.josm.gui.preferences.display.LanguagePreference;
|
|---|
| 182 | import org.openstreetmap.josm.gui.preferences.imagery.ImageryPreference;
|
|---|
| 183 | @@ -41,6 +42,7 @@
|
|---|
| 184 | import org.openstreetmap.josm.gui.preferences.map.MapPreference;
|
|---|
| 185 | import org.openstreetmap.josm.gui.preferences.map.TaggingPresetPreference;
|
|---|
| 186 | import org.openstreetmap.josm.gui.preferences.projection.ProjectionPreference;
|
|---|
| 187 | +import org.openstreetmap.josm.gui.preferences.server.ProxyPreferencesPanel;
|
|---|
| 188 | import org.openstreetmap.josm.gui.preferences.shortcut.ShortcutPreference;
|
|---|
| 189 | import org.openstreetmap.josm.plugins.PluginDownloadTask;
|
|---|
| 190 | import org.openstreetmap.josm.plugins.PluginHandler;
|
|---|
| 191 | @@ -338,7 +340,11 @@
|
|---|
| 192 | int position = index;
|
|---|
| 193 | for (PreferenceTab tab : tabs) {
|
|---|
| 194 | if (tab.getTabPreferenceSetting().equals(tps)) {
|
|---|
| 195 | - insertTab(null, icon, tab.getComponent(), tps.getTooltip(), position++);
|
|---|
| 196 | + if (tps instanceof IconPreferenceSetting) {
|
|---|
| 197 | + insertTab(null, icon, tab.getComponent(), tps.getTooltip(), position++);
|
|---|
| 198 | + } else {
|
|---|
| 199 | + insertTab(tps.getTitle(), null, tab.getComponent(), tps.getTooltip(), position++);
|
|---|
| 200 | + }
|
|---|
| 201 | }
|
|---|
| 202 | }
|
|---|
| 203 | }
|
|---|
| 204 | @@ -366,7 +372,11 @@
|
|---|
| 205 | addGUITabsForSetting(icon, tps);
|
|---|
| 206 | } else {
|
|---|
| 207 | // If it has not been initialized, create an empty tab with only icon and tooltip
|
|---|
| 208 | - addTab(null, icon, new PreferencePanel(tps), tps.getTooltip());
|
|---|
| 209 | + if (tps instanceof IconPreferenceSetting) {
|
|---|
| 210 | + addTab(null, icon, new PreferencePanel(tps), tps.getTooltip());
|
|---|
| 211 | + } else {
|
|---|
| 212 | + addTab(tps.getTitle(), null, new PreferencePanel(tps), tps.getTooltip());
|
|---|
| 213 | + }
|
|---|
| 214 | }
|
|---|
| 215 | }
|
|---|
| 216 | }
|
|---|
| 217 | @@ -396,33 +406,74 @@
|
|---|
| 218 | return null;
|
|---|
| 219 | }
|
|---|
| 220 |
|
|---|
| 221 | + static class IconPreferenceSetting extends DefaultTabPreferenceSetting {
|
|---|
| 222 | +
|
|---|
| 223 | + public static class Factory implements PreferenceSettingFactory {
|
|---|
| 224 | +
|
|---|
| 225 | + private final String iconName, title, description;
|
|---|
| 226 | +
|
|---|
| 227 | + public Factory(String iconName, String title, String description) {
|
|---|
| 228 | + this.iconName = iconName;
|
|---|
| 229 | + this.title = title;
|
|---|
| 230 | + this.description = description;
|
|---|
| 231 | + }
|
|---|
| 232 | +
|
|---|
| 233 | + @Override
|
|---|
| 234 | + public PreferenceSetting createPreferenceSetting() {
|
|---|
| 235 | + return new IconPreferenceSetting(iconName, title, description);
|
|---|
| 236 | + }
|
|---|
| 237 | + }
|
|---|
| 238 | +
|
|---|
| 239 | + public IconPreferenceSetting(String iconName, String title, String description) {
|
|---|
| 240 | + super(iconName, title, description);
|
|---|
| 241 | + }
|
|---|
| 242 | +
|
|---|
| 243 | + @Override
|
|---|
| 244 | + public void addGui(PreferenceTabbedPane gui) {
|
|---|
| 245 | + createPreferenceTabWithScrollPane(gui, new JPanel());
|
|---|
| 246 | + }
|
|---|
| 247 | +
|
|---|
| 248 | + @Override
|
|---|
| 249 | + public boolean ok() {
|
|---|
| 250 | + return false;
|
|---|
| 251 | + }
|
|---|
| 252 | + }
|
|---|
| 253 | +
|
|---|
| 254 | static {
|
|---|
| 255 | +
|
|---|
| 256 | // order is important!
|
|---|
| 257 | - settingsFactory.add(new DisplayPreference.Factory());
|
|---|
| 258 | + settingsFactory.add(new IconPreferenceSetting.Factory("map", tr("Mapping"), ""));
|
|---|
| 259 | settingsFactory.add(new DrawingPreference.Factory());
|
|---|
| 260 | + settingsFactory.add(new GPXSettingsPanel.Factory());
|
|---|
| 261 | + settingsFactory.add(new ProjectionPreference.Factory());
|
|---|
| 262 | + settingsFactory.add(new MapPaintPreference.Factory());
|
|---|
| 263 | + settingsFactory.add(new TaggingPresetPreference.Factory());
|
|---|
| 264 | + settingsFactory.add(new ImageryPreference.Factory());
|
|---|
| 265 | +
|
|---|
| 266 | + settingsFactory.add(new IconPreferenceSetting.Factory("connection", tr("Server"), tr("Connection Settings for the OSM server.")));
|
|---|
| 267 | + settingsFactory.add(new ServerAccessPreference.Factory());
|
|---|
| 268 | + settingsFactory.add(new ProxyPreferencesPanel.Factory());
|
|---|
| 269 | +
|
|---|
| 270 | + settingsFactory.add(new IconPreferenceSetting.Factory("display", tr("User Interface"), tr("Various settings that influence the visual representation of the whole program.")));
|
|---|
| 271 | settingsFactory.add(new ColorPreference.Factory());
|
|---|
| 272 | settingsFactory.add(new LafPreference.Factory());
|
|---|
| 273 | settingsFactory.add(new LanguagePreference.Factory());
|
|---|
| 274 | - settingsFactory.add(new ServerAccessPreference.Factory());
|
|---|
| 275 | - settingsFactory.add(new MapPreference.Factory());
|
|---|
| 276 | - settingsFactory.add(new ProjectionPreference.Factory());
|
|---|
| 277 | - settingsFactory.add(new MapPaintPreference.Factory());
|
|---|
| 278 | - settingsFactory.add(new TaggingPresetPreference.Factory());
|
|---|
| 279 | settingsFactory.add(new BackupPreference.Factory());
|
|---|
| 280 | - if(!Main.applet) {
|
|---|
| 281 | - settingsFactory.add(new PluginPreference.Factory());
|
|---|
| 282 | - }
|
|---|
| 283 | settingsFactory.add(Main.toolbar);
|
|---|
| 284 | + settingsFactory.add(new ShortcutPreference.Factory());
|
|---|
| 285 | +
|
|---|
| 286 | + settingsFactory.add(new IconPreferenceSetting.Factory("advanced", tr("Advanced Preferences"), ""));
|
|---|
| 287 | settingsFactory.add(new AudioPreference.Factory());
|
|---|
| 288 | - settingsFactory.add(new ShortcutPreference.Factory());
|
|---|
| 289 | settingsFactory.add(new ValidatorPreference.Factory());
|
|---|
| 290 | settingsFactory.add(new RemoteControlPreference.Factory());
|
|---|
| 291 | - settingsFactory.add(new ImageryPreference.Factory());
|
|---|
| 292 | + settingsFactory.add(new AdvancedPreference.Factory());
|
|---|
| 293 |
|
|---|
| 294 | + settingsFactory.add(new IconPreferenceSetting.Factory("plugin", tr("Plugins"), tr("Install new plugins or configure installed plugins.")));
|
|---|
| 295 | + if(!Main.applet) {
|
|---|
| 296 | + settingsFactory.add(new PluginPreference.Factory());
|
|---|
| 297 | + }
|
|---|
| 298 | PluginHandler.getPreferenceSetting(settingsFactory);
|
|---|
| 299 |
|
|---|
| 300 | - // always the last: advanced tab
|
|---|
| 301 | - settingsFactory.add(new AdvancedPreference.Factory());
|
|---|
| 302 | }
|
|---|
| 303 |
|
|---|
| 304 | /**
|
|---|
| 305 | Index: src/org/openstreetmap/josm/gui/preferences/display/GPXSettingsPanel.java
|
|---|
| 306 | ===================================================================
|
|---|
| 307 | --- src/org/openstreetmap/josm/gui/preferences/display/GPXSettingsPanel.java (revision 5506)
|
|---|
| 308 | +++ src/org/openstreetmap/josm/gui/preferences/display/GPXSettingsPanel.java (working copy)
|
|---|
| 309 | @@ -24,6 +24,10 @@
|
|---|
| 310 | import org.openstreetmap.josm.actions.ExpertToggleAction;
|
|---|
| 311 | import org.openstreetmap.josm.gui.layer.markerlayer.Marker;
|
|---|
| 312 | import org.openstreetmap.josm.gui.layer.markerlayer.Marker.TemplateEntryProperty;
|
|---|
| 313 | +import org.openstreetmap.josm.gui.preferences.DefaultTabPreferenceSetting;
|
|---|
| 314 | +import org.openstreetmap.josm.gui.preferences.PreferenceSetting;
|
|---|
| 315 | +import org.openstreetmap.josm.gui.preferences.PreferenceSettingFactory;
|
|---|
| 316 | +import org.openstreetmap.josm.gui.preferences.PreferenceTabbedPane;
|
|---|
| 317 | import org.openstreetmap.josm.gui.preferences.PreferenceTabbedPane.ValidationListener;
|
|---|
| 318 | import org.openstreetmap.josm.gui.widgets.JosmComboBox;
|
|---|
| 319 | import org.openstreetmap.josm.tools.GBC;
|
|---|
| 320 | @@ -31,7 +35,30 @@
|
|---|
| 321 | import org.openstreetmap.josm.tools.template_engine.TemplateParser;
|
|---|
| 322 |
|
|---|
| 323 | public class GPXSettingsPanel extends JPanel implements ValidationListener {
|
|---|
| 324 | +
|
|---|
| 325 | + public static class Factory implements PreferenceSettingFactory {
|
|---|
| 326 |
|
|---|
| 327 | + @Override
|
|---|
| 328 | + public PreferenceSetting createPreferenceSetting() {
|
|---|
| 329 | + return new DefaultTabPreferenceSetting(null, tr("GPS Points"), "") {
|
|---|
| 330 | +
|
|---|
| 331 | + private GPXSettingsPanel gpx;
|
|---|
| 332 | +
|
|---|
| 333 | + @Override
|
|---|
| 334 | + public void addGui(PreferenceTabbedPane gui) {
|
|---|
| 335 | + createPreferenceTabWithScrollPane(gui, gpx = new GPXSettingsPanel());
|
|---|
| 336 | + gui.addValidationListener(gpx);
|
|---|
| 337 | + }
|
|---|
| 338 | +
|
|---|
| 339 | + @Override
|
|---|
| 340 | + public boolean ok() {
|
|---|
| 341 | + gpx.savePreferences();
|
|---|
| 342 | + return false;
|
|---|
| 343 | + }
|
|---|
| 344 | + };
|
|---|
| 345 | + }
|
|---|
| 346 | + }
|
|---|
| 347 | +
|
|---|
| 348 | private static final int WAYPOINT_LABEL_CUSTOM = 6;
|
|---|
| 349 | private static final String[] LABEL_PATTERN_TEMPLATE = new String[] {Marker.LABEL_PATTERN_AUTO, Marker.LABEL_PATTERN_NAME,
|
|---|
| 350 | Marker.LABEL_PATTERN_DESC, "{special:everything}", "?{ '{name}' | '{desc}' | '{formattedWaypointOffset}' }", ""};
|
|---|
| 351 | Index: src/org/openstreetmap/josm/gui/preferences/display/LafPreference.java
|
|---|
| 352 | ===================================================================
|
|---|
| 353 | --- src/org/openstreetmap/josm/gui/preferences/display/LafPreference.java (revision 5506)
|
|---|
| 354 | +++ src/org/openstreetmap/josm/gui/preferences/display/LafPreference.java (working copy)
|
|---|
| 355 | @@ -13,22 +13,20 @@
|
|---|
| 356 | import javax.swing.JLabel;
|
|---|
| 357 | import javax.swing.JList;
|
|---|
| 358 | import javax.swing.JPanel;
|
|---|
| 359 | -import javax.swing.JScrollPane;
|
|---|
| 360 | import javax.swing.ListCellRenderer;
|
|---|
| 361 | import javax.swing.UIManager;
|
|---|
| 362 | import javax.swing.UIManager.LookAndFeelInfo;
|
|---|
| 363 |
|
|---|
| 364 | import org.openstreetmap.josm.Main;
|
|---|
| 365 | import org.openstreetmap.josm.actions.ExpertToggleAction;
|
|---|
| 366 | +import org.openstreetmap.josm.gui.preferences.DefaultTabPreferenceSetting;
|
|---|
| 367 | import org.openstreetmap.josm.gui.preferences.PreferenceSetting;
|
|---|
| 368 | import org.openstreetmap.josm.gui.preferences.PreferenceSettingFactory;
|
|---|
| 369 | import org.openstreetmap.josm.gui.preferences.PreferenceTabbedPane;
|
|---|
| 370 | -import org.openstreetmap.josm.gui.preferences.SubPreferenceSetting;
|
|---|
| 371 | -import org.openstreetmap.josm.gui.preferences.TabPreferenceSetting;
|
|---|
| 372 | import org.openstreetmap.josm.gui.widgets.JosmComboBox;
|
|---|
| 373 | import org.openstreetmap.josm.tools.GBC;
|
|---|
| 374 |
|
|---|
| 375 | -public class LafPreference implements SubPreferenceSetting {
|
|---|
| 376 | +public class LafPreference extends DefaultTabPreferenceSetting {
|
|---|
| 377 |
|
|---|
| 378 | public static class Factory implements PreferenceSettingFactory {
|
|---|
| 379 | public PreferenceSetting createPreferenceSetting() {
|
|---|
| 380 | @@ -47,6 +45,10 @@
|
|---|
| 381 | private JCheckBox modeless = new JCheckBox(tr("Modeless working (Potlatch style)"));
|
|---|
| 382 | private JCheckBox dynamicButtons = new JCheckBox(tr("Dynamic buttons in side menus"));
|
|---|
| 383 |
|
|---|
| 384 | + public LafPreference() {
|
|---|
| 385 | + super(null, tr("Look and Feel"), "");
|
|---|
| 386 | + }
|
|---|
| 387 | +
|
|---|
| 388 | public void addGui(PreferenceTabbedPane gui) {
|
|---|
| 389 | lafCombo = new JosmComboBox(UIManager.getInstalledLookAndFeels());
|
|---|
| 390 |
|
|---|
| 391 | @@ -113,9 +115,9 @@
|
|---|
| 392 | panel.add(GBC.glue(5,0), GBC.std().fill(GBC.HORIZONTAL));
|
|---|
| 393 | panel.add(lafCombo, GBC.eol().fill(GBC.HORIZONTAL));
|
|---|
| 394 |
|
|---|
| 395 | - JScrollPane scrollpane = new JScrollPane(panel);
|
|---|
| 396 | - scrollpane.setBorder(BorderFactory.createEmptyBorder( 0, 0, 0, 0 ));
|
|---|
| 397 | - gui.getDisplayPreference().displaycontent.addTab(tr("Look and Feel"), scrollpane);
|
|---|
| 398 | + panel.add(Box.createVerticalGlue(), GBC.eol().fill(GBC.BOTH));
|
|---|
| 399 | +
|
|---|
| 400 | + createPreferenceTabWithScrollPane(gui, panel);
|
|---|
| 401 | }
|
|---|
| 402 |
|
|---|
| 403 | public boolean ok() {
|
|---|
| 404 | @@ -133,9 +135,4 @@
|
|---|
| 405 | public boolean isExpert() {
|
|---|
| 406 | return false;
|
|---|
| 407 | }
|
|---|
| 408 | -
|
|---|
| 409 | - @Override
|
|---|
| 410 | - public TabPreferenceSetting getTabPreferenceSetting(final PreferenceTabbedPane gui) {
|
|---|
| 411 | - return gui.getDisplayPreference();
|
|---|
| 412 | - }
|
|---|
| 413 | }
|
|---|
| 414 | Index: src/org/openstreetmap/josm/gui/preferences/display/LanguagePreference.java
|
|---|
| 415 | ===================================================================
|
|---|
| 416 | --- src/org/openstreetmap/josm/gui/preferences/display/LanguagePreference.java (revision 5506)
|
|---|
| 417 | +++ src/org/openstreetmap/josm/gui/preferences/display/LanguagePreference.java (working copy)
|
|---|
| 418 | @@ -18,16 +18,15 @@
|
|---|
| 419 | import javax.swing.ListCellRenderer;
|
|---|
| 420 |
|
|---|
| 421 | import org.openstreetmap.josm.Main;
|
|---|
| 422 | +import org.openstreetmap.josm.gui.preferences.DefaultTabPreferenceSetting;
|
|---|
| 423 | import org.openstreetmap.josm.gui.preferences.PreferenceSetting;
|
|---|
| 424 | import org.openstreetmap.josm.gui.preferences.PreferenceSettingFactory;
|
|---|
| 425 | import org.openstreetmap.josm.gui.preferences.PreferenceTabbedPane;
|
|---|
| 426 | -import org.openstreetmap.josm.gui.preferences.SubPreferenceSetting;
|
|---|
| 427 | -import org.openstreetmap.josm.gui.preferences.TabPreferenceSetting;
|
|---|
| 428 | import org.openstreetmap.josm.gui.widgets.JosmComboBox;
|
|---|
| 429 | import org.openstreetmap.josm.tools.GBC;
|
|---|
| 430 | import org.openstreetmap.josm.tools.I18n;
|
|---|
| 431 |
|
|---|
| 432 | -public class LanguagePreference implements SubPreferenceSetting {
|
|---|
| 433 | +public class LanguagePreference extends DefaultTabPreferenceSetting {
|
|---|
| 434 | public static class Factory implements PreferenceSettingFactory {
|
|---|
| 435 | public PreferenceSetting createPreferenceSetting() {
|
|---|
| 436 | return new LanguagePreference();
|
|---|
| 437 | @@ -39,6 +38,10 @@
|
|---|
| 438 | /** the model for the combo box */
|
|---|
| 439 | private LanguageComboBoxModel model;
|
|---|
| 440 |
|
|---|
| 441 | + public LanguagePreference() {
|
|---|
| 442 | + super(null, tr("Language"), "");
|
|---|
| 443 | + }
|
|---|
| 444 | +
|
|---|
| 445 | public void addGui(final PreferenceTabbedPane gui) {
|
|---|
| 446 | model = new LanguageComboBoxModel();
|
|---|
| 447 | // Selecting the language BEFORE the JComboBox listens to model changes speed up initialization by ~35ms (see #7386)
|
|---|
| 448 | @@ -47,12 +50,12 @@
|
|---|
| 449 | langCombo = new JosmComboBox(model);
|
|---|
| 450 | langCombo.setRenderer(new LanguageCellRenderer(langCombo.getRenderer()));
|
|---|
| 451 |
|
|---|
| 452 | - LafPreference lafPreference = gui.getSetting(LafPreference.class);
|
|---|
| 453 | - final JPanel panel = lafPreference.panel;
|
|---|
| 454 | + final JPanel panel = new JPanel();
|
|---|
| 455 | panel.add(new JLabel(tr("Language")), GBC.std().insets(20, 0, 0, 0));
|
|---|
| 456 | panel.add(GBC.glue(5,0), GBC.std().fill(GBC.HORIZONTAL));
|
|---|
| 457 | panel.add(langCombo, GBC.eol().fill(GBC.HORIZONTAL));
|
|---|
| 458 | - panel.add(Box.createVerticalGlue(), GBC.eol().fill(GBC.BOTH));
|
|---|
| 459 | + //panel.add(Box.createVerticalGlue(), GBC.eol().fill(GBC.BOTH));
|
|---|
| 460 | + createPreferenceTabWithScrollPane(gui, panel);
|
|---|
| 461 | }
|
|---|
| 462 |
|
|---|
| 463 | public boolean ok() {
|
|---|
| 464 | @@ -116,9 +119,4 @@
|
|---|
| 465 | public boolean isExpert() {
|
|---|
| 466 | return false;
|
|---|
| 467 | }
|
|---|
| 468 | -
|
|---|
| 469 | - @Override
|
|---|
| 470 | - public TabPreferenceSetting getTabPreferenceSetting(final PreferenceTabbedPane gui) {
|
|---|
| 471 | - return gui.getDisplayPreference();
|
|---|
| 472 | - }
|
|---|
| 473 | }
|
|---|
| 474 | Index: src/org/openstreetmap/josm/gui/preferences/display/DrawingPreference.java
|
|---|
| 475 | ===================================================================
|
|---|
| 476 | --- src/org/openstreetmap/josm/gui/preferences/display/DrawingPreference.java (revision 5506)
|
|---|
| 477 | +++ src/org/openstreetmap/josm/gui/preferences/display/DrawingPreference.java (working copy)
|
|---|
| 478 | @@ -12,18 +12,16 @@
|
|---|
| 479 | import javax.swing.JCheckBox;
|
|---|
| 480 | import javax.swing.JLabel;
|
|---|
| 481 | import javax.swing.JPanel;
|
|---|
| 482 | -import javax.swing.JScrollPane;
|
|---|
| 483 |
|
|---|
| 484 | import org.openstreetmap.josm.Main;
|
|---|
| 485 | import org.openstreetmap.josm.actions.ExpertToggleAction;
|
|---|
| 486 | +import org.openstreetmap.josm.gui.preferences.DefaultTabPreferenceSetting;
|
|---|
| 487 | import org.openstreetmap.josm.gui.preferences.PreferenceSetting;
|
|---|
| 488 | import org.openstreetmap.josm.gui.preferences.PreferenceSettingFactory;
|
|---|
| 489 | import org.openstreetmap.josm.gui.preferences.PreferenceTabbedPane;
|
|---|
| 490 | -import org.openstreetmap.josm.gui.preferences.SubPreferenceSetting;
|
|---|
| 491 | -import org.openstreetmap.josm.gui.preferences.TabPreferenceSetting;
|
|---|
| 492 | import org.openstreetmap.josm.tools.GBC;
|
|---|
| 493 |
|
|---|
| 494 | -public class DrawingPreference implements SubPreferenceSetting {
|
|---|
| 495 | +public class DrawingPreference extends DefaultTabPreferenceSetting {
|
|---|
| 496 |
|
|---|
| 497 | public static class Factory implements PreferenceSettingFactory {
|
|---|
| 498 | public PreferenceSetting createPreferenceSetting() {
|
|---|
| 499 | @@ -31,7 +29,6 @@
|
|---|
| 500 | }
|
|---|
| 501 | }
|
|---|
| 502 |
|
|---|
| 503 | - private GPXSettingsPanel gpxPanel;
|
|---|
| 504 | private JCheckBox directionHint = new JCheckBox(tr("Draw Direction Arrows"));
|
|---|
| 505 | private JCheckBox headArrow = new JCheckBox(tr("Only on the head of a way."));
|
|---|
| 506 | private JCheckBox onewayArrow = new JCheckBox(tr("Draw oneway arrows."));
|
|---|
| 507 | @@ -46,16 +43,13 @@
|
|---|
| 508 | private JCheckBox useAntialiasing = new JCheckBox(tr("Smooth map graphics (antialiasing)"));
|
|---|
| 509 | private JCheckBox outlineOnly = new JCheckBox(tr("Draw only outlines of areas"));
|
|---|
| 510 |
|
|---|
| 511 | + public DrawingPreference() {
|
|---|
| 512 | + super(null, tr("OSM Data"), "");
|
|---|
| 513 | + }
|
|---|
| 514 | +
|
|---|
| 515 | public void addGui(PreferenceTabbedPane gui) {
|
|---|
| 516 | - //gui.display.setPreferredSize(new Dimension(400,600));
|
|---|
| 517 | - gpxPanel = new GPXSettingsPanel();
|
|---|
| 518 | - gui.addValidationListener(gpxPanel);
|
|---|
| 519 | - JPanel panel = gpxPanel;
|
|---|
| 520 |
|
|---|
| 521 | - JScrollPane scrollpane = new JScrollPane(panel);
|
|---|
| 522 | - scrollpane.setBorder(BorderFactory.createEmptyBorder( 0, 0, 0, 0 ));
|
|---|
| 523 | - gui.getDisplayPreference().displaycontent.addTab(tr("GPS Points"), scrollpane);
|
|---|
| 524 | - panel = new JPanel(new GridBagLayout());
|
|---|
| 525 | + JPanel panel = new JPanel(new GridBagLayout());
|
|---|
| 526 | panel.setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
|
|---|
| 527 |
|
|---|
| 528 | // directionHint
|
|---|
| 529 | @@ -132,13 +126,11 @@
|
|---|
| 530 | ExpertToggleAction.addVisibilitySwitcher(outlineOnly);
|
|---|
| 531 |
|
|---|
| 532 | panel.add(Box.createVerticalGlue(), GBC.eol().fill(GBC.BOTH));
|
|---|
| 533 | - scrollpane = new JScrollPane(panel);
|
|---|
| 534 | - scrollpane.setBorder(BorderFactory.createEmptyBorder( 0, 0, 0, 0 ));
|
|---|
| 535 | - gui.getDisplayPreference().displaycontent.addTab(tr("OSM Data"), scrollpane);
|
|---|
| 536 | +
|
|---|
| 537 | + createPreferenceTabWithScrollPane(gui, panel);
|
|---|
| 538 | }
|
|---|
| 539 |
|
|---|
| 540 | public boolean ok() {
|
|---|
| 541 | - gpxPanel.savePreferences();
|
|---|
| 542 | Main.pref.put("draw.data.area_outline_only", outlineOnly.isSelected());
|
|---|
| 543 | Main.pref.put("draw.segment.direction", directionHint.isSelected());
|
|---|
| 544 | Main.pref.put("draw.segment.head_only", headArrow.isSelected());
|
|---|
| 545 | @@ -166,9 +158,4 @@
|
|---|
| 546 | public boolean isExpert() {
|
|---|
| 547 | return false;
|
|---|
| 548 | }
|
|---|
| 549 | -
|
|---|
| 550 | - @Override
|
|---|
| 551 | - public TabPreferenceSetting getTabPreferenceSetting(final PreferenceTabbedPane gui) {
|
|---|
| 552 | - return gui.getDisplayPreference();
|
|---|
| 553 | - }
|
|---|
| 554 | }
|
|---|
| 555 | Index: src/org/openstreetmap/josm/gui/preferences/display/ColorPreference.java
|
|---|
| 556 | ===================================================================
|
|---|
| 557 | --- src/org/openstreetmap/josm/gui/preferences/display/ColorPreference.java (revision 5506)
|
|---|
| 558 | +++ src/org/openstreetmap/josm/gui/preferences/display/ColorPreference.java (working copy)
|
|---|
| 559 | @@ -40,15 +40,14 @@
|
|---|
| 560 | import org.openstreetmap.josm.gui.layer.ImageryLayer;
|
|---|
| 561 | import org.openstreetmap.josm.gui.layer.OsmDataLayer;
|
|---|
| 562 | import org.openstreetmap.josm.gui.layer.markerlayer.MarkerLayer;
|
|---|
| 563 | +import org.openstreetmap.josm.gui.preferences.DefaultTabPreferenceSetting;
|
|---|
| 564 | import org.openstreetmap.josm.gui.preferences.PreferenceSetting;
|
|---|
| 565 | import org.openstreetmap.josm.gui.preferences.PreferenceSettingFactory;
|
|---|
| 566 | import org.openstreetmap.josm.gui.preferences.PreferenceTabbedPane;
|
|---|
| 567 | -import org.openstreetmap.josm.gui.preferences.SubPreferenceSetting;
|
|---|
| 568 | -import org.openstreetmap.josm.gui.preferences.TabPreferenceSetting;
|
|---|
| 569 | import org.openstreetmap.josm.tools.ColorHelper;
|
|---|
| 570 | import org.openstreetmap.josm.tools.GBC;
|
|---|
| 571 |
|
|---|
| 572 | -public class ColorPreference implements SubPreferenceSetting {
|
|---|
| 573 | +public class ColorPreference extends DefaultTabPreferenceSetting {
|
|---|
| 574 |
|
|---|
| 575 | public static class Factory implements PreferenceSettingFactory {
|
|---|
| 576 | public PreferenceSetting createPreferenceSetting() {
|
|---|
| 577 | @@ -64,6 +63,10 @@
|
|---|
| 578 | JButton defaultSet;
|
|---|
| 579 | JButton remove;
|
|---|
| 580 |
|
|---|
| 581 | + public ColorPreference() {
|
|---|
| 582 | + super(null, tr("Colors"), "");
|
|---|
| 583 | + }
|
|---|
| 584 | +
|
|---|
| 585 | /**
|
|---|
| 586 | * Set the colors to be shown in the preference table. This method creates a table model if
|
|---|
| 587 | * none exists and overwrites all existing values.
|
|---|
| 588 | @@ -238,7 +241,8 @@
|
|---|
| 589 | buttonPanel.add(defaultSet, GBC.std().insets(5,5,5,0));
|
|---|
| 590 | buttonPanel.add(defaultAll, GBC.std().insets(0,5,0,0));
|
|---|
| 591 | buttonPanel.add(remove, GBC.std().insets(0,5,0,0));
|
|---|
| 592 | - gui.getDisplayPreference().displaycontent.addTab(tr("Colors"), panel);
|
|---|
| 593 | +
|
|---|
| 594 | + createPreferenceTabWithScrollPane(gui, panel);
|
|---|
| 595 | }
|
|---|
| 596 |
|
|---|
| 597 | Boolean isRemoveColor(int row)
|
|---|
| 598 | @@ -283,9 +287,4 @@
|
|---|
| 599 | public boolean isExpert() {
|
|---|
| 600 | return false;
|
|---|
| 601 | }
|
|---|
| 602 | -
|
|---|
| 603 | - @Override
|
|---|
| 604 | - public TabPreferenceSetting getTabPreferenceSetting(final PreferenceTabbedPane gui) {
|
|---|
| 605 | - return gui.getDisplayPreference();
|
|---|
| 606 | - }
|
|---|
| 607 | }
|
|---|
| 608 | Index: src/org/openstreetmap/josm/gui/preferences/server/ProxyPreferencesPanel.java
|
|---|
| 609 | ===================================================================
|
|---|
| 610 | --- src/org/openstreetmap/josm/gui/preferences/server/ProxyPreferencesPanel.java (revision 5506)
|
|---|
| 611 | +++ src/org/openstreetmap/josm/gui/preferences/server/ProxyPreferencesPanel.java (working copy)
|
|---|
| 612 | @@ -28,15 +28,45 @@
|
|---|
| 613 | import org.openstreetmap.josm.Main;
|
|---|
| 614 | import org.openstreetmap.josm.gui.JMultilineLabel;
|
|---|
| 615 | import org.openstreetmap.josm.gui.help.HelpUtil;
|
|---|
| 616 | +import org.openstreetmap.josm.gui.preferences.DefaultTabPreferenceSetting;
|
|---|
| 617 | +import org.openstreetmap.josm.gui.preferences.PreferenceSetting;
|
|---|
| 618 | +import org.openstreetmap.josm.gui.preferences.PreferenceSettingFactory;
|
|---|
| 619 | +import org.openstreetmap.josm.gui.preferences.PreferenceTabbedPane;
|
|---|
| 620 | import org.openstreetmap.josm.gui.widgets.VerticallyScrollablePanel;
|
|---|
| 621 | import org.openstreetmap.josm.io.DefaultProxySelector;
|
|---|
| 622 | import org.openstreetmap.josm.io.auth.CredentialsAgent;
|
|---|
| 623 | import org.openstreetmap.josm.io.auth.CredentialsAgentException;
|
|---|
| 624 | import org.openstreetmap.josm.io.auth.CredentialsManager;
|
|---|
| 625 | import org.openstreetmap.josm.tools.GBC;
|
|---|
| 626 | +import sun.awt.VerticalBagLayout;
|
|---|
| 627 |
|
|---|
| 628 | public class ProxyPreferencesPanel extends VerticallyScrollablePanel {
|
|---|
| 629 |
|
|---|
| 630 | + public static class Factory implements PreferenceSettingFactory {
|
|---|
| 631 | +
|
|---|
| 632 | + @Override
|
|---|
| 633 | + public PreferenceSetting createPreferenceSetting() {
|
|---|
| 634 | + return new DefaultTabPreferenceSetting(null, tr("Proxy settings"), tr("Configure whether to use a proxy server")) {
|
|---|
| 635 | +
|
|---|
| 636 | + private ProxyPreferencesPanel pnlProxyPreferences;
|
|---|
| 637 | +
|
|---|
| 638 | + @Override
|
|---|
| 639 | + public void addGui(PreferenceTabbedPane gui) {
|
|---|
| 640 | + //createPreferenceTabWithScrollPane(gui, pnlProxyPreferences = new ProxyPreferencesPanel());
|
|---|
| 641 | + pnlProxyPreferences = new ProxyPreferencesPanel();
|
|---|
| 642 | + gui.createPreferenceTab(this).add(pnlProxyPreferences, GBC.eol().fill(GBC.BOTH));
|
|---|
| 643 | + pnlProxyPreferences.initFromPreferences();
|
|---|
| 644 | + }
|
|---|
| 645 | +
|
|---|
| 646 | + @Override
|
|---|
| 647 | + public boolean ok() {
|
|---|
| 648 | + pnlProxyPreferences.saveToPreferences();
|
|---|
| 649 | + return false;
|
|---|
| 650 | + }
|
|---|
| 651 | + };
|
|---|
| 652 | + }
|
|---|
| 653 | + }
|
|---|
| 654 | +
|
|---|
| 655 | public enum ProxyPolicy {
|
|---|
| 656 | NO_PROXY("no-proxy"),
|
|---|
| 657 | USE_SYSTEM_SETTINGS("use-system-settings"),
|
|---|
| 658 | @@ -361,10 +391,10 @@
|
|---|
| 659 | }
|
|---|
| 660 |
|
|---|
| 661 | public ProxyPreferencesPanel() {
|
|---|
| 662 | - setLayout(new GridBagLayout());
|
|---|
| 663 | - setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
|
|---|
| 664 | - add(buildProxySettingsPanel(), GBC.eop().anchor(GridBagConstraints.NORTHWEST).fill(GridBagConstraints.BOTH));
|
|---|
| 665 | + setLayout(new VerticalBagLayout(20));
|
|---|
| 666 |
|
|---|
| 667 | + add(buildProxySettingsPanel());
|
|---|
| 668 | +
|
|---|
| 669 | initFromPreferences();
|
|---|
| 670 | updateEnabledState();
|
|---|
| 671 |
|
|---|
| 672 | Index: src/org/openstreetmap/josm/gui/preferences/ServerAccessPreference.java
|
|---|
| 673 | ===================================================================
|
|---|
| 674 | --- src/org/openstreetmap/josm/gui/preferences/ServerAccessPreference.java (revision 5506)
|
|---|
| 675 | +++ src/org/openstreetmap/josm/gui/preferences/ServerAccessPreference.java (working copy)
|
|---|
| 676 | @@ -3,20 +3,13 @@
|
|---|
| 677 |
|
|---|
| 678 | import static org.openstreetmap.josm.tools.I18n.tr;
|
|---|
| 679 |
|
|---|
| 680 | -import java.awt.BorderLayout;
|
|---|
| 681 | -import java.awt.GridBagConstraints;
|
|---|
| 682 | -import java.awt.GridBagLayout;
|
|---|
| 683 | -import java.awt.Insets;
|
|---|
| 684 | -
|
|---|
| 685 | +import org.openstreetmap.josm.tools.GBC;
|
|---|
| 686 | +import sun.awt.VerticalBagLayout;
|
|---|
| 687 | import javax.swing.JPanel;
|
|---|
| 688 | -import javax.swing.JScrollPane;
|
|---|
| 689 | -import javax.swing.JTabbedPane;
|
|---|
| 690 | -
|
|---|
| 691 | import org.openstreetmap.josm.gui.help.HelpUtil;
|
|---|
| 692 | import org.openstreetmap.josm.gui.preferences.server.AuthenticationPreferencesPanel;
|
|---|
| 693 | import org.openstreetmap.josm.gui.preferences.server.OsmApiUrlInputPanel;
|
|---|
| 694 | -import org.openstreetmap.josm.gui.preferences.server.ProxyPreferencesPanel;
|
|---|
| 695 | -import org.openstreetmap.josm.gui.widgets.VerticallyScrollablePanel;
|
|---|
| 696 | +
|
|---|
| 697 | public class ServerAccessPreference extends DefaultTabPreferenceSetting {
|
|---|
| 698 |
|
|---|
| 699 | public static class Factory implements PreferenceSettingFactory {
|
|---|
| 700 | @@ -26,80 +19,28 @@
|
|---|
| 701 | }
|
|---|
| 702 |
|
|---|
| 703 | private ServerAccessPreference() {
|
|---|
| 704 | - super("connection", tr("Connection Settings"), tr("Connection Settings for the OSM server."));
|
|---|
| 705 | + super("connection", tr("Connection Settings"),
|
|---|
| 706 | + tr("Connection Settings for the OSM server as well as your identity and how to authenticate at the OSM server."));
|
|---|
| 707 | }
|
|---|
| 708 |
|
|---|
| 709 | private OsmApiUrlInputPanel pnlApiUrlPreferences;
|
|---|
| 710 |
|
|---|
| 711 | - private JTabbedPane tpServerPreferences;
|
|---|
| 712 | /** indicates whether to use the default OSM URL or not */
|
|---|
| 713 | /** panel for configuring authentication preferences */
|
|---|
| 714 | private AuthenticationPreferencesPanel pnlAuthPreferences;
|
|---|
| 715 | - /** panel for configuring proxy preferences */
|
|---|
| 716 | - private ProxyPreferencesPanel pnlProxyPreferences;
|
|---|
| 717 | - /** panel for backup preferences */
|
|---|
| 718 |
|
|---|
| 719 | /**
|
|---|
| 720 | - * Embeds a vertically scrollable panel in a {@link JScrollPane}
|
|---|
| 721 | - * @param panel the panel
|
|---|
| 722 | - * @return the scroll pane
|
|---|
| 723 | - */
|
|---|
| 724 | - protected JScrollPane wrapVerticallyScrollablePanel(VerticallyScrollablePanel panel) {
|
|---|
| 725 | - JScrollPane sp = new JScrollPane(panel);
|
|---|
| 726 | - sp.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
|
|---|
| 727 | - sp.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
|
|---|
| 728 | - return sp;
|
|---|
| 729 | - }
|
|---|
| 730 | -
|
|---|
| 731 | - /**
|
|---|
| 732 | - * Builds the tabbed pane with the server preferences
|
|---|
| 733 | - *
|
|---|
| 734 | - * @return
|
|---|
| 735 | - */
|
|---|
| 736 | - protected JPanel buildTabbedServerPreferences() {
|
|---|
| 737 | - JPanel pnl = new JPanel(new BorderLayout());
|
|---|
| 738 | -
|
|---|
| 739 | - tpServerPreferences = new JTabbedPane();
|
|---|
| 740 | - pnlAuthPreferences = new AuthenticationPreferencesPanel();
|
|---|
| 741 | - tpServerPreferences.add(wrapVerticallyScrollablePanel(pnlAuthPreferences));
|
|---|
| 742 | - pnlProxyPreferences = new ProxyPreferencesPanel();
|
|---|
| 743 | - tpServerPreferences.add(wrapVerticallyScrollablePanel(pnlProxyPreferences));
|
|---|
| 744 | -
|
|---|
| 745 | - tpServerPreferences.setTitleAt(0, tr("Authentication"));
|
|---|
| 746 | - tpServerPreferences.setTitleAt(1, tr("Proxy settings"));
|
|---|
| 747 | - tpServerPreferences.setToolTipTextAt(0, tr("Configure your identity and how to authenticate at the OSM server"));
|
|---|
| 748 | - tpServerPreferences.setToolTipTextAt(1, tr("Configure whether to use a proxy server"));
|
|---|
| 749 | -
|
|---|
| 750 | - pnl.add(tpServerPreferences, BorderLayout.CENTER);
|
|---|
| 751 | - return pnl;
|
|---|
| 752 | - }
|
|---|
| 753 | -
|
|---|
| 754 | - /**
|
|---|
| 755 | * Builds the panel for entering the server access preferences
|
|---|
| 756 | *
|
|---|
| 757 | * @return
|
|---|
| 758 | */
|
|---|
| 759 | protected JPanel buildContentPanel() {
|
|---|
| 760 | - JPanel pnl = new JPanel(new GridBagLayout());
|
|---|
| 761 | - GridBagConstraints gc = new GridBagConstraints();
|
|---|
| 762 | + JPanel pnl = new JPanel(new VerticalBagLayout(20));
|
|---|
| 763 |
|
|---|
| 764 | - // the checkbox for the default UL
|
|---|
| 765 | - gc.fill = GridBagConstraints.HORIZONTAL;
|
|---|
| 766 | - gc.anchor = GridBagConstraints.NORTHWEST;
|
|---|
| 767 | - gc.weightx = 1.0;
|
|---|
| 768 | - gc.insets = new Insets(0,0,0,0);
|
|---|
| 769 | - pnl.add(pnlApiUrlPreferences = new OsmApiUrlInputPanel(), gc);
|
|---|
| 770 | + pnl.add(pnlApiUrlPreferences = new OsmApiUrlInputPanel());
|
|---|
| 771 | + pnl.add(pnlAuthPreferences = new AuthenticationPreferencesPanel());
|
|---|
| 772 |
|
|---|
| 773 | - // the remaining access properties
|
|---|
| 774 | - gc.gridy = 1;
|
|---|
| 775 | - gc.fill = GridBagConstraints.BOTH;
|
|---|
| 776 | - gc.weightx = 1.0;
|
|---|
| 777 | - gc.weighty = 1.0;
|
|---|
| 778 | - gc.insets = new Insets(10,0,3,3);
|
|---|
| 779 | - pnl.add(buildTabbedServerPreferences(), gc);
|
|---|
| 780 | -
|
|---|
| 781 | // let the AuthPreferencesPanel know when the API URL changes
|
|---|
| 782 | - //
|
|---|
| 783 | pnlApiUrlPreferences.addPropertyChangeListener(pnlAuthPreferences);
|
|---|
| 784 |
|
|---|
| 785 | HelpUtil.setHelpContext(pnl, HelpUtil.ht("/Preferences/Connection"));
|
|---|
| 786 | @@ -107,13 +48,8 @@
|
|---|
| 787 | }
|
|---|
| 788 |
|
|---|
| 789 | public void addGui(PreferenceTabbedPane gui) {
|
|---|
| 790 | - GridBagConstraints gc = new GridBagConstraints();
|
|---|
| 791 | - gc.fill = GridBagConstraints.BOTH;
|
|---|
| 792 | - gc.weightx = 1.0;
|
|---|
| 793 | - gc.weighty = 1.0;
|
|---|
| 794 | - gc.anchor = GridBagConstraints.NORTHWEST;
|
|---|
| 795 | - gui.createPreferenceTab(this).add(buildContentPanel(), gc);
|
|---|
| 796 | -
|
|---|
| 797 | + //createPreferenceTabWithScrollPane(gui, buildContentPanel());
|
|---|
| 798 | + gui.createPreferenceTab(this).add(buildContentPanel(), GBC.eol().fill(GBC.BOTH));
|
|---|
| 799 | initFromPreferences();
|
|---|
| 800 | }
|
|---|
| 801 |
|
|---|
| 802 | @@ -123,7 +59,6 @@
|
|---|
| 803 | public void initFromPreferences() {
|
|---|
| 804 | pnlApiUrlPreferences.initFromPreferences();
|
|---|
| 805 | pnlAuthPreferences.initFromPreferences();
|
|---|
| 806 | - pnlProxyPreferences.initFromPreferences();
|
|---|
| 807 | }
|
|---|
| 808 |
|
|---|
| 809 | /**
|
|---|
| 810 | @@ -132,7 +67,6 @@
|
|---|
| 811 | public boolean ok() {
|
|---|
| 812 | pnlApiUrlPreferences.saveToPreferences();
|
|---|
| 813 | pnlAuthPreferences.saveToPreferences();
|
|---|
| 814 | - pnlProxyPreferences.saveToPreferences();
|
|---|
| 815 | return false;
|
|---|
| 816 | }
|
|---|
| 817 | }
|
|---|
| 818 | Index: src/org/openstreetmap/josm/gui/preferences/RemoteControlPreference.java
|
|---|
| 819 | ===================================================================
|
|---|
| 820 | --- src/org/openstreetmap/josm/gui/preferences/RemoteControlPreference.java (revision 5506)
|
|---|
| 821 | +++ src/org/openstreetmap/josm/gui/preferences/RemoteControlPreference.java (working copy)
|
|---|
| 822 | @@ -105,7 +105,8 @@
|
|---|
| 823 | };
|
|---|
| 824 | enableRemoteControl.addActionListener(remoteControlEnabled);
|
|---|
| 825 | remoteControlEnabled.actionPerformed(null);
|
|---|
| 826 | - createPreferenceTabWithScrollPane(gui, remote);
|
|---|
| 827 | + //createPreferenceTabWithScrollPane(gui, remote);
|
|---|
| 828 | + gui.createPreferenceTab(this).add(remote, GBC.eol().fill(GBC.BOTH));
|
|---|
| 829 | }
|
|---|
| 830 |
|
|---|
| 831 | @Override
|
|---|
| 832 | Index: src/org/openstreetmap/josm/gui/preferences/map/TaggingPresetPreference.java
|
|---|
| 833 | ===================================================================
|
|---|
| 834 | --- src/org/openstreetmap/josm/gui/preferences/map/TaggingPresetPreference.java (revision 5506)
|
|---|
| 835 | +++ src/org/openstreetmap/josm/gui/preferences/map/TaggingPresetPreference.java (working copy)
|
|---|
| 836 | @@ -12,7 +12,6 @@
|
|---|
| 837 | import java.util.HashMap;
|
|---|
| 838 | import java.util.List;
|
|---|
| 839 | import java.util.Map;
|
|---|
| 840 | -
|
|---|
| 841 | import javax.swing.BorderFactory;
|
|---|
| 842 | import javax.swing.JCheckBox;
|
|---|
| 843 | import javax.swing.JLabel;
|
|---|
| 844 | @@ -21,11 +20,9 @@
|
|---|
| 845 | import javax.swing.JOptionPane;
|
|---|
| 846 | import javax.swing.JPanel;
|
|---|
| 847 | import javax.swing.JSeparator;
|
|---|
| 848 | -import javax.swing.event.ChangeEvent;
|
|---|
| 849 | -import javax.swing.event.ChangeListener;
|
|---|
| 850 | -
|
|---|
| 851 | import org.openstreetmap.josm.Main;
|
|---|
| 852 | import org.openstreetmap.josm.gui.ExtendedDialog;
|
|---|
| 853 | +import org.openstreetmap.josm.gui.preferences.DefaultTabPreferenceSetting;
|
|---|
| 854 | import org.openstreetmap.josm.gui.preferences.PreferenceSetting;
|
|---|
| 855 | import org.openstreetmap.josm.gui.preferences.PreferenceSettingFactory;
|
|---|
| 856 | import org.openstreetmap.josm.gui.preferences.PreferenceTabbedPane;
|
|---|
| 857 | @@ -34,8 +31,6 @@
|
|---|
| 858 | import org.openstreetmap.josm.gui.preferences.SourceEditor.ExtendedSourceEntry;
|
|---|
| 859 | import org.openstreetmap.josm.gui.preferences.SourceEntry;
|
|---|
| 860 | import org.openstreetmap.josm.gui.preferences.SourceProvider;
|
|---|
| 861 | -import org.openstreetmap.josm.gui.preferences.SubPreferenceSetting;
|
|---|
| 862 | -import org.openstreetmap.josm.gui.preferences.TabPreferenceSetting;
|
|---|
| 863 | import org.openstreetmap.josm.gui.tagging.TaggingPreset;
|
|---|
| 864 | import org.openstreetmap.josm.gui.tagging.TaggingPresetMenu;
|
|---|
| 865 | import org.openstreetmap.josm.gui.tagging.TaggingPresetSeparator;
|
|---|
| 866 | @@ -44,7 +39,7 @@
|
|---|
| 867 | import org.xml.sax.SAXException;
|
|---|
| 868 | import org.xml.sax.SAXParseException;
|
|---|
| 869 |
|
|---|
| 870 | -public class TaggingPresetPreference implements SubPreferenceSetting {
|
|---|
| 871 | +public class TaggingPresetPreference extends DefaultTabPreferenceSetting {
|
|---|
| 872 |
|
|---|
| 873 | public static class Factory implements PreferenceSettingFactory {
|
|---|
| 874 | public PreferenceSetting createPreferenceSetting() {
|
|---|
| 875 | @@ -53,7 +48,7 @@
|
|---|
| 876 | }
|
|---|
| 877 |
|
|---|
| 878 | private TaggingPresetPreference() {
|
|---|
| 879 | - super();
|
|---|
| 880 | + super(null, tr("Tagging Presets"), "");
|
|---|
| 881 | }
|
|---|
| 882 |
|
|---|
| 883 | private static final List<SourceProvider> presetSourceProviders = new ArrayList<SourceProvider>();
|
|---|
| 884 | @@ -153,6 +148,7 @@
|
|---|
| 885 | }
|
|---|
| 886 | };
|
|---|
| 887 |
|
|---|
| 888 | + @Override
|
|---|
| 889 | public void addGui(final PreferenceTabbedPane gui) {
|
|---|
| 890 | sortMenu = new JCheckBox(tr("Sort presets menu"),
|
|---|
| 891 | Main.pref.getBoolean("taggingpreset.sortmenu", false));
|
|---|
| 892 | @@ -162,21 +158,11 @@
|
|---|
| 893 | panel.add(sortMenu, GBC.eol().insets(5,5,5,0));
|
|---|
| 894 | sources = new TaggingPresetSourceEditor();
|
|---|
| 895 | panel.add(sources, GBC.eol().fill(GBC.BOTH));
|
|---|
| 896 | - gui.getMapPreference().mapcontent.addTab(tr("Tagging Presets"), panel);
|
|---|
| 897 | +
|
|---|
| 898 | + //createPreferenceTabWithScrollPane(gui, panel);
|
|---|
| 899 | + gui.createPreferenceTab(this).add(panel, GBC.eol().fill(GBC.BOTH));
|
|---|
| 900 |
|
|---|
| 901 | - // this defers loading of tagging preset sources to the first time the tab
|
|---|
| 902 | - // with the tagging presets is selected by the user
|
|---|
| 903 | - //
|
|---|
| 904 | - gui.getMapPreference().mapcontent.addChangeListener(
|
|---|
| 905 | - new ChangeListener() {
|
|---|
| 906 | - public void stateChanged(ChangeEvent e) {
|
|---|
| 907 | - if (gui.getMapPreference().mapcontent.getSelectedComponent() == panel) {
|
|---|
| 908 | - sources.initiallyLoadAvailableSources();
|
|---|
| 909 | - }
|
|---|
| 910 | - }
|
|---|
| 911 | - }
|
|---|
| 912 | - );
|
|---|
| 913 | - gui.addValidationListener(validationListener);
|
|---|
| 914 | + sources.initiallyLoadAvailableSources();
|
|---|
| 915 | }
|
|---|
| 916 |
|
|---|
| 917 | static class TaggingPresetSourceEditor extends SourceEditor {
|
|---|
| 918 | @@ -353,9 +339,4 @@
|
|---|
| 919 | public boolean isExpert() {
|
|---|
| 920 | return false;
|
|---|
| 921 | }
|
|---|
| 922 | -
|
|---|
| 923 | - @Override
|
|---|
| 924 | - public TabPreferenceSetting getTabPreferenceSetting(final PreferenceTabbedPane gui) {
|
|---|
| 925 | - return gui.getMapPreference();
|
|---|
| 926 | - }
|
|---|
| 927 | }
|
|---|
| 928 | Index: src/org/openstreetmap/josm/gui/preferences/map/BackupPreference.java
|
|---|
| 929 | ===================================================================
|
|---|
| 930 | --- src/org/openstreetmap/josm/gui/preferences/map/BackupPreference.java (revision 5506)
|
|---|
| 931 | +++ src/org/openstreetmap/josm/gui/preferences/map/BackupPreference.java (working copy)
|
|---|
| 932 | @@ -18,15 +18,14 @@
|
|---|
| 933 |
|
|---|
| 934 | import org.openstreetmap.josm.data.AutosaveTask;
|
|---|
| 935 | import org.openstreetmap.josm.data.preferences.BooleanProperty;
|
|---|
| 936 | +import org.openstreetmap.josm.gui.preferences.DefaultTabPreferenceSetting;
|
|---|
| 937 | import org.openstreetmap.josm.gui.preferences.PreferenceSettingFactory;
|
|---|
| 938 | import org.openstreetmap.josm.gui.preferences.PreferenceTabbedPane;
|
|---|
| 939 | -import org.openstreetmap.josm.gui.preferences.SubPreferenceSetting;
|
|---|
| 940 | -import org.openstreetmap.josm.gui.preferences.TabPreferenceSetting;
|
|---|
| 941 | import org.openstreetmap.josm.gui.widgets.HtmlPanel;
|
|---|
| 942 | import org.openstreetmap.josm.gui.widgets.VerticallyScrollablePanel;
|
|---|
| 943 | import org.openstreetmap.josm.tools.GBC;
|
|---|
| 944 |
|
|---|
| 945 | -public class BackupPreference implements SubPreferenceSetting {
|
|---|
| 946 | +public class BackupPreference extends DefaultTabPreferenceSetting {
|
|---|
| 947 |
|
|---|
| 948 | public static class Factory implements PreferenceSettingFactory {
|
|---|
| 949 | @Override
|
|---|
| 950 | @@ -96,14 +95,26 @@
|
|---|
| 951 | autosaveEnabled.actionPerformed(null);
|
|---|
| 952 |
|
|---|
| 953 | panel.add(Box.createVerticalGlue(), GBC.eol().fill(GBC.BOTH));
|
|---|
| 954 | - JScrollPane sp = new JScrollPane(panel);
|
|---|
| 955 | - sp.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
|
|---|
| 956 | - sp.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
|
|---|
| 957 |
|
|---|
| 958 | - gui.getMapPreference().mapcontent.addTab(tr("File backup"), null, sp, tr("Configure whether to create backup files"));
|
|---|
| 959 | + createPreferenceTabWithScrollPane(gui, panel);
|
|---|
| 960 | }
|
|---|
| 961 |
|
|---|
| 962 | @Override
|
|---|
| 963 | + public String getIconName() {
|
|---|
| 964 | + return null;
|
|---|
| 965 | + }
|
|---|
| 966 | +
|
|---|
| 967 | + @Override
|
|---|
| 968 | + public String getTitle() {
|
|---|
| 969 | + return tr("File backup");
|
|---|
| 970 | + }
|
|---|
| 971 | +
|
|---|
| 972 | + @Override
|
|---|
| 973 | + public String getTooltip() {
|
|---|
| 974 | + return tr("Configure whether to create backup files");
|
|---|
| 975 | + }
|
|---|
| 976 | +
|
|---|
| 977 | + @Override
|
|---|
| 978 | public boolean ok() {
|
|---|
| 979 | boolean restartRequired = false;
|
|---|
| 980 | PROP_KEEP_BACKUP.put(keepBackup.isSelected());
|
|---|
| 981 | @@ -115,12 +126,12 @@
|
|---|
| 982 | }
|
|---|
| 983 |
|
|---|
| 984 | @Override
|
|---|
| 985 | - public boolean isExpert() {
|
|---|
| 986 | - return false;
|
|---|
| 987 | + public String getDescription() {
|
|---|
| 988 | + return getTooltip();
|
|---|
| 989 | }
|
|---|
| 990 |
|
|---|
| 991 | @Override
|
|---|
| 992 | - public TabPreferenceSetting getTabPreferenceSetting(final PreferenceTabbedPane gui) {
|
|---|
| 993 | - return gui.getMapPreference();
|
|---|
| 994 | + public boolean isExpert() {
|
|---|
| 995 | + return false;
|
|---|
| 996 | }
|
|---|
| 997 | }
|
|---|
| 998 | Index: src/org/openstreetmap/josm/gui/preferences/map/MapPaintPreference.java
|
|---|
| 999 | ===================================================================
|
|---|
| 1000 | --- src/org/openstreetmap/josm/gui/preferences/map/MapPaintPreference.java (revision 5506)
|
|---|
| 1001 | +++ src/org/openstreetmap/josm/gui/preferences/map/MapPaintPreference.java (working copy)
|
|---|
| 1002 | @@ -12,15 +12,12 @@
|
|---|
| 1003 | import java.util.List;
|
|---|
| 1004 | import java.util.Map;
|
|---|
| 1005 | import java.util.TreeSet;
|
|---|
| 1006 | -
|
|---|
| 1007 | import javax.swing.BorderFactory;
|
|---|
| 1008 | import javax.swing.JCheckBox;
|
|---|
| 1009 | import javax.swing.JPanel;
|
|---|
| 1010 | -import javax.swing.event.ChangeEvent;
|
|---|
| 1011 | -import javax.swing.event.ChangeListener;
|
|---|
| 1012 | -
|
|---|
| 1013 | import org.openstreetmap.josm.Main;
|
|---|
| 1014 | import org.openstreetmap.josm.gui.mappaint.MapPaintStyles;
|
|---|
| 1015 | +import org.openstreetmap.josm.gui.preferences.DefaultTabPreferenceSetting;
|
|---|
| 1016 | import org.openstreetmap.josm.gui.preferences.PreferenceSetting;
|
|---|
| 1017 | import org.openstreetmap.josm.gui.preferences.PreferenceSettingFactory;
|
|---|
| 1018 | import org.openstreetmap.josm.gui.preferences.PreferenceTabbedPane;
|
|---|
| 1019 | @@ -28,13 +25,11 @@
|
|---|
| 1020 | import org.openstreetmap.josm.gui.preferences.SourceEditor.ExtendedSourceEntry;
|
|---|
| 1021 | import org.openstreetmap.josm.gui.preferences.SourceEntry;
|
|---|
| 1022 | import org.openstreetmap.josm.gui.preferences.SourceProvider;
|
|---|
| 1023 | -import org.openstreetmap.josm.gui.preferences.SubPreferenceSetting;
|
|---|
| 1024 | -import org.openstreetmap.josm.gui.preferences.TabPreferenceSetting;
|
|---|
| 1025 | import org.openstreetmap.josm.tools.GBC;
|
|---|
| 1026 | import org.openstreetmap.josm.tools.Predicate;
|
|---|
| 1027 | import org.openstreetmap.josm.tools.Utils;
|
|---|
| 1028 |
|
|---|
| 1029 | -public class MapPaintPreference implements SubPreferenceSetting {
|
|---|
| 1030 | +public class MapPaintPreference extends DefaultTabPreferenceSetting {
|
|---|
| 1031 | private SourceEditor sources;
|
|---|
| 1032 | private JCheckBox enableIconDefault;
|
|---|
| 1033 |
|
|---|
| 1034 | @@ -52,6 +47,11 @@
|
|---|
| 1035 | }
|
|---|
| 1036 | }
|
|---|
| 1037 |
|
|---|
| 1038 | + public MapPaintPreference() {
|
|---|
| 1039 | + super(null, tr("Map Paint Styles"), "");
|
|---|
| 1040 | + }
|
|---|
| 1041 | +
|
|---|
| 1042 | + @Override
|
|---|
| 1043 | public void addGui(final PreferenceTabbedPane gui) {
|
|---|
| 1044 | enableIconDefault = new JCheckBox(tr("Enable built-in icon defaults"),
|
|---|
| 1045 | Main.pref.getBoolean("mappaint.icon.enable-defaults", true));
|
|---|
| 1046 | @@ -64,20 +64,10 @@
|
|---|
| 1047 | panel.add(sources, GBC.eol().fill(GBC.BOTH));
|
|---|
| 1048 | panel.add(enableIconDefault, GBC.eol().insets(11,2,5,0));
|
|---|
| 1049 |
|
|---|
| 1050 | - gui.getMapPreference().mapcontent.addTab(tr("Map Paint Styles"), panel);
|
|---|
| 1051 | + //createPreferenceTabWithScrollPane(gui, panel);
|
|---|
| 1052 | + gui.createPreferenceTab(this).add(panel, GBC.eol().fill(GBC.BOTH));
|
|---|
| 1053 |
|
|---|
| 1054 | - // this defers loading of style sources to the first time the tab
|
|---|
| 1055 | - // with the map paint preferences is selected by the user
|
|---|
| 1056 | - //
|
|---|
| 1057 | - gui.getMapPreference().mapcontent.addChangeListener(
|
|---|
| 1058 | - new ChangeListener() {
|
|---|
| 1059 | - public void stateChanged(ChangeEvent e) {
|
|---|
| 1060 | - if (gui.getMapPreference().mapcontent.getSelectedComponent() == panel) {
|
|---|
| 1061 | - sources.initiallyLoadAvailableSources();
|
|---|
| 1062 | - }
|
|---|
| 1063 | - }
|
|---|
| 1064 | - }
|
|---|
| 1065 | - );
|
|---|
| 1066 | + sources.initiallyLoadAvailableSources();
|
|---|
| 1067 | }
|
|---|
| 1068 |
|
|---|
| 1069 | static class MapPaintSourceEditor extends SourceEditor {
|
|---|
| 1070 | @@ -286,9 +276,4 @@
|
|---|
| 1071 | public boolean isExpert() {
|
|---|
| 1072 | return false;
|
|---|
| 1073 | }
|
|---|
| 1074 | -
|
|---|
| 1075 | - @Override
|
|---|
| 1076 | - public TabPreferenceSetting getTabPreferenceSetting(final PreferenceTabbedPane gui) {
|
|---|
| 1077 | - return gui.getMapPreference();
|
|---|
| 1078 | - }
|
|---|
| 1079 | }
|
|---|
| 1080 | Index: src/org/openstreetmap/josm/gui/preferences/PreferenceDialog.java
|
|---|
| 1081 | ===================================================================
|
|---|
| 1082 | --- src/org/openstreetmap/josm/gui/preferences/PreferenceDialog.java (revision 5506)
|
|---|
| 1083 | +++ src/org/openstreetmap/josm/gui/preferences/PreferenceDialog.java (working copy)
|
|---|
| 1084 | @@ -169,9 +169,4 @@
|
|---|
| 1085 | new CancelAction().cancel();
|
|---|
| 1086 | }
|
|---|
| 1087 | }
|
|---|
| 1088 | -
|
|---|
| 1089 | - public void selectMapPaintPreferenceTab() {
|
|---|
| 1090 | - tpPreferences.selectTabByPref(MapPreference.class);
|
|---|
| 1091 | - tpPreferences.getMapPreference().mapcontent.setSelectedIndex(1);
|
|---|
| 1092 | - }
|
|---|
| 1093 | }
|
|---|