Changeset 7083 in josm for trunk/src/org/openstreetmap/josm/gui/mappaint/NodeElemStyle.java
- Timestamp:
- 2014-05-09T06:03:50+02:00 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/mappaint/NodeElemStyle.java
r6280 r7083 1 1 // License: GPL. For details, see LICENSE file. 2 2 package org.openstreetmap.josm.gui.mappaint; 3 4 import static org.openstreetmap.josm.tools.Utils.equal;5 3 6 4 import java.awt.BasicStroke; … … 9 7 import java.awt.Rectangle; 10 8 import java.awt.Stroke; 9 import java.util.Objects; 11 10 12 11 import org.openstreetmap.josm.Main; … … 28 27 public final MapImage mapImage; 29 28 public final Symbol symbol; 30 29 31 30 private Image enabledNodeIcon; 32 31 private Image disabledNodeIcon; … … 63 62 return symbol == other.symbol && 64 63 size == other.size && 65 equal(stroke, other.stroke) &&66 equal(strokeColor, other.strokeColor) &&67 equal(fillColor, other.fillColor);64 Objects.equals(stroke, other.stroke) && 65 Objects.equals(strokeColor, other.strokeColor) && 66 Objects.equals(fillColor, other.fillColor); 68 67 } 69 68 … … 170 169 if (shapeKW == null) 171 170 return null; 172 if ( equal(shapeKW.val, "square")) {171 if ("square".equals(shapeKW.val)) { 173 172 shape = SymbolShape.SQUARE; 174 } else if ( equal(shapeKW.val, "circle")) {173 } else if ("circle".equals(shapeKW.val)) { 175 174 shape = SymbolShape.CIRCLE; 176 } else if ( equal(shapeKW.val, "triangle")) {175 } else if ("triangle".equals(shapeKW.val)) { 177 176 shape = SymbolShape.TRIANGLE; 178 } else if ( equal(shapeKW.val, "pentagon")) {177 } else if ("pentagon".equals(shapeKW.val)) { 179 178 shape = SymbolShape.PENTAGON; 180 } else if ( equal(shapeKW.val, "hexagon")) {179 } else if ("hexagon".equals(shapeKW.val)) { 181 180 shape = SymbolShape.HEXAGON; 182 } else if ( equal(shapeKW.val, "heptagon")) {181 } else if ("heptagon".equals(shapeKW.val)) { 183 182 shape = SymbolShape.HEPTAGON; 184 } else if ( equal(shapeKW.val, "octagon")) {183 } else if ("octagon".equals(shapeKW.val)) { 185 184 shape = SymbolShape.OCTAGON; 186 } else if ( equal(shapeKW.val, "nonagon")) {185 } else if ("nonagon".equals(shapeKW.val)) { 187 186 shape = SymbolShape.NONAGON; 188 } else if ( equal(shapeKW.val, "decagon")) {187 } else if ("decagon".equals(shapeKW.val)) { 189 188 shape = SymbolShape.DECAGON; 190 189 } else … … 356 355 final NodeElemStyle other = (NodeElemStyle) obj; 357 356 // we should get the same image object due to caching 358 if (! equal(mapImage, other.mapImage))357 if (!Objects.equals(mapImage, other.mapImage)) 359 358 return false; 360 if (! equal(symbol, other.symbol))359 if (!Objects.equals(symbol, other.symbol)) 361 360 return false; 362 361 return true;
Note:
See TracChangeset
for help on using the changeset viewer.
