Changeset 7005 in josm for trunk/src/org/openstreetmap/josm/data/osm/visitor/paint
- Timestamp:
- 2014-04-26T17:39:23+02:00 (10 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/data/osm/visitor/paint
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/MapRendererFactory.java
r7004 r7005 110 110 } 111 111 112 private final List<Descriptor> descriptors = new ArrayList< Descriptor>();112 private final List<Descriptor> descriptors = new ArrayList<>(); 113 113 private Class<? extends AbstractMapRenderer> activeRenderer = null; 114 114 -
trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/StyledMapRenderer.java
r6926 r7005 183 183 this.drawMultipolygon = drawMultipolygon; 184 184 this.drawRestriction = drawRestriction; 185 styleElems = new ArrayList< StyleRecord>();185 styleElems = new ArrayList<>(); 186 186 } 187 187 -
trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/WireframeMapRenderer.java
r6380 r7005 168 168 169 169 // draw tagged ways first, then untagged ways, then highlighted ways 170 List<Way> highlightedWays = new ArrayList< Way>();171 List<Way> untaggedWays = new ArrayList< Way>();170 List<Way> highlightedWays = new ArrayList<>(); 171 List<Way> untaggedWays = new ArrayList<>(); 172 172 173 173 for (final Way way : data.searchWays(bbox)){ -
trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/relations/Multipolygon.java
r6890 r7005 56 56 */ 57 57 private static class MultipolygonRoleMatcher implements PreferenceChangedListener{ 58 private final List<String> outerExactRoles = new ArrayList< String>();59 private final List<String> outerRolePrefixes = new ArrayList< String>();60 private final List<String> innerExactRoles = new ArrayList< String>();61 private final List<String> innerRolePrefixes = new ArrayList< String>();58 private final List<String> outerExactRoles = new ArrayList<>(); 59 private final List<String> outerRolePrefixes = new ArrayList<>(); 60 private final List<String> innerExactRoles = new ArrayList<>(); 61 private final List<String> innerRolePrefixes = new ArrayList<>(); 62 62 63 63 private void initDefaults() { … … 202 202 private PolyData(List<Node> nodes, boolean selected, Collection<Long> wayIds) { 203 203 this.wayIds = Collections.unmodifiableCollection(wayIds); 204 this.nodes = new ArrayList< Node>(nodes);204 this.nodes = new ArrayList<>(nodes); 205 205 this.selected = selected; 206 this.inners = new ArrayList< Multipolygon.PolyData>();206 this.inners = new ArrayList<>(); 207 207 this.poly = new Path2D.Double(); 208 208 this.poly.setWindingRule(Path2D.WIND_EVEN_ODD); … … 235 235 this.poly = (Double) copy.poly.clone(); 236 236 this.wayIds = Collections.unmodifiableCollection(copy.wayIds); 237 this.nodes = new ArrayList< Node>(copy.nodes);238 this.inners = new ArrayList< Multipolygon.PolyData>(copy.inners);237 this.nodes = new ArrayList<>(copy.nodes); 238 this.inners = new ArrayList<>(copy.inners); 239 239 } 240 240 … … 297 297 nodes.addAll(w.getNodes()); 298 298 } else if (!wayIds.isEmpty()) { 299 List<Way> waysToJoin = new ArrayList< Way>();299 List<Way> waysToJoin = new ArrayList<>(); 300 300 for (Long wayId : wayIds) { 301 301 Way w = (Way) ds.getPrimitiveById(wayId, OsmPrimitiveType.WAY); … … 347 347 } 348 348 349 private final List<Way> innerWays = new ArrayList< Way>();350 private final List<Way> outerWays = new ArrayList< Way>();351 private final List<PolyData> innerPolygons = new ArrayList< PolyData>();352 private final List<PolyData> outerPolygons = new ArrayList< PolyData>();353 private final List<PolyData> combinedPolygons = new ArrayList< PolyData>();349 private final List<Way> innerWays = new ArrayList<>(); 350 private final List<Way> outerWays = new ArrayList<>(); 351 private final List<PolyData> innerPolygons = new ArrayList<>(); 352 private final List<PolyData> outerPolygons = new ArrayList<>(); 353 private final List<PolyData> combinedPolygons = new ArrayList<>(); 354 354 355 355 private boolean incomplete; … … 397 397 398 398 private void createPolygons(List<Way> ways, List<PolyData> result) { 399 List<Way> waysToJoin = new ArrayList< Way>();399 List<Way> waysToJoin = new ArrayList<>(); 400 400 for (Way way: ways) { 401 401 if (way.isClosed()) { … … 413 413 public static Collection<JoinedWay> joinWays(Collection<Way> waysToJoin) 414 414 { 415 final Collection<JoinedWay> result = new ArrayList< JoinedWay>();415 final Collection<JoinedWay> result = new ArrayList<>(); 416 416 final Way[] joinArray = waysToJoin.toArray(new Way[waysToJoin.size()]); 417 417 int left = waysToJoin.size(); … … 420 420 boolean selected = false; 421 421 List<Node> nodes = null; 422 Set<Long> wayIds = new HashSet< Long>();422 Set<Long> wayIds = new HashSet<>(); 423 423 boolean joined = true; 424 424 while (joined && left > 0) { -
trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/relations/MultipolygonCache.java
r6986 r7005 47 47 48 48 private MultipolygonCache() { 49 this.cache = new HashMap< NavigatableComponent, Map<DataSet, Map<Relation, Multipolygon>>>();50 this.selectedPolyData = new ArrayList< Multipolygon.PolyData>();49 this.cache = new HashMap<>(); 50 this.selectedPolyData = new ArrayList<>(); 51 51 Main.addProjectionChangeListener(this); 52 52 DataSet.addSelectionListener(this); … … 71 71 Map<DataSet, Map<Relation, Multipolygon>> map1 = cache.get(nc); 72 72 if (map1 == null) { 73 cache.put(nc, map1 = new HashMap< DataSet, Map<Relation, Multipolygon>>());73 cache.put(nc, map1 = new HashMap<>()); 74 74 } 75 75 Map<Relation, Multipolygon> map2 = map1.get(r.getDataSet()); 76 76 if (map2 == null) { 77 map1.put(r.getDataSet(), map2 = new HashMap< Relation, Multipolygon>());77 map1.put(r.getDataSet(), map2 = new HashMap<>()); 78 78 } 79 79 multipolygon = map2.get(r); … … 113 113 114 114 private final Collection<Map<Relation, Multipolygon>> getMapsFor(DataSet ds) { 115 List<Map<Relation, Multipolygon>> result = new ArrayList< Map<Relation, Multipolygon>>();115 List<Map<Relation, Multipolygon>> result = new ArrayList<>(); 116 116 for (Map<DataSet, Map<Relation, Multipolygon>> map : cache.values()) { 117 117 Map<Relation, Multipolygon> map2 = map.get(ds);
Note:
See TracChangeset
for help on using the changeset viewer.