Changes between Version 58 and Version 59 of DevelopersGuide/DevelopingPlugins


Ignore:
Timestamp:
2012-02-17T23:20:07+01:00 (13 years ago)
Author:
Don-vip
Comment:

reflect 4968, r4969 and r4970 changes in preferences settings handling

Legend:

Unmodified
Added
Removed
Modified
  • DevelopersGuide/DevelopingPlugins

    v58 v59  
    105105  * {{{public PreferenceSetting getPreferenceSetting()}}}
    106106 
    107   The [source:/trunk/src/org/openstreetmap/josm/gui/preferences/PreferenceDialog.java JOSM preference dialog] asks a plugin to supply an editor for its preferences. The editor must be a subclass of [source:/trunk/src/org/openstreetmap/josm/gui/preferences/PreferenceSetting.java PreferenceSetting]. Return null from {{{getPreferenceSetting}}} or don't implement it if your plugin has no need to manage preferences.
     107  The [source:/trunk/src/org/openstreetmap/josm/gui/preferences/PreferenceDialog.java JOSM preference dialog] asks a plugin to supply an editor for its preferences. The editor must implement [source:/trunk/src/org/openstreetmap/josm/gui/preferences/PreferenceSetting.java PreferenceSetting]. Return null from {{{getPreferenceSetting}}} or don't implement it if your plugin has no need to manage preferences.
     108
     109  You have basically two choices to implement your preferences editor. The first one is to provide a preferences editor with its own toolbar button in the preferences dialog. To do this, the editor must implement [source:/trunk/src/org/openstreetmap/josm/gui/preferences/TabPreferenceSetting.java TabPreferenceSetting]. The class [source:/trunk/src/org/openstreetmap/josm/gui/preferences/DefaultTabPreferenceSetting.java DefaultTabPreferenceSetting] may help you to achieve this. Alternatively, the editor may plug itself as an additional tab of an existing editor (for example, Display settings). To do this, the editor must implement [source:/trunk/src/org/openstreetmap/josm/gui/preferences/SubPreferenceSetting.java SubPreferenceSetting].
    108110
    109111  * {{{public void addDownloadSelection(List<DownloadSelection> list)}}}