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]. |