Changeset 19149 in osm for applications/editors/josm


Ignore:
Timestamp:
2009-12-20T01:51:24+01:00 (15 years ago)
Author:
pieren
Message:

Add a 25m crosspiece ref and the possibility to change the source in the UploadHook

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

Legend:

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

    r19078 r19149  
    4848    private JRadioButton crosspiece1 = new JRadioButton("off");
    4949   
    50     private JRadioButton crosspiece2 = new JRadioButton("50m");
    51 
    52     private JRadioButton crosspiece3 = new JRadioButton("100m");
     50    private JRadioButton crosspiece2 = new JRadioButton("25m");
     51
     52    private JRadioButton crosspiece3 = new JRadioButton("50m");
     53
     54    private JRadioButton crosspiece4 = new JRadioButton("100m");
    5355
    5456    static final int DEFAULT_SQUARE_SIZE = 100;
     
    191193        if (crosspieces == 1) crosspiece2.setSelected(true);
    192194        if (crosspieces == 2) crosspiece3.setSelected(true);
     195        if (crosspieces == 3) crosspiece4.setSelected(true);
    193196        bgCrosspieces.add(crosspiece1);
    194197        bgCrosspieces.add(crosspiece2);
    195198        bgCrosspieces.add(crosspiece3);
     199        bgCrosspieces.add(crosspiece4);
    196200        cadastrewms.add(crosspiece1, GBC.std().insets(5, 0, 5, 0));
    197201        cadastrewms.add(crosspiece2, GBC.std().insets(5, 0, 5, 0));
    198         cadastrewms.add(crosspiece3, GBC.eol().fill(GBC.HORIZONTAL).insets(5, 5, 0, 5));
     202        cadastrewms.add(crosspiece3, GBC.std().insets(5, 0, 5, 0));
     203        cadastrewms.add(crosspiece4, GBC.eol().fill(GBC.HORIZONTAL).insets(5, 5, 0, 5));
    199204
    200205        // separator
     
    256261        else if (crosspiece2.isSelected()) Main.pref.put("cadastrewms.crosspieces", "1");
    257262        else if (crosspiece3.isSelected()) Main.pref.put("cadastrewms.crosspieces", "2");
     263        else if (crosspiece4.isSelected()) Main.pref.put("cadastrewms.crosspieces", "3");
    258264        Main.pref.put("cadastrewms.enableCaching", enableCache.isSelected());
    259265
  • applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/CheckSourceUploadHook.java

    r18722 r19149  
    1313import javax.swing.JPanel;
    1414import javax.swing.JScrollPane;
     15import javax.swing.JTextField;
    1516
    1617import org.openstreetmap.josm.Main;
     
    7879            JPanel p = new JPanel(new GridBagLayout());
    7980            OsmPrimitivRenderer renderer = new OsmPrimitivRenderer();
    80             p.add(new JLabel(tr("Auto-tag source added:")), GBC.eol());
     81            p.add(new JLabel(tr("Add \"source=...\" to elements?")), GBC.eol());
     82            JTextField tf = new JTextField(CadastrePlugin.source);
     83            p.add(tf, GBC.eol());
    8184            JList l = new JList(sel.toArray());
    8285            l.setCellRenderer(renderer);
     
    8689                   JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION;
    8790            if (bContinue)
    88                 Main.main.undoRedo.add(new ChangePropertyCommand(sel, "source", CadastrePlugin.source));
     91                Main.main.undoRedo.add(new ChangePropertyCommand(sel, "source", tf.getText()));
    8992        }
    9093
    9194    }
    9295}
     96
  • applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/WMSLayer.java

    r18838 r19149  
    588588        String crosspieces = Main.pref.get("cadastrewms.crosspieces", "0");
    589589        if (!crosspieces.equals("0")) {
    590             int modulo = 50;
    591             if (crosspieces.equals("2")) modulo = 100;
     590            int modulo = 25;
     591            if (crosspieces.equals("2")) modulo = 50;
     592            if (crosspieces.equals("3")) modulo = 100;
    592593            EastNorthBound currentView = new EastNorthBound(mv.getEastNorth(0, mv.getHeight()),
    593594                    mv.getEastNorth(mv.getWidth(), 0));
Note: See TracChangeset for help on using the changeset viewer.