Changeset 25717 in osm for applications/editors
- Timestamp:
- 2011-03-25T20:02:44+01:00 (13 years ago)
- Location:
- applications/editors/josm/plugins/relcontext/src/relcontext
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/relcontext/src/relcontext/RelContextDialog.java
r25715 r25717 1 1 package relcontext; 2 2 3 import org.openstreetmap.josm.actions.JosmAction; 3 4 import org.openstreetmap.josm.gui.widgets.PopupMenuLauncher; 4 5 import org.openstreetmap.josm.command.SequenceCommand; … … 67 68 68 69 public RelContextDialog() { 69 super(tr("Relation Toolbox"), PREF_PREFIX, 70 tr("Open relation/multipolygon editor panel"), 71 Shortcut.registerShortcut("subwindow:reltoolbox", tr("Toggle: {0}", tr("Relation Toolbox")), 72 KeyEvent.VK_R, Shortcut.GROUP_LAYER, Shortcut.SHIFT_DEFAULT), 150, true); 70 super(tr("Relation Toolbox"), PREF_PREFIX, tr("Open relation/multipolygon editor panel"), null, 150, true); 73 71 74 72 chosenRelation = new ChosenRelation(); … … 103 101 }); 104 102 roleBox.setVisible(false); 103 final Action enterRoleAction = new EnterRoleAction(); // just for the shorcut 105 104 106 105 // [±][X] relation U [AZ][Down][Edit] … … 513 512 } 514 513 514 private class EnterRoleAction extends JosmAction implements ChosenRelationListener { 515 516 public EnterRoleAction() { 517 super("…", null, tr("Enter role for selected members"), 518 Shortcut.registerShortcut("reltoolbox:changerole", tr("Relation Toolbox: {0}", tr("Enter role for selected members")), 519 KeyEvent.VK_R, Shortcut.GROUP_EDIT), true); 520 chosenRelation.addChosenRelationListener(this); 521 updateEnabledState(); 522 } 523 524 public void actionPerformed( ActionEvent e ) { 525 if( roleBoxModel.membersRole != null ) { 526 String role = askForRoleName(); 527 if( role != null ) 528 applyRoleToSelection(role); 529 } 530 } 531 532 public void chosenRelationChanged( Relation oldRelation, Relation newRelation ) { 533 setEnabled(newRelation != null); 534 } 535 } 536 515 537 private class RoleComboBoxModel extends AbstractListModel implements ComboBoxModel { 516 538 private List<String> roles = new ArrayList<String>(); -
applications/editors/josm/plugins/relcontext/src/relcontext/actions/AddRemoveMemberAction.java
r25688 r25717 5 5 import static org.openstreetmap.josm.tools.I18n.tr; 6 6 import java.awt.event.ActionEvent; 7 import java.awt.event.KeyEvent; 7 8 import org.openstreetmap.josm.Main; 8 9 import org.openstreetmap.josm.actions.JosmAction; … … 14 15 import org.openstreetmap.josm.data.osm.Way; 15 16 import org.openstreetmap.josm.tools.ImageProvider; 17 import org.openstreetmap.josm.tools.Shortcut; 16 18 import relcontext.ChosenRelation; 17 19 import relcontext.ChosenRelationListener; … … 29 31 30 32 public AddRemoveMemberAction( ChosenRelation rel ) { 31 super(null, "relcontext/addremove", tr("Add/remove members from the chosen relation"), null, false); 33 super(null, "relcontext/addremove", tr("Add/remove members from the chosen relation"), 34 Shortcut.registerShortcut("reltoolbox:addremove", tr("Relation Toolbox: {0}", tr("Add/remove members from the chosen relation")), 35 KeyEvent.VK_EQUALS, Shortcut.GROUP_EDIT), true); 32 36 this.rel = rel; 33 37 rel.addChosenRelationListener(this); -
applications/editors/josm/plugins/relcontext/src/relcontext/actions/FindRelationAction.java
r25695 r25717 15 15 import org.openstreetmap.josm.gui.DefaultNameFormatter; 16 16 import org.openstreetmap.josm.gui.OsmPrimitivRenderer; 17 import org.openstreetmap.josm.tools.Shortcut; 17 18 import relcontext.ChosenRelation; 18 19 … … 26 27 27 28 public FindRelationAction( ChosenRelation chRel ) { 28 super("Find", "relcontext/find", "Find a relation", null, false); 29 super("Find", "relcontext/find", tr("Find a relation"), 30 Shortcut.registerShortcut("reltoolbox:find", tr("Relation Toolbox: {0}", tr("Find a relation")), 31 KeyEvent.VK_F, Shortcut.GROUP_EDIT), true); 29 32 this.chRel = chRel; 30 33 }
Note:
See TracChangeset
for help on using the changeset viewer.