Changeset 29535 in osm for applications/editors/josm/plugins/reltoolbox/src/relcontext/actions
- Timestamp:
- 2013-04-23T13:43:26+02:00 (12 years ago)
- Location:
- applications/editors/josm/plugins/reltoolbox/src/relcontext/actions
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/reltoolbox/src/relcontext/actions/DownloadParentsAction.java
r26509 r29535 2 2 3 3 import static org.openstreetmap.josm.tools.I18n.tr; 4 4 5 import java.awt.event.ActionEvent; 5 6 import java.util.ArrayList; … … 8 9 import java.util.List; 9 10 import java.util.Set; 11 10 12 import javax.swing.AbstractAction; 13 11 14 import org.openstreetmap.josm.Main; 12 15 import org.openstreetmap.josm.actions.downloadtasks.DownloadReferrersTask; 13 16 import org.openstreetmap.josm.data.osm.OsmPrimitive; 14 17 import org.openstreetmap.josm.data.osm.Relation; 15 import org.openstreetmap.josm.data.osm.RelationMember;16 18 import org.openstreetmap.josm.gui.dialogs.relation.DownloadRelationMemberTask; 17 19 import org.openstreetmap.josm.gui.dialogs.relation.DownloadRelationTask; 18 20 import org.openstreetmap.josm.tools.ImageProvider; 21 19 22 import relcontext.ChosenRelation; 20 23 import relcontext.ChosenRelationListener; -
applications/editors/josm/plugins/reltoolbox/src/relcontext/actions/ReconstructPolygonAction.java
r28813 r29535 107 107 Way tmp = w; 108 108 w = candidateWay; 109 candidateWay = w;109 candidateWay = tmp; 110 110 } 111 111 commands.add(new DeleteCommand(w)); -
applications/editors/josm/plugins/reltoolbox/src/relcontext/actions/TheRing.java
r29459 r29535 1 1 package relcontext.actions; 2 2 3 import java.util.*; 3 import java.util.ArrayList; 4 import java.util.Collection; 5 import java.util.HashMap; 6 import java.util.List; 7 import java.util.Map; 8 4 9 import javax.swing.JOptionPane; 10 5 11 import org.openstreetmap.josm.Main; 6 import org.openstreetmap.josm.command.*; 7 import org.openstreetmap.josm.data.coor.EastNorth; 8 import org.openstreetmap.josm.data.osm.*; 12 import org.openstreetmap.josm.command.AddCommand; 13 import org.openstreetmap.josm.command.ChangeCommand; 14 import org.openstreetmap.josm.command.Command; 15 import org.openstreetmap.josm.command.DeleteCommand; 16 import org.openstreetmap.josm.data.osm.Node; 17 import org.openstreetmap.josm.data.osm.OsmPrimitive; 18 import org.openstreetmap.josm.data.osm.Relation; 19 import org.openstreetmap.josm.data.osm.RelationMember; 20 import org.openstreetmap.josm.data.osm.Way; 9 21 import org.openstreetmap.josm.tools.Geometry; 10 22 import org.openstreetmap.josm.tools.Geometry.PolygonIntersection; … … 326 338 } 327 339 } 328 // todo: когда два кольца меняют одно и то же отношение, в список команд добавляется329 // изменение базового отношения на новое, а не предыдущего330 // поэтому сохраняется только первое изменение340 // todo: когда два кольца менÑ�ÑŽÑ‚ одно и то же отношение, в Ñ�пиÑ�ок команд добавлÑ�етÑ�Ñ� 341 // изменение базового отношениÑ� на новое, а не предыдущего 342 // поÑ�тому Ñ�охранÑ�етÑ�Ñ� только первое изменение 331 343 332 344 List<Command> commands = new ArrayList<Command>(); … … 389 401 * Appends "append" to "base" so the closed polygon forms. 390 402 */ 391 private static void closePolygon( List<Node> base, List<Node> append ) { 403 /*private static void closePolygon( List<Node> base, List<Node> append ) { 392 404 if( append.get(0).equals(base.get(0)) && append.get(append.size() - 1).equals(base.get(base.size() - 1)) ) { 393 405 List<Node> ap2 = new ArrayList<Node>(append); … … 397 409 base.remove(base.size() - 1); 398 410 base.addAll(append); 399 } 411 }*/ 400 412 401 413 /** 402 414 * Checks if a middle point between two nodes is inside a polygon. Useful to check if the way is inside. 403 415 */ 404 private static boolean segmentInsidePolygon( Node n1, Node n2, List<Node> polygon ) { 416 /*private static boolean segmentInsidePolygon( Node n1, Node n2, List<Node> polygon ) { 405 417 EastNorth en1 = n1.getEastNorth(); 406 418 EastNorth en2 = n2.getEastNorth(); 407 419 Node testNode = new Node(new EastNorth((en1.east() + en2.east()) / 2.0, (en1.north() + en2.north()) / 2.0)); 408 420 return Geometry.nodeInsidePolygon(testNode, polygon); 409 } 421 }*/ 410 422 411 423 private static void log( String s ) { … … 420 432 private boolean isRing; 421 433 422 private RingSegment() { 423 } 434 /*private RingSegment() { 435 }*/ 424 436 425 437 public RingSegment( Way w ) { … … 435 447 } 436 448 437 public RingSegment( RingSegment ref ) { 449 /*public RingSegment( RingSegment ref ) { 438 450 this.nodes = null; 439 451 this.references = ref; 440 } 452 }*/ 441 453 442 454 /** … … 559 571 * @return true if ways are equals, or one references another. 560 572 */ 561 public boolean isReferencingEqual( RingSegment other ) { 573 /*public boolean isReferencingEqual( RingSegment other ) { 562 574 return this.equals(other) || (other.isReference() && other.references == this) || (isReference() && references == other); 563 } 575 }*/ 564 576 565 577 @Override
Note:
See TracChangeset
for help on using the changeset viewer.