Changeset 17705 in josm for trunk/src/org
- Timestamp:
- 2021-04-07T20:43:28+02:00 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/util/WindowGeometry.java
r17704 r17705 14 14 import java.awt.Rectangle; 15 15 import java.awt.Window; 16 import java.util.Locale; 16 17 import java.util.Objects; 17 18 import java.util.regex.Matcher; … … 279 280 */ 280 281 public void remember(String preferenceKey) { 281 StringBuilder value = new StringBuilder(32); 282 value.append("x=").append(topLeft.x).append(",y=").append(topLeft.y) 283 .append(",width=").append(extent.width).append(",height=").append(extent.height); 284 Config.getPref().put(preferenceKey, value.toString()); 282 String value = String.format(Locale.ROOT, "x=%d,y=%d,width=%d,height=%d", topLeft.x, topLeft.y, extent.width, extent.height); 283 Config.getPref().put(preferenceKey, value); 285 284 } 286 285 … … 507 506 return false; 508 507 WindowGeometry other = (WindowGeometry) obj; 509 if (extent == null) { 510 if (other.extent != null) 511 return false; 512 } else if (!extent.equals(other.extent)) 513 return false; 514 if (topLeft == null) { 515 if (other.topLeft != null) 516 return false; 517 } else if (!topLeft.equals(other.topLeft)) 518 return false; 519 return true; 508 return Objects.equals(extent, other.extent) && Objects.equals(topLeft, other.topLeft); 520 509 } 521 510
Note:
See TracChangeset
for help on using the changeset viewer.