|
Last change
on this file since 30738 was 30738, checked in by donvip, 12 years ago |
|
[josm_plugins] fix java 7 warnings / global usage of try-with-resource
|
|
File size:
794 bytes
|
| Line | |
|---|
| 1 | package relcontext;
|
|---|
| 2 |
|
|---|
| 3 | import org.openstreetmap.josm.gui.DefaultNameFormatter;
|
|---|
| 4 | import org.openstreetmap.josm.gui.MapFrame;
|
|---|
| 5 | import org.openstreetmap.josm.plugins.Plugin;
|
|---|
| 6 | import org.openstreetmap.josm.plugins.PluginInformation;
|
|---|
| 7 |
|
|---|
| 8 | public class RelContextPlugin extends Plugin {
|
|---|
| 9 | private RelContextDialog dialog;
|
|---|
| 10 |
|
|---|
| 11 | public RelContextPlugin( PluginInformation info ) {
|
|---|
| 12 | super(info);
|
|---|
| 13 | DefaultNameFormatter.registerFormatHook(new ExtraNameFormatHook());
|
|---|
| 14 | }
|
|---|
| 15 |
|
|---|
| 16 | @Override
|
|---|
| 17 | public void mapFrameInitialized( MapFrame oldFrame, MapFrame newFrame ) {
|
|---|
| 18 | if( oldFrame == null && newFrame != null ) {
|
|---|
| 19 | // if (dialog!=null) dialog.destroy();
|
|---|
| 20 | dialog = new RelContextDialog();
|
|---|
| 21 | newFrame.addToggleDialog(dialog);
|
|---|
| 22 | }
|
|---|
| 23 | }
|
|---|
| 24 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.