Changeset 22387 in osm for applications


Ignore:
Timestamp:
2010-07-19T21:06:52+02:00 (14 years ago)
Author:
pieren
Message:

add ctrl modifier in address mode; add "tableau d'assemblage" in list of cadastre raster images

Location:
applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr
Files:
4 edited

Legend:

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

    r22230 r22387  
    8989    JLabel link = new JLabel();
    9090    private Way selectedWay;
    91     //private Relation selectedRelation;
    9291    private boolean shift;
     92    private boolean ctrl;
    9393
    9494    public Address(MapFrame mapFrame) {
     
    121121            return;
    122122        shift = (e.getModifiers() & ActionEvent.SHIFT_MASK) != 0;
     123        ctrl = (e.getModifiers() & ActionEvent.CTRL_MASK) != 0;
    123124        MapView mv = Main.map.mapView;
    124125        Point mousePos = e.getPoint();
     
    143144            if (currentMouseNode.get(tagHouseStreet) != null) {
    144145                inputStreet.setText(currentMouseNode.get(tagHouseStreet));
     146                if (ctrl) {
     147                    Collection<Command> cmds = new LinkedList<Command>();
     148                    addAddrToPrimitive(currentMouseNode, cmds);
     149                    applyInputNumberChange();
     150                }
    145151                setSelectedWay((Way)null);
    146152            } else {
  • applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/CadastreInterface.java

    r22041 r22387  
    5959    final String cInterfaceRasterFeuille = "afficherCarteFeuille.do";
    6060    final String cImageLinkStart = "title=\"image\"><a href=\"#\" onClick=\"popup('afficherCarteFeuille.do?f=";
     61    final String cTAImageLinkStart = "title=\"image\"><a href=\"#\" onClick=\"popup('afficherCarteTa.do?f=";
    6162    final String cImageNameStart = ">Feuille ";
     63    final String cTAImageNameStart = "Tableau d'assemblage <strong>";
    6264   
    6365    final static long cCookieExpiration = 30 * 60 * 1000; // 30 minutes expressed in milliseconds
     
    380382    private void parseFeuillesList(String input) {
    381383        listOfFeuilles.clear();
     384        // get "Tableau d'assemblage"
     385        if (Main.pref.getBoolean("cadastrewms.useTA", false)) {
     386            while (input.indexOf(cTAImageLinkStart) != -1) {
     387                input = input.substring(input.indexOf(cTAImageLinkStart) + cTAImageLinkStart.length());
     388                String refTA = input.substring(0, input.indexOf("'"));
     389                String nameTA = input.substring(input.indexOf(cTAImageNameStart) + cTAImageNameStart.length());
     390                nameTA = nameTA.substring(0, nameTA.indexOf("<"));
     391                listOfFeuilles.add(new PlanImage(nameTA, refTA));
     392            }
     393        }
     394        // get "Feuilles"
    382395        while (input.indexOf(cImageLinkStart) != -1) {
    383396            input = input.substring(input.indexOf(cImageLinkStart)+cImageLinkStart.length());
  • applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/CadastrePlugin.java

    r22041 r22387  
    115115 *                 - add 'departement' as option in the municipality selection
    116116 *                 - fixed bug in cache directory size control (and disabled by default)
     117 *                 - add map mode for addressing
     118 *                 - from Nicolas Dumoulin:
     119 *                 -     add "tableau d'assemblage" in raster images for georeferencing (as option)
    117120 */
    118121public class CadastrePlugin extends Plugin {
  • applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/CadastrePreferenceSetting.java

    r22230 r22387  
    4040
    4141    private JCheckBox disableImageCropping = new JCheckBox(tr("Disable image cropping during georeferencing."));
     42   
     43    private JCheckBox enableTableauAssemblage = new JCheckBox(tr("Use \"Tableau d''assemblage\""));
    4244   
    4345    private JCheckBox autoFirstLayer = new JCheckBox(tr("Select first WMS layer in list."));
     
    287289        disableImageCropping.setSelected(Main.pref.getBoolean("cadastrewms.noImageCropping", false));
    288290        disableImageCropping.setToolTipText(tr("Disable image cropping during georeferencing."));
    289         cadastrewms.add(disableImageCropping, GBC.eop().insets(0, 0, 0, 0));
     291        cadastrewms.add(disableImageCropping, GBC.std().insets(0, 0, 10, 0));
     292        // option to add the "Tableau d'assemblage" in list of sheets to grab
     293        enableTableauAssemblage.setSelected(Main.pref.getBoolean("cadastrewms.useTA", false));
     294        enableTableauAssemblage.setToolTipText(tr("Add the \"Tableau(x) d'assemblage\" in the list of cadastre sheets to grab."));
     295        cadastrewms.add(enableTableauAssemblage, GBC.eop().insets(0, 0, 0, 0));
    290296        // the crosspiece display
    291297        JLabel jLabelCrosspieces = new JLabel(tr("Display crosspieces:"));
     
    401407        }
    402408        Main.pref.put("cadastrewms.noImageCropping", disableImageCropping.isSelected());
     409        Main.pref.put("cadastrewms.useTA", enableTableauAssemblage.isSelected());
    403410        if (crosspiece1.isSelected()) Main.pref.put("cadastrewms.crosspieces", "0");
    404411        else if (crosspiece2.isSelected()) Main.pref.put("cadastrewms.crosspieces", "1");
Note: See TracChangeset for help on using the changeset viewer.