Changeset 4987 in josm for trunk/src/org
- Timestamp:
- 2012-02-18T17:24:05+01:00 (13 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/gui/preferences
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/preferences/PreferenceTabbedPane.java
r4974 r4987 68 68 boolean validatePreferences(); 69 69 } 70 70 71 71 private static interface PreferenceTab { 72 72 public TabPreferenceSetting getTabPreferenceSetting(); 73 73 public Component getComponent(); 74 74 } 75 75 76 76 public static class PreferencePanel extends JPanel implements PreferenceTab { 77 77 private final TabPreferenceSetting preferenceSetting; … … 83 83 buildPanel(); 84 84 } 85 85 86 86 protected void buildPanel() { 87 87 setBorder(BorderFactory.createEmptyBorder(5,5,5,5)); … … 132 132 private final static Collection<PreferenceSettingFactory> settingsFactory = new LinkedList<PreferenceSettingFactory>(); 133 133 private final List<PreferenceSetting> settings = new ArrayList<PreferenceSetting>(); 134 134 135 135 // distinct list of tabs that have been initialized (we do not initialize tabs until they are displayed to speed up dialog startup) 136 136 private final List<PreferenceSetting> settingsInitialized = new ArrayList<PreferenceSetting>(); … … 179 179 public boolean identify(TabPreferenceSetting tps, Object param); 180 180 } 181 181 182 182 private void selectTabBy(TabIdentifier method, Object param) { 183 183 for (int i=0; i<getTabCount(); i++) { … … 192 192 } 193 193 } 194 194 195 195 public void selectTabByName(String name) { 196 196 selectTabBy(new TabIdentifier(){ … … 208 208 }}, clazz); 209 209 } 210 210 211 211 public final DisplayPreference getDisplayPreference() { 212 212 return getSetting(DisplayPreference.class); 213 213 } 214 214 215 215 public final MapPreference getMapPreference() { 216 216 return getSetting(MapPreference.class); 217 217 } 218 218 219 219 public final PluginPreference getPluginPreference() { 220 220 return getSetting(PluginPreference.class); 221 } 222 223 public final ImageryPreference getImageryPreference() { 224 return getSetting(ImageryPreference.class); 221 225 } 222 226 … … 329 333 } 330 334 } 331 335 332 336 private void insertGUITabsForSetting(Icon icon, TabPreferenceSetting tps, int index) { 333 337 int position = index; … … 338 342 } 339 343 } 340 344 341 345 private void addGUITabs(boolean clear) { 342 346 boolean expert = ExpertToggleAction.isExpert(); … … 369 373 } catch (IllegalArgumentException e) {} 370 374 } 371 375 372 376 @Override 373 377 public void expertChanged(boolean isExpert) { -
trunk/src/org/openstreetmap/josm/gui/preferences/SubPreferenceSetting.java
r4968 r4987 2 2 package org.openstreetmap.josm.gui.preferences; 3 3 4 /** 5 * Preference settings, that do *not* display a top level tab. 6 * 7 * This preference setting's addGui method is called after the user clicked the parent tab 8 * (returned by getTabPreferenceSetting). 9 */ 4 10 public interface SubPreferenceSetting extends PreferenceSetting { 5 11 6 12 /** 7 13 * Returns the preference setting (displayed in the specified preferences tab pane) that contains this preference setting. -
trunk/src/org/openstreetmap/josm/gui/preferences/imagery/ImageryPreference.java
r4968 r4987 94 94 } 95 95 } 96 96 97 97 private ImageryPreference() { 98 98 super("imagery", tr("Imagery Preferences"), tr("Modify list of imagery layers displayed in the Imagery menu")); 99 99 } 100 100 101 101 private ImageryProvidersPanel imageryProviders; 102 102 private ImageryLayerInfo layerInfo;
Note:
See TracChangeset
for help on using the changeset viewer.