Changeset 33252 in osm for applications


Ignore:
Timestamp:
2017-04-17T01:42:45+02:00 (8 years ago)
Author:
donvip
Message:

update to JOSM 11713

Location:
applications/editors/josm/plugins/czechaddress
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/czechaddress/build.xml

    r32680 r33252  
    55    <property name="commit.message" value="Commit message"/>
    66    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    7     <property name="plugin.main.version" value="10580"/>
     7    <property name="plugin.main.version" value="11713"/>
    88
    99    <!-- Configure these properties (replace "..." accordingly).
  • applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/CzechAddressPlugin.java

    r32566 r33252  
    134134
    135135        newFrame.addToggleDialog(FactoryDialog.getInstance());
    136         newFrame.addMapMode(new IconToggleButton(new FactoryAction(newFrame)));
     136        newFrame.addMapMode(new IconToggleButton(new FactoryAction()));
    137137    }
    138138
  • applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/StringUtils.java

    r32566 r33252  
    134134        for (int i = 0; i < charr.length; i++) {
    135135            ch = charr[i];
    136             if ((last >= 'a') && (last <= 'ž') ||
    137                     (last >= 'A') && (last <= 'Ž'))
     136            if ((last >= 'a' && last <= 'ž') ||
     137                    (last >= 'A' && last <= 'Ž'))
    138138                ch = Character.toLowerCase(ch);
    139139            else
  • applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/actions/FactoryAction.java

    r32566 r33252  
    3434     * Default constructor, which sets the title, shortcut, ...
    3535     */
    36     public FactoryAction(MapFrame frame) {
     36    public FactoryAction() {
    3737        super("Sputit továrnu na adresy",
    3838              "envelope-cursor.png",
     
    4141                  "Sputit továrnu na adresy",
    4242                  KeyEvent.VK_K, Shortcut.ALT_SHIFT),
    43               frame,
    4443              ImageProvider.getCursor("crosshair", "envelope-star-small"));
    4544    }
  • applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/addressdatabase/AddressElement.java

    r33029 r33252  
    33
    44import java.util.List;
     5import java.util.Objects;
    56
    67import org.openstreetmap.josm.data.osm.Node;
     
    147148     * {@code true} otherwise.
    148149     */
    149     public boolean equals(AddressElement elem) {
    150         if (elem == null)
    151             return false;
    152         else
    153             return name.equals(elem.name) && this.parent == elem.parent;
     150    @Override
     151    public boolean equals(Object elem) {
     152        return this == elem || (elem instanceof AddressElement
     153                && name.equals(((AddressElement) elem).name)
     154                && parent == ((AddressElement) elem).parent);
     155    }
     156
     157    @Override
     158    public int hashCode() {
     159        return Objects.hash(name, parent);
    154160    }
    155161
  • applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/FactoryDialog.java

    r33251 r33252  
    388388//==============================================================================
    389389
    390     private class StreetListRenderer extends DefaultListCellRenderer {
     390    private static class StreetListRenderer extends DefaultListCellRenderer {
    391391        @Override
    392392        public Component getListCellRendererComponent(JList<?> list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
     
    408408//==============================================================================
    409409
    410     private class HouseListRenderer extends DefaultListCellRenderer {
     410    private static class HouseListRenderer extends DefaultListCellRenderer {
    411411
    412412        Font plainFont = null;
     
    446446//==============================================================================
    447447
    448     private class AllStreetProvider extends ElementWithHouses {
     448    private static class AllStreetProvider extends ElementWithHouses {
    449449        AllStreetProvider() {
    450450            super("všechny domy");
  • applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/ManagerDialog.java

    r32566 r33252  
    8484    }
    8585
    86     private class DatabaseModel extends HalfCookedTreeModel {
     86    private static class DatabaseModel extends HalfCookedTreeModel {
    8787
    8888        @Override
     
    376376    // End of variables declaration//GEN-END:variables
    377377
    378     private class AddressElementRenderer extends DefaultTableCellRenderer {
     378    private static class AddressElementRenderer extends DefaultTableCellRenderer {
    379379
    380380        AddressElementRenderer() {}
     
    389389    }
    390390
    391     private class RenameModel<Element> implements TableModel {
     391    private static class RenameModel<Element> implements TableModel {
    392392
    393393        List<Element> elems = new ArrayList<>();
  • applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/intelligence/Capitalizator.java

    r32566 r33252  
    5959    }
    6060
    61     private class StreetMatcher implements Callable<OsmPrimitive> {
     61    private static class StreetMatcher implements Callable<OsmPrimitive> {
    6262
    6363        private AddressElement elem;
Note: See TracChangeset for help on using the changeset viewer.