Changeset 16791 in osm for applications/editors


Ignore:
Timestamp:
2009-08-03T11:47:01+02:00 (15 years ago)
Author:
guggis
Message:

Updated to JOSM release 1893

Location:
applications/editors/josm/plugins/cadastre-fr
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/cadastre-fr/build.xml

    r16620 r16791  
    2626                <attribute name="Plugin-Description" value="A special handler for the French land registry WMS server."/>
    2727                <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/wiki/FR:JOSM/Fr:Plugin/Cadastre"/>
    28                 <attribute name="Plugin-Mainversion" value="1815"/>
     28                <attribute name="Plugin-Mainversion" value="1893"/>
    2929                <attribute name="Plugin-Stage" value="60"/>
    3030                <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
  • applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/CadastreInterface.java

    r16581 r16791  
    5050
    5151    public boolean retrieveInterface(WMSLayer wmsLayer) throws DuplicateLayerException {
    52         if (wmsLayer.name.equals(""))
     52        if (wmsLayer.getName().equals(""))
    5353            return false;
    5454        // open the session with the French Cadastre web front end
    5555        downloadCancelled = false;
    5656        try {
    57             if (cookie == null || !wmsLayer.name.equals(cadastreGrabber.getLastWMSLayerName())) {
     57            if (cookie == null || !wmsLayer.getName().equals(cadastreGrabber.getLastWMSLayerName())) {
    5858                getCookie();
    5959                getInterface(wmsLayer);
    60                 cadastreGrabber.setLastWMSLayerName(wmsLayer.name);
     60                cadastreGrabber.setLastWMSLayerName(wmsLayer.getName());
    6161            }
    6262            openInterface();
     
    360360        if (Main.map != null) {
    361361            for (Layer l : Main.map.mapView.getAllLayers()) {
    362                 if (l instanceof WMSLayer && l.name.equals(wmsLayer.name) && (l != wmsLayer)) {
    363                     System.out.println("Try to grab into a new layer when "+wmsLayer.name+" is already opened.");
     362                if (l instanceof WMSLayer && l.getName().equals(wmsLayer.getName()) && (l != wmsLayer)) {
     363                    System.out.println("Try to grab into a new layer when "+wmsLayer.getName()+" is already opened.");
    364364                    // remove the duplicated layer
    365365                    Main.map.mapView.removeLayer(wmsLayer);
  • applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/WMSLayer.java

    r16007 r16791  
    174174    @Override
    175175    public String getToolTipText() {
    176         String str = tr("WMS layer ({0}), {1} tile(s) loaded", name, images.size());
     176        String str = tr("WMS layer ({0}), {1} tile(s) loaded", getName(), images.size());
    177177        if (isRaster) {
    178178            str += "\n"+tr("Is not vectorized.");
     
    215215    @Override
    216216    public Component[] getMenuEntries() {
    217         component = new Component[] { new JMenuItem(new LayerListDialog.ShowHideLayerAction(this)),
    218                 new JMenuItem(new LayerListDialog.DeleteLayerAction(this)), new JMenuItem(new MenuActionLoadFromCache()),
     217        component = new Component[] { new JMenuItem(LayerListDialog.getInstance().createShowHideLayerAction(this)),
     218                new JMenuItem(LayerListDialog.getInstance().createDeleteLayerAction(this)), new JMenuItem(new MenuActionLoadFromCache()),
    219219                new JMenuItem(new LayerListPopup.InfoAction(this)) };
    220220        return component;
     
    285285    public void setLocation(String location) {
    286286        this.location = location;
    287         this.name = rebuildName();
    288         repaintLayerListDialog();
     287        setName(rebuildName());
    289288    }
    290289
     
    295294    public void setCodeCommune(String codeCommune) {
    296295        this.codeCommune = codeCommune;
    297         this.name = rebuildName();
    298         repaintLayerListDialog();
     296        setName(rebuildName());
    299297    }
    300298
     
    350348        for (GeorefImage img : images)
    351349            img.rotate(rasterCenter, angle);
    352     }
    353 
    354     /**
    355      * Repaint the LayerList dialog.
    356      * This is the only way I found to refresh the layer name in the layer list when it changes
    357      * later (after the construction).
    358      */
    359     private void repaintLayerListDialog() {
    360         if (Main.map != null) {
    361             for (Component c : Main.map.toggleDialogs.getComponents()) {
    362                 if (c instanceof LayerListDialog) {
    363                     c.repaint();
    364                 }
    365             }
    366         }
    367350    }
    368351
Note: See TracChangeset for help on using the changeset viewer.