Changeset 25717 in osm for applications/editors/josm/plugins/relcontext/src/relcontext/RelContextDialog.java
- Timestamp:
- 2011-03-25T20:02:44+01:00 (15 years ago)
- File:
-
- 1 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>();
Note:
See TracChangeset
for help on using the changeset viewer.
