Ignore:
Timestamp:
2009-10-18T18:11:09+02:00 (15 years ago)
Author:
pieren
Message:

Use the new cadastre projection LambertCC9Zones

File:
1 edited

Legend:

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

    r17710 r18207  
    77import java.awt.event.ActionListener;
    88import java.awt.event.KeyEvent;
    9 import java.util.LinkedList;
    109
    1110import javax.swing.JCheckBoxMenuItem;
     
    7574 * 1.3 23-Aug-2009 - improve georeferencing action cancellation
    7675 *                 - fixed bug of raster image loaded from cache not working on Java1.6
    77  *                 - improve mouse click bounce detection during georeferencing process
     76 *                 - improve mouse click bounce detection during georeferencing process
     77 * 1.4 17-Oct-2009 - add support for new Lambert CC 9 Zones projection
    7878 */
    7979public class CadastrePlugin extends Plugin {
    80     static String VERSION = "1.3";
     80    static String VERSION = "1.4";
    8181
    8282    static JMenu cadastreJMenu;
     
    121121
    122122        refreshConfiguration();
    123         refreshMenu();
    124123
    125124        UploadAction.registerUploadHook(new CheckSourceUploadHook());
    126125    }
    127126
    128     public void refreshMenu() throws Exception {
     127    public static void refreshMenu() {
    129128        MainMenu menu = Main.main.menu;
    130129
     
    207206        } else
    208207            System.out.println("shortcut F11 already redefined; do not change");
     208
     209        refreshMenu();
    209210    }
    210211
     
    214215    }
    215216
    216     private void setEnabledAll(boolean isEnabled) {
     217    private static void setEnabledAll(boolean isEnabled) {
     218        boolean isLambertCC9Zones = Main.proj instanceof LambertCC9Zones;
    217219        for (int i = 0; i < cadastreJMenu.getItemCount(); i++) {
    218220            JMenuItem item = cadastreJMenu.getItem(i);
    219221            if (item != null)
    220                 if (item.getText().equals(MenuActionGrab.name) ||
    221                     item.getText().equals(MenuActionGrabPlanImage.name) /* ||
     222                if (item.getText().equals(MenuActionGrabPlanImage.name) /*||
     223                    item.getText().equals(MenuActionGrab.name) ||
    222224                    item.getText().equals(MenuActionBoundaries.name) ||
    223225                    item.getText().equals(MenuActionBuildings.name)*/) {
     
    239241                setEnabledAll(false);
    240242                Lambert.layoutZone = -1;
     243                LambertCC9Zones.layoutZone = -1;
    241244            }
    242245        }
     
    248251            || Main.proj.toString().equals(new UTM_20N_Guadeloupe_Ste_Anne().toString())
    249252            || Main.proj.toString().equals(new UTM_20N_Martinique_Fort_Desaix().toString())
    250             || Main.proj.toString().equals(new GaussLaborde_Reunion().toString());
     253            || Main.proj.toString().equals(new GaussLaborde_Reunion().toString())
     254            || Main.proj.toString().equals(new LambertCC9Zones().toString());
    251255    }
    252256
Note: See TracChangeset for help on using the changeset viewer.