Changeset 12639 in josm for trunk/src/org/openstreetmap/josm/gui/layer/geoimage/ImageViewerDialog.java
- Timestamp:
- 2017-08-25T01:37:31+02:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/layer/geoimage/ImageViewerDialog.java
r12636 r12639 22 22 import javax.swing.JToggleButton; 23 23 24 import org.openstreetmap.josm.Main;25 24 import org.openstreetmap.josm.gui.MainApplication; 26 25 import org.openstreetmap.josm.gui.dialogs.DialogsPanel.Action; … … 101 100 "geoimage:previous", tr("Geoimage: {0}", tr("Show previous Image")), KeyEvent.VK_PAGE_UP, Shortcut.DIRECT); 102 101 final String previousImage = "Previous Image"; 103 Main .registerActionShortcut(prevAction, scPrev);102 MainApplication.registerActionShortcut(prevAction, scPrev); 104 103 btnPrevious.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(scPrev.getKeyStroke(), previousImage); 105 104 btnPrevious.getActionMap().put(previousImage, prevAction); … … 112 111 Shortcut scDelete = Shortcut.registerShortcut( 113 112 "geoimage:deleteimagefromlayer", tr("Geoimage: {0}", tr("Remove photo from layer")), KeyEvent.VK_DELETE, Shortcut.SHIFT); 114 Main .registerActionShortcut(delAction, scDelete);113 MainApplication.registerActionShortcut(delAction, scDelete); 115 114 btnDelete.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(scDelete.getKeyStroke(), removePhoto); 116 115 btnDelete.getActionMap().put(removePhoto, delAction); … … 123 122 "geoimage:deletefilefromdisk", tr("Geoimage: {0}", tr("Delete File from disk")), KeyEvent.VK_DELETE, Shortcut.CTRL_SHIFT); 124 123 final String deleteImage = "Delete image file from disk"; 125 Main .registerActionShortcut(delFromDiskAction, scDeleteFromDisk);124 MainApplication.registerActionShortcut(delFromDiskAction, scDeleteFromDisk); 126 125 btnDeleteFromDisk.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(scDeleteFromDisk.getKeyStroke(), deleteImage); 127 126 btnDeleteFromDisk.getActionMap().put(deleteImage, delFromDiskAction); … … 133 132 "geoimage:copypath", tr("Geoimage: {0}", tr("Copy image path")), KeyEvent.VK_C, Shortcut.ALT_CTRL_SHIFT); 134 133 final String copyImage = "Copy image path"; 135 Main .registerActionShortcut(copyPathAction, scCopyPath);134 MainApplication.registerActionShortcut(copyPathAction, scCopyPath); 136 135 btnCopyPath.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(scCopyPath.getKeyStroke(), copyImage); 137 136 btnCopyPath.getActionMap().put(copyImage, copyPathAction); … … 143 142 "geoimage:next", tr("Geoimage: {0}", tr("Show next Image")), KeyEvent.VK_PAGE_DOWN, Shortcut.DIRECT); 144 143 final String nextImage = "Next Image"; 145 Main .registerActionShortcut(nextAction, scNext);144 MainApplication.registerActionShortcut(nextAction, scNext); 146 145 btnNext.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(scNext.getKeyStroke(), nextImage); 147 146 btnNext.getActionMap().put(nextImage, nextAction); 148 147 btnNext.setEnabled(false); 149 148 150 Main .registerActionShortcut(149 MainApplication.registerActionShortcut( 151 150 new ImageAction(COMMAND_FIRST, null, null), 152 151 Shortcut.registerShortcut( 153 152 "geoimage:first", tr("Geoimage: {0}", tr("Show first Image")), KeyEvent.VK_HOME, Shortcut.DIRECT) 154 153 ); 155 Main .registerActionShortcut(154 MainApplication.registerActionShortcut( 156 155 new ImageAction(COMMAND_LAST, null, null), 157 156 Shortcut.registerShortcut(
Note:
See TracChangeset
for help on using the changeset viewer.