Changeset 18715 in josm for trunk/src/org/openstreetmap/josm/gui/dialogs/MapPaintDialog.java
- Timestamp:
- 2023-04-25T17:06:43+02:00 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/dialogs/MapPaintDialog.java
r18311 r18715 311 311 } 312 312 313 protected class OnOffAction extends AbstractAction implements ListSelectionListener {313 protected class OnOffAction extends JosmAction implements ListSelectionListener { 314 314 /** 315 315 * Constructs a new {@code OnOffAction}. 316 316 */ 317 317 public OnOffAction() { 318 putValue(NAME,tr("On/Off"));319 putValue(SHORT_DESCRIPTION, tr("Turn selected styles on or off"));320 new ImageProvider("apply").getResource().attachImageIcon(this, true);318 super(tr("On/Off"), "apply", tr("Turn selected styles on or off"), 319 Shortcut.registerShortcut("map:paint:style:on_off", tr("Filter: Add"), KeyEvent.VK_UNDEFINED, Shortcut.NONE), 320 false, false); 321 321 updateEnabledState(); 322 322 } 323 323 324 @Override 324 325 protected void updateEnabledState() { 325 326 setEnabled(!cbWireframe.isSelected() && tblStyles.getSelectedRowCount() > 0); … … 342 343 * The action to move down the currently selected entries in the list. 343 344 */ 344 protected class MoveUpDownAction extends AbstractAction implements ListSelectionListener {345 protected class MoveUpDownAction extends JosmAction implements ListSelectionListener { 345 346 346 347 private final int increment; … … 351 352 */ 352 353 public MoveUpDownAction(boolean isDown) { 354 super(isDown ? tr("Down") : tr("Up"), "dialogs/" + (isDown ? "down" : "up"), 355 isDown ? tr("Move the selected entry one row down.") : tr("Move the selected entry one row up."), 356 isDown ? Shortcut.registerShortcut("map:paint:style:down", tr("Map Paint Styles: Move selected entry down"), 357 KeyEvent.VK_UNDEFINED, Shortcut.NONE) 358 : Shortcut.registerShortcut("map:paint:style:up", tr("Map Paint Styles: Move selected entry up"), 359 KeyEvent.VK_UNDEFINED, Shortcut.NONE), 360 false, false); 353 361 increment = isDown ? 1 : -1; 354 putValue(NAME, isDown ? tr("Down") : tr("Up"));355 new ImageProvider("dialogs", isDown ? "down" : "up").getResource().attachImageIcon(this, true);356 putValue(SHORT_DESCRIPTION, isDown ? tr("Move the selected entry one row down.") : tr("Move the selected entry one row up."));357 362 updateEnabledState(); 358 363 } 359 364 365 @Override 360 366 public void updateEnabledState() { 361 367 int[] sel = tblStyles.getSelectedRows();
Note:
See TracChangeset
for help on using the changeset viewer.
