Changeset 25876 in osm for applications/editors/josm/plugins/utilsplugin2
- Timestamp:
- 2011-04-20T19:55:10+02:00 (13 years ago)
- Location:
- applications/editors/josm/plugins/utilsplugin2
- Files:
-
- 13 added
- 2 edited
- 8 moved
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/utilsplugin2/README
r24236 r25876 9 9 10 10 * Split Object Action (anonymous) 11 12 * Selection actions (by akks) 13 14 * Paste Relations, Replace Geometry and other actions (by Zverik) 11 15 12 16 -
applications/editors/josm/plugins/utilsplugin2/src/utilsplugin2/UtilsPlugin2.java
r25836 r25876 5 5 import javax.swing.JMenu; 6 6 import javax.swing.JMenuItem; 7 import utilsplugin2.selection.*; 8 import utilsplugin2.dumbutils.*; 7 9 8 10 import org.openstreetmap.josm.Main; … … 25 27 JMenuItem intWaysR; 26 28 29 JMenuItem replaceGeometry; 30 JMenuItem tagBuffer; 31 JMenuItem sourceTag; 32 JMenuItem pasteRelations; 33 JMenuItem alignWayNodes; 34 27 35 public UtilsPlugin2(PluginInformation info) { 28 36 super(info); 29 Main.main.menu.toolsMenu.addSeparator();30 unglueRelation = MainMenu.add(Main.main.menu.toolsMenu, new UnGlueRelationAction());31 addIntersections = MainMenu.add(Main.main.menu.toolsMenu, new AddIntersectionsAction());32 splitObject = MainMenu.add(Main.main.menu.toolsMenu, new SplitObjectAction());33 Main.main.menu.toolsMenu.addSeparator();34 JMenu m1 = Main.main.menu.addMenu(marktr("Selection"), KeyEvent.VK_N, Main.main.menu.defaultMenuPos, "help");35 37 36 selectWayNodes = MainMenu.add(m1, new SelectWayNodesAction()); 37 adjNodes = MainMenu.add(m1, new AdjacentNodesAction()); 38 unsNodes = MainMenu.add(m1, new UnselectNodesAction()); 39 adjWays = MainMenu.add(m1, new AdjacentWaysAction()); 40 adjWaysAll = MainMenu.add(m1, new ConnectedWaysAction()); 41 intWays = MainMenu.add(m1, new IntersectedWaysAction()); 42 intWaysR = MainMenu.add(m1, new IntersectedWaysRecursiveAction()); 38 JMenu toolsMenu = Main.main.menu.addMenu(marktr("More tools"), KeyEvent.VK_M, 4, "help"); 39 unglueRelation = MainMenu.add(toolsMenu, new UnGlueRelationAction()); 40 addIntersections = MainMenu.add(toolsMenu, new AddIntersectionsAction()); 41 splitObject = MainMenu.add(toolsMenu, new SplitObjectAction()); 42 43 toolsMenu.addSeparator(); 44 replaceGeometry = MainMenu.add(toolsMenu, new ReplaceGeometryAction()); 45 tagBuffer = MainMenu.add(toolsMenu, new TagBufferAction()); 46 sourceTag = MainMenu.add(toolsMenu, new TagSourceAction()); 47 pasteRelations = MainMenu.add(toolsMenu, new PasteRelationsAction()); 48 alignWayNodes = MainMenu.add(toolsMenu, new AlignWayNodesAction()); 49 50 JMenu selectionMenu = Main.main.menu.addMenu(marktr("Selection"), KeyEvent.VK_N, Main.main.menu.defaultMenuPos, "help"); 51 selectWayNodes = MainMenu.add(selectionMenu, new SelectWayNodesAction()); 52 adjNodes = MainMenu.add(selectionMenu, new AdjacentNodesAction()); 53 unsNodes = MainMenu.add(selectionMenu, new UnselectNodesAction()); 54 adjWays = MainMenu.add(selectionMenu, new AdjacentWaysAction()); 55 adjWaysAll = MainMenu.add(selectionMenu, new ConnectedWaysAction()); 56 intWays = MainMenu.add(selectionMenu, new IntersectedWaysAction()); 57 intWaysR = MainMenu.add(selectionMenu, new IntersectedWaysRecursiveAction()); 43 58 } 44 59 … … 50 65 addIntersections.setEnabled(enabled); 51 66 splitObject.setEnabled(enabled); 67 68 replaceGeometry.setEnabled(enabled); 69 tagBuffer.setEnabled(enabled); 70 sourceTag.setEnabled(enabled); 71 pasteRelations.setEnabled(enabled); 72 alignWayNodes.setEnabled(enabled); 73 52 74 selectWayNodes.setEnabled(enabled); 53 75 adjNodes.setEnabled(enabled); -
applications/editors/josm/plugins/utilsplugin2/src/utilsplugin2/selection/AdjacentNodesAction.java
r25874 r25876 1 1 // License: GPL. Copyright 2011 by Alexei Kasatkin and others 2 package utilsplugin2 ;2 package utilsplugin2.selection; 3 3 4 4 import static org.openstreetmap.josm.gui.help.HelpUtil.ht; … … 8 8 import java.awt.event.KeyEvent; 9 9 import java.util.Collection; 10 import java.util.HashSet;11 10 import java.util.HashSet; 12 11 import java.util.Set; … … 19 18 * Extends current selection 20 19 */ 21 class AdjacentNodesAction extends JosmAction {20 public class AdjacentNodesAction extends JosmAction { 22 21 23 22 public static final boolean treeMode = false; -
applications/editors/josm/plugins/utilsplugin2/src/utilsplugin2/selection/AdjacentWaysAction.java
r25874 r25876 1 1 // License: GPL. Copyright 2011 by Alexei Kasatkin 2 package utilsplugin2 ;2 package utilsplugin2.selection; 3 3 4 4 import static org.openstreetmap.josm.gui.help.HelpUtil.ht; … … 18 18 * Extends current selection 19 19 */ 20 class AdjacentWaysAction extends JosmAction {20 public class AdjacentWaysAction extends JosmAction { 21 21 22 22 public static final boolean treeMode = false; -
applications/editors/josm/plugins/utilsplugin2/src/utilsplugin2/selection/ConnectedWaysAction.java
r25874 r25876 1 1 // License: GPL. Copyright 2011 by Alexei Kasatkin 2 package utilsplugin2 ;2 package utilsplugin2.selection; 3 3 4 4 import static org.openstreetmap.josm.gui.help.HelpUtil.ht; … … 18 18 * Extends current selection by selecting nodes on all touched ways 19 19 */ 20 class ConnectedWaysAction extends JosmAction {20 public class ConnectedWaysAction extends JosmAction { 21 21 22 22 public ConnectedWaysAction() { -
applications/editors/josm/plugins/utilsplugin2/src/utilsplugin2/selection/IntersectedWaysAction.java
r25874 r25876 1 1 // License: GPL. Copyright 2011 by Alexei Kasatkin 2 package utilsplugin2 ;2 package utilsplugin2.selection; 3 3 4 4 import static org.openstreetmap.josm.gui.help.HelpUtil.ht; … … 20 20 * Extends current selection by selecting nodes on all touched ways 21 21 */ 22 class IntersectedWaysAction extends JosmAction {22 public class IntersectedWaysAction extends JosmAction { 23 23 24 24 public IntersectedWaysAction() { -
applications/editors/josm/plugins/utilsplugin2/src/utilsplugin2/selection/IntersectedWaysRecursiveAction.java
r25874 r25876 1 1 // License: GPL. Copyright 2011 by Alexei Kasatkin ond others 2 package utilsplugin2 ;2 package utilsplugin2.selection; 3 3 4 4 import static org.openstreetmap.josm.gui.help.HelpUtil.ht; … … 20 20 * Extends current selection by selecting nodes on all touched ways 21 21 */ 22 class IntersectedWaysRecursiveAction extends JosmAction {22 public class IntersectedWaysRecursiveAction extends JosmAction { 23 23 24 24 public IntersectedWaysRecursiveAction() { -
applications/editors/josm/plugins/utilsplugin2/src/utilsplugin2/selection/NodeWayUtils.java
r25874 r25876 1 1 // License: GPL. Copyright 2011 by Alexei Kasatkin 2 package utilsplugin2 ;2 package utilsplugin2.selection; 3 3 4 4 import java.util.Collection; -
applications/editors/josm/plugins/utilsplugin2/src/utilsplugin2/selection/SelectWayNodesAction.java
r25874 r25876 1 1 // License: GPL. Copyright 2010 by Hanno Hecker 2 package utilsplugin2 ;2 package utilsplugin2.selection; 3 3 4 4 import static org.openstreetmap.josm.gui.help.HelpUtil.ht; 5 5 import static org.openstreetmap.josm.tools.I18n.tr; 6 import static org.openstreetmap.josm.tools.I18n.trn;7 6 8 7 import java.awt.event.ActionEvent; … … 10 9 import java.util.ArrayList; 11 10 import java.util.Collection; 12 import java.util.Collections;13 import java.util.HashSet;14 import java.util.LinkedList;15 import java.util.List;16 11 17 import javax.swing.JOptionPane;18 import javax.swing.JPanel;19 20 import org.openstreetmap.josm.Main;21 12 import org.openstreetmap.josm.actions.JosmAction; 22 import org.openstreetmap.josm.command.AddCommand;23 import org.openstreetmap.josm.command.ChangeCommand;24 import org.openstreetmap.josm.command.Command;25 import org.openstreetmap.josm.command.SequenceCommand;26 13 import org.openstreetmap.josm.data.osm.Node; 27 14 import org.openstreetmap.josm.data.osm.OsmPrimitive; 28 import org.openstreetmap.josm.data.osm.Relation;29 import org.openstreetmap.josm.data.osm.RelationMember;30 15 import org.openstreetmap.josm.data.osm.Way; 31 import org.openstreetmap.josm.gui.MapView;32 16 import org.openstreetmap.josm.tools.Shortcut; 33 17 -
applications/editors/josm/plugins/utilsplugin2/src/utilsplugin2/selection/UnselectNodesAction.java
r25874 r25876 1 1 // License: GPL. Copyright 2011 by Alexei Kasatkin and Martin Ždila 2 package utilsplugin2 ;2 package utilsplugin2.selection; 3 3 4 4 import static org.openstreetmap.josm.gui.help.HelpUtil.ht; … … 17 17 * Unselects all nodes 18 18 */ 19 class UnselectNodesAction extends JosmAction {19 public class UnselectNodesAction extends JosmAction { 20 20 21 21
Note:
See TracChangeset
for help on using the changeset viewer.