|
Last change
on this file since 34506 was 33530, checked in by donvip, 8 years ago |
|
update to JOSM 12663
|
-
Property svn:eol-style
set to
native
|
|
File size:
834 bytes
|
| Line | |
|---|
| 1 | // License: GPL. For details, see LICENSE file.
|
|---|
| 2 | package relcontext;
|
|---|
| 3 |
|
|---|
| 4 | import org.openstreetmap.josm.data.osm.DefaultNameFormatter;
|
|---|
| 5 | import org.openstreetmap.josm.gui.MapFrame;
|
|---|
| 6 | import org.openstreetmap.josm.plugins.Plugin;
|
|---|
| 7 | import org.openstreetmap.josm.plugins.PluginInformation;
|
|---|
| 8 |
|
|---|
| 9 | public class RelContextPlugin extends Plugin {
|
|---|
| 10 | private RelContextDialog dialog;
|
|---|
| 11 |
|
|---|
| 12 | public RelContextPlugin(PluginInformation info) {
|
|---|
| 13 | super(info);
|
|---|
| 14 | DefaultNameFormatter.registerFormatHook(new ExtraNameFormatHook());
|
|---|
| 15 | }
|
|---|
| 16 |
|
|---|
| 17 | @Override
|
|---|
| 18 | public void mapFrameInitialized(MapFrame oldFrame, MapFrame newFrame) {
|
|---|
| 19 | if (oldFrame == null && newFrame != null) {
|
|---|
| 20 | // if (dialog!=null) dialog.destroy();
|
|---|
| 21 | dialog = new RelContextDialog();
|
|---|
| 22 | newFrame.addToggleDialog(dialog);
|
|---|
| 23 | }
|
|---|
| 24 | }
|
|---|
| 25 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.