Ignore:
Timestamp:
2009-08-16T23:36:16+02:00 (17 years ago)
Author:
pieren
Message:

raster image feature implementation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/CadastrePlugin.java

    r16929 r17089  
    1010
    1111import javax.swing.JCheckBoxMenuItem;
     12import javax.swing.JDialog;
    1213import javax.swing.JMenu;
    1314import javax.swing.JMenuItem;
     
    135136                menuGrab.setAccelerator(ks);
    136137            }
     138            JMenuItem menuActionGrabPlanImage = new JMenuItem(new MenuActionGrabPlanImage());
    137139            JMenuItem menuSettings = new JMenuItem(new MenuActionNewLocation());
    138140            final JCheckBoxMenuItem menuSource = new JCheckBoxMenuItem(tr("Auto sourcing"));
     
    152154
    153155            cadastreJMenu.add(menuGrab);
     156            cadastreJMenu.add(menuActionGrabPlanImage);
    154157            cadastreJMenu.add(menuSettings);
    155158            cadastreJMenu.add(menuSource);
     
    214217            JMenuItem item = cadastreJMenu.getItem(i);
    215218            if (item != null)
    216                 if (item.getText().equals(MenuActionGrab.name) /* ||
     219                if (item.getText().equals(MenuActionGrab.name) ||
     220                    item.getText().equals(MenuActionGrabPlanImage.name) /* ||
    217221                    item.getText().equals(MenuActionBoundaries.name) ||
    218222                    item.getText().equals(MenuActionBuildings.name)*/) {
     
    229233            if (oldFrame == null && newFrame != null) {
    230234                setEnabledAll(true);
    231                 Main.map.addMapMode(new IconToggleButton
    232                         (new WMSAdjustAction(Main.map)));
     235                /*Main.map.addMapMode(new IconToggleButton
     236                        (new WMSAdjustAction(Main.map)));*/
    233237            } else if (oldFrame != null && newFrame == null) {
    234238                setEnabledAll(false);
     
    246250    }
    247251
     252    public static void safeSleep(long milliseconds) {
     253        try {
     254            Thread.sleep(milliseconds);
     255        } catch (InterruptedException e) {}
     256    }
     257
     258    // See OptionPaneUtil
     259    // FIXME: this is a temporary solution.
     260    public static void prepareDialog(JDialog dialog) {
     261        if (Main.pref.getBoolean("window-handling.option-pane-always-on-top", true)) {
     262            try {
     263                dialog.setAlwaysOnTop(true);
     264            } catch(SecurityException e) {
     265                System.out.println(tr("Warning: failed to put option pane dialog always on top. Exception was: {0}", e.toString()));
     266            }
     267        }
     268        dialog.setModal(true);
     269        dialog.toFront();
     270        dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
     271    }
    248272}
Note: See TracChangeset for help on using the changeset viewer.