Ignore:
Timestamp:
2014-10-18T23:07:52+02:00 (10 years ago)
Author:
donvip
Message:

[josm_plugins] fix Java 7 / unused code warnings

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/HouseNumberTaggingTool/src/org/openstreetmap/josm/plugins/housenumbertool/TagDialog.java

    r30532 r30737  
    5050   private static final String APPLY_CHANGES = tr("Apply Changes");
    5151   private static final String TAG_STREET_OR_PLACE = tr("Use tag ''addr:street'' or ''addr:place''");
    52    
     52
    5353   public static final String TAG_BUILDING = "building";
    5454   public static final String TAG_ADDR_COUNTRY = "addr:country";
     
    6161
    6262   public static final String[] buildingStrings = {"yes", "apartments", "chapel", "church", "commercial", "dormitory", "hotel", "house", "residential", "terrace",  "industrial", "retail", "warehouse", "cathedral",  "civic", "hospital", "school", "train_station", "transportation", "university", "public", "bridge", "bunker", "cabin", "construction", "farm_auxiliary", "garage", "garages" , "greenhouse", "hangar", "hut", "roof", "shed", "stable" };
    63    
     63
    6464   private static final int FPS_MIN = -2;
    6565   private static final int FPS_MAX =  2;
    66    
     66
    6767   private static final long serialVersionUID = 6414385452106276923L;
    6868
     
    140140      Arrays.sort(buildingStrings);
    141141      building = new JComboBox<>(buildingStrings);
    142       building.setSelectedItem(dto.getBuilding()); 
     142      building.setSelectedItem(dto.getBuilding());
    143143      building.setMaximumRowCount(50);
    144144      c.gridx = 3;
     
    147147      c.gridwidth = 1;
    148148      editPanel.add(building, c);
    149      
     149
    150150      // country
    151151      countryEnabled = new JCheckBox(TAG_ADDR_COUNTRY);
     
    258258      editPanel.add(streetEnabled, c);
    259259
    260      
     260
    261261      streetRadio = new JRadioButton(TAG_ADDR_STREET);
    262262      streetRadio.setToolTipText(TAG_STREET_OR_PLACE);
     
    269269      c.gridwidth = 1;
    270270      editPanel.add(streetRadio, c);
    271      
     271
    272272      placeRadio = new JRadioButton("addr:place");
    273273      placeRadio.setToolTipText(TAG_STREET_OR_PLACE);
     
    280280      c.gridwidth = 1;
    281281      editPanel.add(placeRadio, c);
    282      
     282
    283283      ButtonGroup g = new ButtonGroup();
    284       g.add( streetRadio ); 
     284      g.add( streetRadio );
    285285      g.add( placeRadio );
    286      
     286
    287287      street = new AutoCompletingComboBox();
    288288      if (dto.isTagStreet())
     
    318318      housnumber = new JTextField();
    319319      housnumber.setPreferredSize(new Dimension(200, 24));
    320      
     320
    321321      int number = 0;
    322322      try {
     
    327327         housnumber.setText(String.valueOf(number));
    328328      }
    329      
    330      
     329
     330
    331331      c.fill = GridBagConstraints.HORIZONTAL;
    332332      c.gridx = 3;
     
    335335      c.gridwidth = 1;
    336336      editPanel.add(housnumber, c);
    337      
     337
    338338      JLabel seqLabel = new JLabel(tr("House number increment:"));
    339339      c.fill = GridBagConstraints.HORIZONTAL;
     
    355355      c.gridwidth = 1;
    356356      editPanel.add(housenumberChangeSequence, c);
    357    
     357
    358358      return editPanel;
    359359   }
     
    372372         dto.setSaveStreet(streetEnabled.isSelected());
    373373         dto.setTagStreet(streetRadio.isSelected());
    374          
     374
    375375         dto.setBuilding((String) building.getSelectedItem());
    376376         dto.setCity(getAutoCompletingComboBoxValue(city));
     
    381381         dto.setState(getAutoCompletingComboBoxValue(state));
    382382         dto.setHousenumberChangeValue(housenumberChangeSequence.getValue());
    383          
     383
    384384         updateJOSMSelection(selection, dto);
    385385         saveDto(dto);
     
    424424   protected void updateJOSMSelection(OsmPrimitive selection, Dto dto)
    425425   {
    426       ArrayList<Command> commands = new ArrayList<Command>();
     426      ArrayList<Command> commands = new ArrayList<>();
    427427
    428428      if (dto.isSaveBuilding()) {
     
    476476                    ChangePropertyCommand command = new ChangePropertyCommand(selection, TagDialog.TAG_ADDR_STREET, dto.getStreet());
    477477                    commands.add(command);
    478                    
     478
    479479                    // remove old place-tag
    480480                    if (selection.get(TagDialog.TAG_ADDR_PLACE) != null)
     
    492492                    ChangePropertyCommand command = new ChangePropertyCommand(selection, TagDialog.TAG_ADDR_PLACE, dto.getStreet());
    493493                    commands.add(command);
    494                    
     494
    495495                    // remove old place-tag
    496496                    if (selection.get(TagDialog.TAG_ADDR_STREET) != null)
     
    523523       * Generates a list of all visible names of highways in order to do autocompletion on the road name.
    524524       */
    525       TreeSet<String> names = new TreeSet<String>();
     525      TreeSet<String> names = new TreeSet<>();
    526526      for (OsmPrimitive osm : Main.main.getCurrentDataSet().allNonDeletedPrimitives())
    527527      {
     
    561561
    562562   }
    563    
     563
    564564    class RadioChangeListener implements ItemListener
    565565    {
Note: See TracChangeset for help on using the changeset viewer.