[josm-dev] To plugin developers: change in plugin interface
Vincent Privat
vincent.privat at gmail.com
Fri Feb 17 22:35:07 GMT 2012
Hi,
I have checked in a significant change in JOSM preferences settings GUI
system that impacts the plugin interface.
Starting from JOSM 4968+, plugins that use preferences have some minor
changes to do.
This is briefly documented here:
http://josm.openstreetmap.de/wiki/DevelopersGuide/DevelopingPlugins#Theplugininterface
In nearly all cases, this change should be enough to update your plugin:
--------------------------------------------------------------------------------------------------------------------------
public class MyPreferenceSetting implements PreferenceSetting {
@Override
public void addGui(PreferenceTabbedPane gui) {
JPanel panel = gui.createPreferenceTab(iconName, tr("title"),
tr("description"));
--------------------------------------------------------------------------------------------------------------------------
to:
--------------------------------------------------------------------------------------------------------------------------
public class MyPreferenceSetting extends DefaultTabPreferenceSetting {
public MyPreferenceSetting() {
super(iconName, tr("title"), tr("description"));
}
@Override
public void addGui(PreferenceTabbedPane gui) {
JPanel panel = gui.createPreferenceTab(this);
--------------------------------------------------------------------------------------------------------------------------
Let me know if you struggle to update your plugin or if you find unexpected
bugs.
Regards,
Vincent
More information about the josm-dev
mailing list