- Timestamp:
- 2008-11-18T19:53:53+01:00 (16 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 1 added
- 3 deleted
- 73 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/Main.java
r1080 r1084 63 63 import org.openstreetmap.josm.tools.PlatformHookWindows; 64 64 import org.openstreetmap.josm.tools.PlatformHookOsx; 65 import org.openstreetmap.josm.tools.Short Cut;65 import org.openstreetmap.josm.tools.Shortcut; 66 66 67 67 abstract public class Main { … … 204 204 contentPane.add(toolbar.control, BorderLayout.NORTH); 205 205 206 contentPane.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(Short Cut.registerShortCut("system:help", tr("Help"), KeyEvent.VK_F1, ShortCut.GROUP_DIRECT).getKeyStroke(), "Help");206 contentPane.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(Shortcut.registerShortcut("system:help", tr("Help"), KeyEvent.VK_F1, Shortcut.GROUP_DIRECT).getKeyStroke(), "Help"); 207 207 contentPane.getActionMap().put("Help", menu.help); 208 208 … … 440 440 441 441 public static boolean breakBecauseUnsavedChanges() { 442 Short Cut.savePrefs();442 Shortcut.savePrefs(); 443 443 if (map != null) { 444 444 boolean modified = false; -
trunk/src/org/openstreetmap/josm/actions/AboutAction.java
r1073 r1084 34 34 import org.openstreetmap.josm.tools.ImageProvider; 35 35 import org.openstreetmap.josm.tools.UrlLabel; 36 import org.openstreetmap.josm.tools.Short Cut;36 import org.openstreetmap.josm.tools.Shortcut; 37 37 38 38 /** … … 70 70 71 71 public AboutAction() { 72 super(tr("About"), "about", tr("Display the about screen."), Short Cut.registerShortCut("system:about", tr("About"), KeyEvent.VK_F1, ShortCut.GROUP_DIRECT, ShortCut.SHIFT_DEFAULT), true);72 super(tr("About"), "about", tr("Display the about screen."), Shortcut.registerShortcut("system:about", tr("About"), KeyEvent.VK_F1, Shortcut.GROUP_DIRECT, Shortcut.SHIFT_DEFAULT), true); 73 73 } 74 74 -
trunk/src/org/openstreetmap/josm/actions/AlignInCircleAction.java
r1054 r1084 20 20 import org.openstreetmap.josm.data.osm.OsmPrimitive; 21 21 import org.openstreetmap.josm.data.osm.Way; 22 import org.openstreetmap.josm.tools.Short Cut;22 import org.openstreetmap.josm.tools.Shortcut; 23 23 24 24 /** … … 31 31 public AlignInCircleAction() { 32 32 super(tr("Align Nodes in Circle"), "aligncircle", tr("Move the selected nodes into a circle."), 33 Short Cut.registerShortCut("tools:aligncircle", tr("Tool: {0}", tr("Align Nodes in Circle")), KeyEvent.VK_O, ShortCut.GROUP_EDIT), true);33 Shortcut.registerShortcut("tools:aligncircle", tr("Tool: {0}", tr("Align Nodes in Circle")), KeyEvent.VK_O, Shortcut.GROUP_EDIT), true); 34 34 } 35 35 -
trunk/src/org/openstreetmap/josm/actions/AlignInLineAction.java
r1054 r1084 18 18 import org.openstreetmap.josm.data.osm.OsmPrimitive; 19 19 import org.openstreetmap.josm.data.osm.Way; 20 import org.openstreetmap.josm.tools.Short Cut;20 import org.openstreetmap.josm.tools.Shortcut; 21 21 22 22 /** … … 31 31 public AlignInLineAction() { 32 32 super(tr("Align Nodes in Line"), "alignline", tr("Move the selected nodes onto a line."), 33 Short Cut.registerShortCut("tools:alignline", tr("Tool: {0}", tr("Align Nodes in Line")), KeyEvent.VK_L, ShortCut.GROUP_EDIT), true);33 Shortcut.registerShortcut("tools:alignline", tr("Tool: {0}", tr("Align Nodes in Line")), KeyEvent.VK_L, Shortcut.GROUP_EDIT), true); 34 34 } 35 35 -
trunk/src/org/openstreetmap/josm/actions/AutoScaleAction.java
r1054 r1084 15 15 import org.openstreetmap.josm.data.osm.visitor.BoundingXYVisitor; 16 16 import org.openstreetmap.josm.gui.layer.Layer; 17 import org.openstreetmap.josm.tools.Short Cut;17 import org.openstreetmap.josm.tools.Shortcut; 18 18 19 19 /** … … 47 47 public AutoScaleAction(String mode) { 48 48 super(tr("Zoom to {0}", tr(mode)), "dialogs/autoscale/" + mode, tr("Zoom the view to {0}.", tr(mode)), 49 Short Cut.registerShortCut("view:zoom"+mode, tr("View: {0}", tr("Zoom to {0}", tr(mode))), getModeShortcut(mode), ShortCut.GROUP_EDIT), true);49 Shortcut.registerShortcut("view:zoom"+mode, tr("View: {0}", tr("Zoom to {0}", tr(mode))), getModeShortcut(mode), Shortcut.GROUP_EDIT), true); 50 50 String modeHelp = Character.toUpperCase(mode.charAt(0)) + mode.substring(1); 51 51 putValue("help", "Action/AutoScale/" + modeHelp); -
trunk/src/org/openstreetmap/josm/actions/CombineWayAction.java
r1054 r1084 40 40 import org.openstreetmap.josm.tools.GBC; 41 41 import org.openstreetmap.josm.tools.Pair; 42 import org.openstreetmap.josm.tools.Short Cut;42 import org.openstreetmap.josm.tools.Shortcut; 43 43 44 44 /** … … 51 51 public CombineWayAction() { 52 52 super(tr("Combine Way"), "combineway", tr("Combine several ways into one."), 53 Short Cut.registerShortCut("tools:combineway", tr("Tool: {0}", tr("Combine Way")), KeyEvent.VK_C, ShortCut.GROUP_EDIT), true);53 Shortcut.registerShortcut("tools:combineway", tr("Tool: {0}", tr("Combine Way")), KeyEvent.VK_C, Shortcut.GROUP_EDIT), true); 54 54 DataSet.selListeners.add(this); 55 55 } -
trunk/src/org/openstreetmap/josm/actions/CopyAction.java
r1054 r1084 24 24 import org.openstreetmap.josm.data.osm.Way; 25 25 import org.openstreetmap.josm.data.osm.visitor.Visitor; 26 import org.openstreetmap.josm.tools.Short Cut;26 import org.openstreetmap.josm.tools.Shortcut; 27 27 28 28 public final class CopyAction extends JosmAction implements SelectionChangedListener { … … 33 33 super(tr("Copy"), "copy", 34 34 tr("Copy selected objects to paste buffer."), 35 Short Cut.registerShortCut("system:copy", tr("Edit: {0}", tr("Copy")), KeyEvent.VK_C, ShortCut.GROUP_MENU), true);35 Shortcut.registerShortcut("system:copy", tr("Edit: {0}", tr("Copy")), KeyEvent.VK_C, Shortcut.GROUP_MENU), true); 36 36 setEnabled(false); 37 37 DataSet.selListeners.add(this); -
trunk/src/org/openstreetmap/josm/actions/CreateCircleAction.java
r1054 r1084 20 20 import org.openstreetmap.josm.data.osm.OsmPrimitive; 21 21 import org.openstreetmap.josm.data.osm.Way; 22 import org.openstreetmap.josm.tools.Short Cut;22 import org.openstreetmap.josm.tools.Shortcut; 23 23 24 24 /** … … 36 36 public CreateCircleAction() { 37 37 super(tr("Create Circle"), "createcircle", tr("Create a circle from three selected nodes."), 38 Short Cut.registerShortCut("tools:createcircle", tr("Tool: {0}", tr("Create Circle")), KeyEvent.VK_O, ShortCut.GROUP_EDIT, ShortCut.SHIFT_DEFAULT), true);38 Shortcut.registerShortcut("tools:createcircle", tr("Tool: {0}", tr("Create Circle")), KeyEvent.VK_O, Shortcut.GROUP_EDIT, Shortcut.SHIFT_DEFAULT), true); 39 39 } 40 40 -
trunk/src/org/openstreetmap/josm/actions/DeleteAction.java
r1054 r1084 8 8 9 9 import org.openstreetmap.josm.Main; 10 import org.openstreetmap.josm.tools.Short Cut;10 import org.openstreetmap.josm.tools.Shortcut; 11 11 12 12 public final class DeleteAction extends JosmAction { … … 14 14 public DeleteAction() { 15 15 super(tr("Delete"), "dialogs/delete", tr("Delete selected objects."), 16 Short Cut.registerShortCut("system:delete", tr("Edit: {0}", tr("Delete")), KeyEvent.VK_DELETE, ShortCut.GROUP_DIRECT), true);16 Shortcut.registerShortcut("system:delete", tr("Edit: {0}", tr("Delete")), KeyEvent.VK_DELETE, Shortcut.GROUP_DIRECT), true); 17 17 setEnabled(true); 18 18 } -
trunk/src/org/openstreetmap/josm/actions/DiskAccessAction.java
r1023 r1084 10 10 11 11 import org.openstreetmap.josm.Main; 12 import org.openstreetmap.josm.tools.Short Cut;12 import org.openstreetmap.josm.tools.Shortcut; 13 13 14 14 /** … … 17 17 abstract public class DiskAccessAction extends JosmAction { 18 18 19 public DiskAccessAction(String name, String iconName, String tooltip, Short Cut shortCut) {20 super(name, iconName, tooltip, short Cut, true);19 public DiskAccessAction(String name, String iconName, String tooltip, Shortcut shortcut) { 20 super(name, iconName, tooltip, shortcut, true); 21 21 } 22 22 23 23 @Deprecated 24 public DiskAccessAction(String name, String iconName, String tooltip, int short Cut, int modifiers) {25 super(name, iconName, tooltip, short Cut, modifiers, true);24 public DiskAccessAction(String name, String iconName, String tooltip, int shortcut, int modifiers) { 25 super(name, iconName, tooltip, shortcut, modifiers, true); 26 26 } 27 27 -
trunk/src/org/openstreetmap/josm/actions/DownloadAction.java
r1054 r1084 16 16 import org.openstreetmap.josm.gui.download.DownloadDialog.DownloadTask; 17 17 import org.openstreetmap.josm.tools.GBC; 18 import org.openstreetmap.josm.tools.Short Cut;18 import org.openstreetmap.josm.tools.Shortcut; 19 19 20 20 /** … … 32 32 public DownloadAction() { 33 33 super(tr("Download from OSM ..."), "download", tr("Download map data from the OSM server."), 34 Short Cut.registerShortCut("file:download", tr("File: {0}", tr("Download from OSM ...")), KeyEvent.VK_D, ShortCut.GROUPS_ALT1+ShortCut.GROUP_HOTKEY), true);34 Shortcut.registerShortcut("file:download", tr("File: {0}", tr("Download from OSM ...")), KeyEvent.VK_D, Shortcut.GROUPS_ALT1+Shortcut.GROUP_HOTKEY), true); 35 35 } 36 36 -
trunk/src/org/openstreetmap/josm/actions/DuplicateAction.java
r1054 r1084 13 13 import org.openstreetmap.josm.data.osm.DataSet; 14 14 import org.openstreetmap.josm.data.osm.OsmPrimitive; 15 import org.openstreetmap.josm.tools.Short Cut;15 import org.openstreetmap.josm.tools.Shortcut; 16 16 17 17 public final class DuplicateAction extends JosmAction implements SelectionChangedListener { … … 20 20 super(tr("Duplicate"), "duplicate", 21 21 tr("Duplicate selection by copy and immediate paste."), 22 Short Cut.registerShortCut("system:duplicate", tr("Edit: {0}", tr("Duplicate")), KeyEvent.VK_D, ShortCut.GROUP_MENU), true);22 Shortcut.registerShortcut("system:duplicate", tr("Edit: {0}", tr("Duplicate")), KeyEvent.VK_D, Shortcut.GROUP_MENU), true); 23 23 setEnabled(false); 24 24 DataSet.selListeners.add(this); -
trunk/src/org/openstreetmap/josm/actions/ExitAction.java
r1054 r1084 8 8 9 9 import org.openstreetmap.josm.Main; 10 import org.openstreetmap.josm.tools.Short Cut;10 import org.openstreetmap.josm.tools.Shortcut; 11 11 12 12 /** … … 21 21 public ExitAction() { 22 22 super(tr("Exit"), "exit", tr("Exit the application."), 23 Short Cut.registerShortCut("system:menuexit", tr("Exit"), KeyEvent.VK_Q, ShortCut.GROUP_MENU), true);23 Shortcut.registerShortcut("system:menuexit", tr("Exit"), KeyEvent.VK_Q, Shortcut.GROUP_MENU), true); 24 24 } 25 25 -
trunk/src/org/openstreetmap/josm/actions/GpxExportAction.java
r1054 r1084 33 33 import org.openstreetmap.josm.io.GpxWriter; 34 34 import org.openstreetmap.josm.tools.GBC; 35 import org.openstreetmap.josm.tools.Short Cut;35 import org.openstreetmap.josm.tools.Shortcut; 36 36 37 37 /** … … 46 46 public GpxExportAction(Layer layer) { 47 47 super(tr("Export to GPX ..."), "exportgpx", tr("Export the data to GPX file."), 48 Short Cut.registerShortCut("file:exportgpx", tr("Export to GPX ..."), KeyEvent.VK_E, ShortCut.GROUP_MENU));48 Shortcut.registerShortcut("file:exportgpx", tr("Export to GPX ..."), KeyEvent.VK_E, Shortcut.GROUP_MENU)); 49 49 this.layer = layer; 50 50 } -
trunk/src/org/openstreetmap/josm/actions/HistoryInfoAction.java
r1054 r1084 14 14 import org.openstreetmap.josm.data.osm.visitor.Visitor; 15 15 import org.openstreetmap.josm.tools.OpenBrowser; 16 import org.openstreetmap.josm.tools.Short Cut;16 import org.openstreetmap.josm.tools.Shortcut; 17 17 18 18 public class HistoryInfoAction extends JosmAction { … … 20 20 public HistoryInfoAction() { 21 21 super(tr("OSM History Information"), "about",tr("Display history information about OSM ways or nodes."), 22 Short Cut.registerShortCut("core:history", tr("OSM History Information"), KeyEvent.VK_H, ShortCut.GROUP_HOTKEY), true);22 Shortcut.registerShortcut("core:history", tr("OSM History Information"), KeyEvent.VK_H, Shortcut.GROUP_HOTKEY), true); 23 23 } 24 24 -
trunk/src/org/openstreetmap/josm/actions/JoinNodeWayAction.java
r1054 r1084 23 23 import org.openstreetmap.josm.data.osm.Way; 24 24 import org.openstreetmap.josm.data.osm.WaySegment; 25 import org.openstreetmap.josm.tools.Short Cut;25 import org.openstreetmap.josm.tools.Shortcut; 26 26 27 27 public class JoinNodeWayAction extends JosmAction { 28 28 public JoinNodeWayAction() { 29 29 super(tr("Join node to way"), "joinnodeway", tr("Join a node into the nearest way segments"), 30 Short Cut.registerShortCut("tools:joinnodeway", tr("Tool: {0}", tr("Join node to way")), KeyEvent.VK_J, ShortCut.GROUP_EDIT), true);30 Shortcut.registerShortcut("tools:joinnodeway", tr("Tool: {0}", tr("Join node to way")), KeyEvent.VK_J, Shortcut.GROUP_EDIT), true); 31 31 } 32 32 -
trunk/src/org/openstreetmap/josm/actions/JosmAction.java
r1023 r1084 12 12 import org.openstreetmap.josm.tools.Destroyable; 13 13 import org.openstreetmap.josm.tools.ImageProvider; 14 import org.openstreetmap.josm.tools.Short Cut;14 import org.openstreetmap.josm.tools.Shortcut; 15 15 16 16 /** … … 26 26 27 27 @Deprecated 28 public KeyStroke short Cut;29 protected Short Cut sc;28 public KeyStroke shortcut; 29 protected Shortcut sc; 30 30 31 public Short Cut getShortCut() {31 public Shortcut getShortcut() { 32 32 if (sc == null) { 33 sc = Short Cut.registerShortCut("core:none", "No Shortcut", 0, ShortCut.GROUP_NONE);33 sc = Shortcut.registerShortcut("core:none", "No Shortcut", 0, Shortcut.GROUP_NONE); 34 34 sc.setAutomatic(); // as this shortcut is shared by all action that don't want to have a shortcut, 35 35 // we shouldn't allow the user to change it... … … 39 39 40 40 @Deprecated 41 public JosmAction(String name, String iconName, String tooltip, int short Cut, int modifier, boolean register) {41 public JosmAction(String name, String iconName, String tooltip, int shortcut, int modifier, boolean register) { 42 42 super(name, iconName == null ? null : ImageProvider.get(iconName)); 43 43 setHelpId(); 44 if (short Cut != 0) {45 int group = Short Cut.GROUP_LAYER; //GROUP_NONE;44 if (shortcut != 0) { 45 int group = Shortcut.GROUP_LAYER; //GROUP_NONE; 46 46 if (((modifier & InputEvent.CTRL_MASK) != 0) || ((modifier & InputEvent.CTRL_DOWN_MASK) != 0)) { 47 group = Short Cut.GROUP_MENU;47 group = Shortcut.GROUP_MENU; 48 48 } else if (modifier == 0) { 49 group = Short Cut.GROUP_EDIT;49 group = Shortcut.GROUP_EDIT; 50 50 } 51 sc = Short Cut.registerShortCut("auto:"+name, name, shortCut, group);52 this.short Cut = sc.getKeyStroke();51 sc = Shortcut.registerShortcut("auto:"+name, name, shortcut, group); 52 this.shortcut = sc.getKeyStroke(); 53 53 Main.contentPane.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(sc.getKeyStroke(), name); 54 54 Main.contentPane.getActionMap().put(name, this); … … 69 69 * tooltip - a longer description of the action that will be displayed in the tooltip. Please note 70 70 * that html is not supported for menu action on some platforms 71 * short Cut - a ready-created shortcut object or null if you don't want a shortcut. But you always71 * shortcut - a ready-created shortcut object or null if you don't want a shortcut. But you always 72 72 * do want a shortcut, remember you can alway register it with group=none, so you 73 73 * won't be assigned a shurtcut unless the user configures one. If you pass null here, … … 75 75 * register - register this action for the toolbar preferences? 76 76 */ 77 public JosmAction(String name, String iconName, String tooltip, Short Cut shortCut, boolean register) {77 public JosmAction(String name, String iconName, String tooltip, Shortcut shortcut, boolean register) { 78 78 super(name, iconName == null ? null : ImageProvider.get(iconName)); 79 79 setHelpId(); 80 sc = short Cut;80 sc = shortcut; 81 81 if (sc != null) { 82 this.short Cut = sc.getKeyStroke();82 this.shortcut = sc.getKeyStroke(); 83 83 Main.contentPane.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(sc.getKeyStroke(), name); 84 84 Main.contentPane.getActionMap().put(name, this); … … 91 91 92 92 public void destroy() { 93 if (short Cut != null) {93 if (shortcut != null) { 94 94 Main.contentPane.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).remove(sc.getKeyStroke()); 95 95 Main.contentPane.getActionMap().remove(sc.getKeyStroke()); -
trunk/src/org/openstreetmap/josm/actions/MergeNodesAction.java
r1054 r1084 40 40 import org.openstreetmap.josm.tools.GBC; 41 41 import org.openstreetmap.josm.tools.Pair; 42 import org.openstreetmap.josm.tools.Short Cut;42 import org.openstreetmap.josm.tools.Shortcut; 43 43 44 44 … … 54 54 public MergeNodesAction() { 55 55 super(tr("Merge Nodes"), "mergenodes", tr("Merge nodes into the oldest one."), 56 Short Cut.registerShortCut("tools:mergenodes", tr("Tool: {0}", tr("Merge Nodes")), KeyEvent.VK_M, ShortCut.GROUP_EDIT), true);56 Shortcut.registerShortcut("tools:mergenodes", tr("Tool: {0}", tr("Merge Nodes")), KeyEvent.VK_M, Shortcut.GROUP_EDIT), true); 57 57 DataSet.selListeners.add(this); 58 58 } -
trunk/src/org/openstreetmap/josm/actions/MoveAction.java
r1023 r1084 17 17 import org.openstreetmap.josm.data.osm.OsmPrimitive; 18 18 import org.openstreetmap.josm.data.osm.visitor.AllNodesVisitor; 19 import org.openstreetmap.josm.tools.Short Cut;19 import org.openstreetmap.josm.tools.Shortcut; 20 20 21 21 /** … … 31 31 // any better idea? 32 32 private static Object calltosupermustbefirststatementinconstructor(Direction dir, boolean text) { 33 Short Cut sc;33 Shortcut sc; 34 34 String directiontext; 35 35 if (dir == Direction.UP) { 36 36 directiontext = tr("up"); 37 sc = Short Cut.registerShortCut("core:moveup", tr("Move objects {0}", directiontext), KeyEvent.VK_UP, ShortCut.GROUPS_ALT1+ShortCut.GROUP_DIRECT);37 sc = Shortcut.registerShortcut("core:moveup", tr("Move objects {0}", directiontext), KeyEvent.VK_UP, Shortcut.GROUPS_ALT1+Shortcut.GROUP_DIRECT); 38 38 } else if (dir == Direction.DOWN) { 39 39 directiontext = tr("down"); 40 sc = Short Cut.registerShortCut("core:movedown", tr("Move objects {0}", directiontext), KeyEvent.VK_DOWN, ShortCut.GROUPS_ALT1+ShortCut.GROUP_DIRECT);40 sc = Shortcut.registerShortcut("core:movedown", tr("Move objects {0}", directiontext), KeyEvent.VK_DOWN, Shortcut.GROUPS_ALT1+Shortcut.GROUP_DIRECT); 41 41 } else if (dir == Direction.LEFT) { 42 42 directiontext = tr("left"); 43 sc = Short Cut.registerShortCut("core:moveleft", tr("Move objects {0}", directiontext), KeyEvent.VK_LEFT, ShortCut.GROUPS_ALT1+ShortCut.GROUP_DIRECT);43 sc = Shortcut.registerShortcut("core:moveleft", tr("Move objects {0}", directiontext), KeyEvent.VK_LEFT, Shortcut.GROUPS_ALT1+Shortcut.GROUP_DIRECT); 44 44 } else { //dir == Direction.RIGHT) { 45 45 directiontext = tr("right"); 46 sc = Short Cut.registerShortCut("core:moveright", tr("Move objects {0}", directiontext), KeyEvent.VK_RIGHT, ShortCut.GROUPS_ALT1+ShortCut.GROUP_DIRECT);46 sc = Shortcut.registerShortcut("core:moveright", tr("Move objects {0}", directiontext), KeyEvent.VK_RIGHT, Shortcut.GROUPS_ALT1+Shortcut.GROUP_DIRECT); 47 47 } 48 48 if (text) { … … 56 56 super(tr("Move {0}", calltosupermustbefirststatementinconstructor(dir, true)), null, 57 57 tr("Moves Objects {0}", calltosupermustbefirststatementinconstructor(dir, true)), 58 (Short Cut)calltosupermustbefirststatementinconstructor(dir, false), true);58 (Shortcut)calltosupermustbefirststatementinconstructor(dir, false), true); 59 59 myDirection = dir; 60 60 } -
trunk/src/org/openstreetmap/josm/actions/NewAction.java
r1054 r1084 10 10 import org.openstreetmap.josm.data.osm.DataSet; 11 11 import org.openstreetmap.josm.gui.layer.OsmDataLayer; 12 import org.openstreetmap.josm.tools.Short Cut;12 import org.openstreetmap.josm.tools.Shortcut; 13 13 14 14 public class NewAction extends JosmAction { … … 16 16 public NewAction() { 17 17 super(tr("New"), "new", tr("Create a new map."), 18 Short Cut.registerShortCut("system:new", tr("File: {0}", tr("New")), KeyEvent.VK_N, ShortCut.GROUP_MENU), true);18 Shortcut.registerShortcut("system:new", tr("File: {0}", tr("New")), KeyEvent.VK_N, Shortcut.GROUP_MENU), true); 19 19 } 20 20 -
trunk/src/org/openstreetmap/josm/actions/OpenAction.java
r1054 r1084 25 25 import org.openstreetmap.josm.io.OsmReader; 26 26 import org.xml.sax.SAXException; 27 import org.openstreetmap.josm.tools.Short Cut;27 import org.openstreetmap.josm.tools.Shortcut; 28 28 29 29 /** … … 40 40 public OpenAction() { 41 41 super(tr("Open ..."), "open", tr("Open a file."), 42 Short Cut.registerShortCut("system:open", tr("File: {0}", tr("Open ...")), KeyEvent.VK_O, ShortCut.GROUP_MENU));42 Shortcut.registerShortcut("system:open", tr("File: {0}", tr("Open ...")), KeyEvent.VK_O, Shortcut.GROUP_MENU)); 43 43 } 44 44 -
trunk/src/org/openstreetmap/josm/actions/OrthogonalizeAction.java
r1076 r1084 25 25 import org.openstreetmap.josm.data.osm.Way; 26 26 import org.openstreetmap.josm.tools.DontShowAgainInfo; 27 import org.openstreetmap.josm.tools.Short Cut;27 import org.openstreetmap.josm.tools.Shortcut; 28 28 29 29 /** … … 42 42 "ortho", 43 43 tr("Move nodes so all angles are 0/90/180/270deg"), 44 Short Cut.registerShortCut("tools:orthogonalize", tr("Tool: {0}", tr("Orthogonalize")),44 Shortcut.registerShortcut("tools:orthogonalize", tr("Tool: {0}", tr("Orthogonalize")), 45 45 KeyEvent.VK_Q, 46 Short Cut.GROUP_EDIT), true);46 Shortcut.GROUP_EDIT), true); 47 47 } 48 48 -
trunk/src/org/openstreetmap/josm/actions/PasteAction.java
r1054 r1084 24 24 import org.openstreetmap.josm.data.osm.Way; 25 25 import org.openstreetmap.josm.data.coor.EastNorth; 26 import org.openstreetmap.josm.tools.Short Cut;26 import org.openstreetmap.josm.tools.Shortcut; 27 27 28 28 public final class PasteAction extends JosmAction { … … 30 30 public PasteAction() { 31 31 super(tr("Paste"), "paste", tr("Paste contents of paste buffer."), 32 Short Cut.registerShortCut("system:paste", tr("Edit: {0}", tr("Paste")), KeyEvent.VK_V, ShortCut.GROUP_MENU), true);32 Shortcut.registerShortcut("system:paste", tr("Edit: {0}", tr("Paste")), KeyEvent.VK_V, Shortcut.GROUP_MENU), true); 33 33 setEnabled(false); 34 34 } -
trunk/src/org/openstreetmap/josm/actions/PasteTagsAction.java
r1054 r1084 20 20 import org.openstreetmap.josm.data.osm.DataSet; 21 21 import org.openstreetmap.josm.data.osm.OsmPrimitive; 22 import org.openstreetmap.josm.tools.Short Cut;22 import org.openstreetmap.josm.tools.Shortcut; 23 23 24 24 public final class PasteTagsAction extends JosmAction implements SelectionChangedListener { … … 27 27 super(tr("Paste Tags"), "pastetags", 28 28 tr("Apply tags of contents of paste buffer to all selected items."), 29 Short Cut.registerShortCut("system:pastestyle", tr("Edit: {0}", tr("Paste Tags")), KeyEvent.VK_V, ShortCut.GROUP_MENU, ShortCut.SHIFT_DEFAULT), true);29 Shortcut.registerShortcut("system:pastestyle", tr("Edit: {0}", tr("Paste Tags")), KeyEvent.VK_V, Shortcut.GROUP_MENU, Shortcut.SHIFT_DEFAULT), true); 30 30 DataSet.selListeners.add(this); 31 31 copyAction.addListener(this); -
trunk/src/org/openstreetmap/josm/actions/PreferencesAction.java
r1053 r1084 16 16 import org.openstreetmap.josm.gui.preferences.PreferenceDialog; 17 17 import org.openstreetmap.josm.tools.GBC; 18 import org.openstreetmap.josm.tools.Short Cut;18 import org.openstreetmap.josm.tools.Shortcut; 19 19 20 20 /** … … 30 30 public PreferencesAction() { 31 31 super(tr("Preferences ..."), "preference", tr("Open a preferences page for global settings."), 32 Short Cut.registerShortCut("system:preferences", tr("Preferences"), KeyEvent.VK_F12, ShortCut.GROUP_DIRECT), true);32 Shortcut.registerShortcut("system:preferences", tr("Preferences"), KeyEvent.VK_F12, Shortcut.GROUP_DIRECT), true); 33 33 } 34 34 -
trunk/src/org/openstreetmap/josm/actions/RedoAction.java
r1054 r1084 8 8 9 9 import org.openstreetmap.josm.Main; 10 import org.openstreetmap.josm.tools.Short Cut;10 import org.openstreetmap.josm.tools.Shortcut; 11 11 12 12 /** … … 22 22 public RedoAction() { 23 23 super(tr("Redo"), "redo", tr("Redo the last undone action."), 24 Short Cut.registerShortCut("system:redo", tr("Edit: {0}", tr("Redo")), KeyEvent.VK_Y, ShortCut.GROUP_MENU), true);24 Shortcut.registerShortcut("system:redo", tr("Edit: {0}", tr("Redo")), KeyEvent.VK_Y, Shortcut.GROUP_MENU), true); 25 25 setEnabled(false); 26 26 } -
trunk/src/org/openstreetmap/josm/actions/ReverseWayAction.java
r1054 r1084 24 24 import org.openstreetmap.josm.data.osm.Way; 25 25 import org.openstreetmap.josm.data.osm.visitor.Visitor; 26 import org.openstreetmap.josm.tools.Short Cut;26 import org.openstreetmap.josm.tools.Shortcut; 27 27 28 28 public final class ReverseWayAction extends JosmAction { … … 30 30 public ReverseWayAction() { 31 31 super(tr("Reverse ways"), "wayflip", tr("Reverse the direction of all selected ways."), 32 Short Cut.registerShortCut("tools:reverse", tr("Tool: {0}", tr("Reverse ways")), KeyEvent.VK_R, ShortCut.GROUP_EDIT), true);32 Shortcut.registerShortcut("tools:reverse", tr("Tool: {0}", tr("Reverse ways")), KeyEvent.VK_R, Shortcut.GROUP_EDIT), true); 33 33 } 34 34 -
trunk/src/org/openstreetmap/josm/actions/SaveAction.java
r1054 r1084 10 10 import org.openstreetmap.josm.gui.layer.GpxLayer; 11 11 import org.openstreetmap.josm.gui.layer.OsmDataLayer; 12 import org.openstreetmap.josm.tools.Short Cut;12 import org.openstreetmap.josm.tools.Shortcut; 13 13 14 14 /** … … 25 25 public SaveAction(Layer layer) { 26 26 super(tr("Save"), "save", tr("Save the current data."), 27 Short Cut.registerShortCut("system:save", tr("File: {0}", tr("Save")), KeyEvent.VK_S, ShortCut.GROUP_MENU), layer);27 Shortcut.registerShortcut("system:save", tr("File: {0}", tr("Save")), KeyEvent.VK_S, Shortcut.GROUP_MENU), layer); 28 28 } 29 29 -
trunk/src/org/openstreetmap/josm/actions/SaveActionBase.java
r1023 r1084 22 22 import org.openstreetmap.josm.io.OsmWriter; 23 23 import org.openstreetmap.josm.io.GpxWriter; 24 import org.openstreetmap.josm.tools.Short Cut;24 import org.openstreetmap.josm.tools.Shortcut; 25 25 26 26 public abstract class SaveActionBase extends DiskAccessAction { … … 28 28 private Layer layer; 29 29 30 public SaveActionBase(String name, String iconName, String tooltip, Short Cut shortCut, Layer layer) {31 super(name, iconName, tooltip, short Cut);30 public SaveActionBase(String name, String iconName, String tooltip, Shortcut shortcut, Layer layer) { 31 super(name, iconName, tooltip, shortcut); 32 32 this.layer = layer; 33 33 } 34 34 35 35 @Deprecated 36 public SaveActionBase(String name, String iconName, String tooltip, int short Cut, int modifiers, Layer layer) {37 super(name, iconName, tooltip, short Cut, modifiers);36 public SaveActionBase(String name, String iconName, String tooltip, int shortcut, int modifiers, Layer layer) { 37 super(name, iconName, tooltip, shortcut, modifiers); 38 38 this.layer = layer; 39 39 } -
trunk/src/org/openstreetmap/josm/actions/SaveAsAction.java
r1054 r1084 8 8 9 9 import org.openstreetmap.josm.gui.layer.Layer; 10 import org.openstreetmap.josm.tools.Short Cut;10 import org.openstreetmap.josm.tools.Shortcut; 11 11 12 12 /** … … 23 23 public SaveAsAction(Layer layer) { 24 24 super(tr("Save as ..."), "save_as", tr("Save the current data to a new file."), 25 Short Cut.registerShortCut("system:saveas", tr("File: {0}", tr("Save as ...")), KeyEvent.VK_S, ShortCut.GROUP_MENU, ShortCut.SHIFT_DEFAULT), layer);25 Shortcut.registerShortcut("system:saveas", tr("File: {0}", tr("Save as ...")), KeyEvent.VK_S, Shortcut.GROUP_MENU, Shortcut.SHIFT_DEFAULT), layer); 26 26 } 27 27 -
trunk/src/org/openstreetmap/josm/actions/SelectAllAction.java
r1054 r1084 8 8 9 9 import org.openstreetmap.josm.Main; 10 import org.openstreetmap.josm.tools.Short Cut;10 import org.openstreetmap.josm.tools.Shortcut; 11 11 12 12 public class SelectAllAction extends JosmAction { … … 14 14 public SelectAllAction() { 15 15 super(tr("Select All"),"selectall", tr("Select all undeleted objects in the data layer. This selects incomplete objects too."), 16 Short Cut.registerShortCut("system:selectall", tr("Edit: {0}", tr("Select All")), KeyEvent.VK_A, ShortCut.GROUP_MENU), true);16 Shortcut.registerShortcut("system:selectall", tr("Edit: {0}", tr("Select All")), KeyEvent.VK_A, Shortcut.GROUP_MENU), true); 17 17 } 18 18 -
trunk/src/org/openstreetmap/josm/actions/SplitWayAction.java
r1054 r1084 33 33 import org.openstreetmap.josm.data.osm.visitor.NameVisitor; 34 34 import org.openstreetmap.josm.data.osm.visitor.Visitor; 35 import org.openstreetmap.josm.tools.Short Cut;35 import org.openstreetmap.josm.tools.Shortcut; 36 36 37 37 /** … … 52 52 public SplitWayAction() { 53 53 super(tr("Split Way"), "splitway", tr("Split a way at the selected node."), 54 Short Cut.registerShortCut("tools:splitway", tr("Tool: {0}", tr("Split Way")), KeyEvent.VK_P, ShortCut.GROUP_EDIT), true);54 Shortcut.registerShortcut("tools:splitway", tr("Tool: {0}", tr("Split Way")), KeyEvent.VK_P, Shortcut.GROUP_EDIT), true); 55 55 DataSet.selListeners.add(this); 56 56 } -
trunk/src/org/openstreetmap/josm/actions/ToggleGPXLinesAction.java
r1054 r1084 8 8 9 9 import org.openstreetmap.josm.Main; 10 import org.openstreetmap.josm.tools.Short Cut;10 import org.openstreetmap.josm.tools.Shortcut; 11 11 12 12 public class ToggleGPXLinesAction extends JosmAction { … … 14 14 public ToggleGPXLinesAction() { 15 15 super(tr("Toggle GPX Lines"), "gps-lines", tr("Toggles the global setting ''{0}''.", tr("Draw lines between raw gps points.")), 16 Short Cut.registerShortCut("view:gpxlines", tr("View: {0}", tr("Toggle GPX Lines")), KeyEvent.VK_X, ShortCut.GROUP_MENU), true);16 Shortcut.registerShortcut("view:gpxlines", tr("View: {0}", tr("Toggle GPX Lines")), KeyEvent.VK_X, Shortcut.GROUP_MENU), true); 17 17 } 18 18 -
trunk/src/org/openstreetmap/josm/actions/UnGlueAction.java
r1054 r1084 24 24 import org.openstreetmap.josm.data.osm.RelationMember; 25 25 import org.openstreetmap.josm.data.osm.Way; 26 import org.openstreetmap.josm.tools.Short Cut;26 import org.openstreetmap.josm.tools.Shortcut; 27 27 28 28 /** … … 45 45 public UnGlueAction() { 46 46 super(tr("UnGlue Ways"), "unglueways", tr("Duplicate nodes that are used by multiple ways."), 47 Short Cut.registerShortCut("tools:unglue", tr("Tool: {0}", tr("UnGlue Ways")), KeyEvent.VK_G, ShortCut.GROUP_EDIT), true);47 Shortcut.registerShortcut("tools:unglue", tr("Tool: {0}", tr("UnGlue Ways")), KeyEvent.VK_G, Shortcut.GROUP_EDIT), true); 48 48 //DataSet.selListeners.add(this); 49 49 } -
trunk/src/org/openstreetmap/josm/actions/UndoAction.java
r1054 r1084 8 8 9 9 import org.openstreetmap.josm.Main; 10 import org.openstreetmap.josm.tools.Short Cut;10 import org.openstreetmap.josm.tools.Shortcut; 11 11 12 12 /** … … 22 22 public UndoAction() { 23 23 super(tr("Undo"), "undo", tr("Undo the last action."), 24 Short Cut.registerShortCut("system:undo", tr("Edit: {0}", tr("Undo")), KeyEvent.VK_Z, ShortCut.GROUP_MENU), true);24 Shortcut.registerShortcut("system:undo", tr("Edit: {0}", tr("Undo")), KeyEvent.VK_Z, Shortcut.GROUP_MENU), true); 25 25 setEnabled(false); 26 26 } -
trunk/src/org/openstreetmap/josm/actions/UnselectAllAction.java
r1054 r1084 9 9 10 10 import org.openstreetmap.josm.Main; 11 import org.openstreetmap.josm.tools.Short Cut;11 import org.openstreetmap.josm.tools.Shortcut; 12 12 13 13 public class UnselectAllAction extends JosmAction { … … 15 15 public UnselectAllAction() { 16 16 super(tr("Unselect All"), "unselectall", tr("Unselect all objects."), 17 Short Cut.registerShortCut("edit:unselectall", tr("Edit: {0}", tr("Unselect All")), KeyEvent.VK_U, ShortCut.GROUP_EDIT), true);17 Shortcut.registerShortcut("edit:unselectall", tr("Edit: {0}", tr("Unselect All")), KeyEvent.VK_U, Shortcut.GROUP_EDIT), true); 18 18 // this is not really GROUP_EDIT, but users really would complain if the yhad to reconfigure because we put 19 19 // the correct group in … … 21 21 // Add extra shortcut C-S-a 22 22 Main.contentPane.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put( 23 Short Cut.registerShortCut("edit:unselectallfocus", tr("Edit: {0}", tr("Unselect All (Focus)")),24 KeyEvent.VK_A, Short Cut.GROUP_MENU, ShortCut.SHIFT_DEFAULT).getKeyStroke(),23 Shortcut.registerShortcut("edit:unselectallfocus", tr("Edit: {0}", tr("Unselect All (Focus)")), 24 KeyEvent.VK_A, Shortcut.GROUP_MENU, Shortcut.SHIFT_DEFAULT).getKeyStroke(), 25 25 tr("Unselect All")); 26 26 … … 32 32 */ 33 33 Main.contentPane.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put( 34 Short Cut.registerShortCut("edit:unselectallescape", tr("Edit: {0}", tr("Unselect All (Escape)")),35 KeyEvent.VK_ESCAPE, Short Cut.GROUP_DIRECT).getKeyStroke(),34 Shortcut.registerShortcut("edit:unselectallescape", tr("Edit: {0}", tr("Unselect All (Escape)")), 35 KeyEvent.VK_ESCAPE, Shortcut.GROUP_DIRECT).getKeyStroke(), 36 36 tr("Unselect All")); 37 37 } -
trunk/src/org/openstreetmap/josm/actions/UploadAction.java
r1054 r1084 23 23 import org.openstreetmap.josm.tools.GBC; 24 24 import org.xml.sax.SAXException; 25 import org.openstreetmap.josm.tools.Short Cut;25 import org.openstreetmap.josm.tools.Shortcut; 26 26 27 27 /** … … 61 61 public UploadAction() { 62 62 super(tr("Upload to OSM ..."), "upload", tr("Upload all changes to the OSM server."), 63 Short Cut.registerShortCut("file:upload", tr("File: {0}", tr("Upload to OSM ...")), KeyEvent.VK_U, ShortCut.GROUPS_ALT1+ShortCut.GROUP_HOTKEY), true);63 Shortcut.registerShortcut("file:upload", tr("File: {0}", tr("Upload to OSM ...")), KeyEvent.VK_U, Shortcut.GROUPS_ALT1+Shortcut.GROUP_HOTKEY), true); 64 64 65 65 /** -
trunk/src/org/openstreetmap/josm/actions/ZoomInAction.java
r1054 r1084 8 8 9 9 import org.openstreetmap.josm.Main; 10 import org.openstreetmap.josm.tools.Short Cut;10 import org.openstreetmap.josm.tools.Shortcut; 11 11 12 12 public final class ZoomInAction extends JosmAction { … … 14 14 public ZoomInAction() { 15 15 super(tr("Zoom in"), "dialogs/zoomin", tr("Zoom in"), 16 Short Cut.registerShortCut("view:zoomin", tr("View: {0}", tr("Zoom in")), KeyEvent.VK_PLUS, ShortCut.GROUP_DIRECT), true);16 Shortcut.registerShortcut("view:zoomin", tr("View: {0}", tr("Zoom in")), KeyEvent.VK_PLUS, Shortcut.GROUP_DIRECT), true); 17 17 setEnabled(true); 18 18 } -
trunk/src/org/openstreetmap/josm/actions/ZoomOutAction.java
r1054 r1084 8 8 9 9 import org.openstreetmap.josm.Main; 10 import org.openstreetmap.josm.tools.Short Cut;10 import org.openstreetmap.josm.tools.Shortcut; 11 11 12 12 public final class ZoomOutAction extends JosmAction { … … 14 14 public ZoomOutAction() { 15 15 super(tr("Zoom out"), "dialogs/zoomout", tr("Zoom out"), 16 Short Cut.registerShortCut("view:zoomout", tr("View: {0}", tr("Zoom out")), KeyEvent.VK_MINUS, ShortCut.GROUP_DIRECT), true);16 Shortcut.registerShortcut("view:zoomout", tr("View: {0}", tr("Zoom out")), KeyEvent.VK_MINUS, Shortcut.GROUP_DIRECT), true); 17 17 setEnabled(true); 18 18 } -
trunk/src/org/openstreetmap/josm/actions/audio/AudioBackAction.java
r1054 r1084 11 11 import org.openstreetmap.josm.gui.layer.markerlayer.MarkerLayer; 12 12 import org.openstreetmap.josm.tools.AudioPlayer; 13 import org.openstreetmap.josm.tools.Short Cut;13 import org.openstreetmap.josm.tools.Shortcut; 14 14 15 15 public class AudioBackAction extends JosmAction { … … 19 19 public AudioBackAction() { 20 20 super(tr("Back"), "audio-back", tr("Jump back."), 21 Short Cut.registerShortCut("audio:back", tr("Audio: {0}", tr("Back")), KeyEvent.VK_F6, ShortCut.GROUP_DIRECT), true);21 Shortcut.registerShortcut("audio:back", tr("Audio: {0}", tr("Back")), KeyEvent.VK_F6, Shortcut.GROUP_DIRECT), true); 22 22 try { 23 23 amount = - Double.parseDouble(Main.pref.get("audio.forwardbackamount","10.0")); -
trunk/src/org/openstreetmap/josm/actions/audio/AudioFastSlowAction.java
r1023 r1084 7 7 import org.openstreetmap.josm.actions.JosmAction; 8 8 import org.openstreetmap.josm.tools.AudioPlayer; 9 import org.openstreetmap.josm.tools.Short Cut;9 import org.openstreetmap.josm.tools.Shortcut; 10 10 11 11 abstract public class AudioFastSlowAction extends JosmAction { … … 13 13 private double multiplier; 14 14 15 public AudioFastSlowAction(String name, String iconName, String tooltip, Short Cut shortcut, boolean fast) {15 public AudioFastSlowAction(String name, String iconName, String tooltip, Shortcut shortcut, boolean fast) { 16 16 super(name, iconName, tooltip, shortcut, true); 17 17 try { -
trunk/src/org/openstreetmap/josm/actions/audio/AudioFasterAction.java
r1054 r1084 3 3 4 4 import static org.openstreetmap.josm.tools.I18n.tr; 5 import org.openstreetmap.josm.tools.Short Cut;5 import org.openstreetmap.josm.tools.Shortcut; 6 6 7 7 import java.awt.event.KeyEvent; … … 11 11 public AudioFasterAction() { 12 12 super(tr("Faster"), "audio-faster", tr("Faster Forward"), 13 Short Cut.registerShortCut("audio:faster", tr("Audio: {0}", tr("Faster")), KeyEvent.VK_F9, ShortCut.GROUP_DIRECT), true);13 Shortcut.registerShortcut("audio:faster", tr("Audio: {0}", tr("Faster")), KeyEvent.VK_F9, Shortcut.GROUP_DIRECT), true); 14 14 } 15 15 } -
trunk/src/org/openstreetmap/josm/actions/audio/AudioFwdAction.java
r1054 r1084 11 11 import org.openstreetmap.josm.gui.layer.markerlayer.MarkerLayer; 12 12 import org.openstreetmap.josm.tools.AudioPlayer; 13 import org.openstreetmap.josm.tools.Short Cut;13 import org.openstreetmap.josm.tools.Shortcut; 14 14 15 15 public class AudioFwdAction extends JosmAction { … … 19 19 public AudioFwdAction() { 20 20 super(tr("Forward"), "audio-fwd", tr("Jump forward"), 21 Short Cut.registerShortCut("audio:forward", tr("Audio: {0}", tr("Forward")), KeyEvent.VK_F7, ShortCut.GROUP_DIRECT), true);21 Shortcut.registerShortcut("audio:forward", tr("Audio: {0}", tr("Forward")), KeyEvent.VK_F7, Shortcut.GROUP_DIRECT), true); 22 22 try { 23 23 amount = Double.parseDouble(Main.pref.get("audio.forwardbackamount","10.0")); -
trunk/src/org/openstreetmap/josm/actions/audio/AudioNextAction.java
r1054 r1084 9 9 import org.openstreetmap.josm.actions.JosmAction; 10 10 import org.openstreetmap.josm.gui.layer.markerlayer.MarkerLayer; 11 import org.openstreetmap.josm.tools.Short Cut;11 import org.openstreetmap.josm.tools.Shortcut; 12 12 13 13 public class AudioNextAction extends JosmAction { … … 15 15 public AudioNextAction() { 16 16 super(tr("Next Marker"), "audio-next", tr("Play next marker."), 17 Short Cut.registerShortCut("audio:next", tr("Audio: {0}", tr("Next Marker")), KeyEvent.VK_F8, ShortCut.GROUP_DIRECT), true);17 Shortcut.registerShortcut("audio:next", tr("Audio: {0}", tr("Next Marker")), KeyEvent.VK_F8, Shortcut.GROUP_DIRECT), true); 18 18 } 19 19 -
trunk/src/org/openstreetmap/josm/actions/audio/AudioPlayPauseAction.java
r1054 r1084 11 11 import org.openstreetmap.josm.gui.layer.markerlayer.MarkerLayer; 12 12 import org.openstreetmap.josm.tools.AudioPlayer; 13 import org.openstreetmap.josm.tools.Short Cut;13 import org.openstreetmap.josm.tools.Shortcut; 14 14 15 15 public class AudioPlayPauseAction extends JosmAction { … … 17 17 public AudioPlayPauseAction() { 18 18 super(tr("Play/pause"), "audio-playpause", tr("Play/pause audio."), 19 Short Cut.registerShortCut("audio:pause", tr("Audio: {0}", tr("Play/pause")), KeyEvent.VK_PERIOD, ShortCut.GROUP_DIRECT), true);19 Shortcut.registerShortcut("audio:pause", tr("Audio: {0}", tr("Play/pause")), KeyEvent.VK_PERIOD, Shortcut.GROUP_DIRECT), true); 20 20 } 21 21 -
trunk/src/org/openstreetmap/josm/actions/audio/AudioPrevAction.java
r1054 r1084 9 9 import org.openstreetmap.josm.actions.JosmAction; 10 10 import org.openstreetmap.josm.gui.layer.markerlayer.MarkerLayer; 11 import org.openstreetmap.josm.tools.Short Cut;11 import org.openstreetmap.josm.tools.Shortcut; 12 12 13 13 public class AudioPrevAction extends JosmAction { … … 15 15 public AudioPrevAction() { 16 16 super(tr("Previous Marker"), "audio-prev", tr("Play previous marker."), 17 Short Cut.registerShortCut("audio:prev", tr("Audio: {0}", tr("Previous Marker")), KeyEvent.VK_F5, ShortCut.GROUP_DIRECT), true);17 Shortcut.registerShortcut("audio:prev", tr("Audio: {0}", tr("Previous Marker")), KeyEvent.VK_F5, Shortcut.GROUP_DIRECT), true); 18 18 } 19 19 -
trunk/src/org/openstreetmap/josm/actions/audio/AudioSlowerAction.java
r1054 r1084 5 5 6 6 import java.awt.event.KeyEvent; 7 import org.openstreetmap.josm.tools.Short Cut;7 import org.openstreetmap.josm.tools.Shortcut; 8 8 9 9 public class AudioSlowerAction extends AudioFastSlowAction { … … 11 11 public AudioSlowerAction() { 12 12 super(tr("Slower"), "audio-slower", tr("Slower Forward"), 13 Short Cut.registerShortCut("audio:slower", tr("Audio: {0}", tr("Slower")), KeyEvent.VK_F4, ShortCut.GROUP_DIRECT), true);13 Shortcut.registerShortcut("audio:slower", tr("Audio: {0}", tr("Slower")), KeyEvent.VK_F4, Shortcut.GROUP_DIRECT), true); 14 14 } 15 15 } -
trunk/src/org/openstreetmap/josm/actions/mapmode/DeleteAction.java
r1066 r1084 16 16 import org.openstreetmap.josm.gui.MapFrame; 17 17 import org.openstreetmap.josm.tools.ImageProvider; 18 import org.openstreetmap.josm.tools.Short Cut;18 import org.openstreetmap.josm.tools.Shortcut; 19 19 20 20 /** … … 44 44 "delete", 45 45 tr("Delete nodes or ways."), 46 Short Cut.registerShortCut("mapmode:delete", tr("Mode: {0}",tr("Delete")), KeyEvent.VK_D, ShortCut.GROUP_EDIT),46 Shortcut.registerShortcut("mapmode:delete", tr("Mode: {0}",tr("Delete")), KeyEvent.VK_D, Shortcut.GROUP_EDIT), 47 47 mapFrame, 48 48 ImageProvider.getCursor("normal", "delete")); -
trunk/src/org/openstreetmap/josm/actions/mapmode/DrawAction.java
r1054 r1084 51 51 import org.openstreetmap.josm.tools.ImageProvider; 52 52 import org.openstreetmap.josm.tools.Pair; 53 import org.openstreetmap.josm.tools.Short Cut;53 import org.openstreetmap.josm.tools.Shortcut; 54 54 55 55 /** … … 74 74 public DrawAction(MapFrame mapFrame) { 75 75 super(tr("Draw"), "node/autonode", tr("Draw nodes"), 76 Short Cut.registerShortCut("mapmode:draw", tr("Mode: {0}", tr("Draw")), KeyEvent.VK_A, ShortCut.GROUP_EDIT),76 Shortcut.registerShortcut("mapmode:draw", tr("Mode: {0}", tr("Draw")), KeyEvent.VK_A, Shortcut.GROUP_EDIT), 77 77 mapFrame, getCursor()); 78 78 79 79 // Add extra shortcut N 80 80 Main.contentPane.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put( 81 Short Cut.registerShortCut("mapmode:drawfocus", tr("Mode: Draw Focus"), KeyEvent.VK_N, ShortCut.GROUP_EDIT).getKeyStroke(), tr("Draw"));81 Shortcut.registerShortcut("mapmode:drawfocus", tr("Mode: Draw Focus"), KeyEvent.VK_N, Shortcut.GROUP_EDIT).getKeyStroke(), tr("Draw")); 82 82 83 83 //putValue("help", "Action/AddNode/Autnode"); -
trunk/src/org/openstreetmap/josm/actions/mapmode/ExtrudeAction.java
r1054 r1084 30 30 import org.openstreetmap.josm.gui.layer.MapViewPaintable; 31 31 import org.openstreetmap.josm.tools.ImageProvider; 32 import org.openstreetmap.josm.tools.Short Cut;32 import org.openstreetmap.josm.tools.Shortcut; 33 33 34 34 /** … … 74 74 public ExtrudeAction(MapFrame mapFrame) { 75 75 super(tr("Extrude"), "extrude/extrude", tr("Create areas"), 76 Short Cut.registerShortCut("mapmode:extrude", tr("Mode: {0}", tr("Extrude")), KeyEvent.VK_X, ShortCut.GROUP_EDIT),76 Shortcut.registerShortcut("mapmode:extrude", tr("Mode: {0}", tr("Extrude")), KeyEvent.VK_X, Shortcut.GROUP_EDIT), 77 77 mapFrame, 78 78 getCursor("normal", "selection", Cursor.DEFAULT_CURSOR)); -
trunk/src/org/openstreetmap/josm/actions/mapmode/MapMode.java
r1023 r1084 12 12 import org.openstreetmap.josm.gui.MapFrame; 13 13 import org.openstreetmap.josm.tools.ImageProvider; 14 import org.openstreetmap.josm.tools.Short Cut;14 import org.openstreetmap.josm.tools.Shortcut; 15 15 16 16 /** … … 29 29 * Constructor for mapmodes without an menu 30 30 */ 31 public MapMode(String name, String iconName, String tooltip, Short Cut shortCut, MapFrame mapFrame, Cursor cursor) {32 super(name, "mapmode/"+iconName, tooltip, short Cut, false);31 public MapMode(String name, String iconName, String tooltip, Shortcut shortcut, MapFrame mapFrame, Cursor cursor) { 32 super(name, "mapmode/"+iconName, tooltip, shortcut, false); 33 33 this.cursor = cursor; 34 34 putValue("active", false); -
trunk/src/org/openstreetmap/josm/actions/mapmode/SelectAction.java
r1054 r1084 36 36 import org.openstreetmap.josm.gui.SelectionManager.SelectionEnded; 37 37 import org.openstreetmap.josm.tools.ImageProvider; 38 import org.openstreetmap.josm.tools.Short Cut;38 import org.openstreetmap.josm.tools.Shortcut; 39 39 40 40 /** … … 86 86 public SelectAction(MapFrame mapFrame) { 87 87 super(tr("Select"), "move/move", tr("Select, move and rotate objects"), 88 Short Cut.registerShortCut("mapmode:select", tr("Mode: {0}", tr("Select")), KeyEvent.VK_S, ShortCut.GROUP_EDIT),88 Shortcut.registerShortcut("mapmode:select", tr("Mode: {0}", tr("Select")), KeyEvent.VK_S, Shortcut.GROUP_EDIT), 89 89 mapFrame, 90 90 getCursor("normal", "selection", Cursor.DEFAULT_CURSOR)); -
trunk/src/org/openstreetmap/josm/actions/mapmode/ZoomAction.java
r1054 r1084 13 13 import org.openstreetmap.josm.gui.SelectionManager.SelectionEnded; 14 14 import org.openstreetmap.josm.tools.ImageProvider; 15 import org.openstreetmap.josm.tools.Short Cut;15 import org.openstreetmap.josm.tools.Shortcut; 16 16 17 17 /** … … 47 47 public ZoomAction(MapFrame mapFrame) { 48 48 super(tr("Zoom"), "zoom", tr("Zoom and move map"), 49 Short Cut.registerShortCut("mapmode:zoom", tr("Mode: {0}", tr("Zoom")), KeyEvent.VK_Z, ShortCut.GROUP_EDIT),49 Shortcut.registerShortcut("mapmode:zoom", tr("Mode: {0}", tr("Zoom")), KeyEvent.VK_Z, Shortcut.GROUP_EDIT), 50 50 mapFrame, ImageProvider.getCursor("normal", "zoom")); 51 51 mv = mapFrame.mapView; -
trunk/src/org/openstreetmap/josm/actions/search/SearchAction.java
r1063 r1084 22 22 import org.openstreetmap.josm.data.osm.OsmPrimitive; 23 23 import org.openstreetmap.josm.tools.GBC; 24 import org.openstreetmap.josm.tools.Short Cut;24 import org.openstreetmap.josm.tools.Shortcut; 25 25 26 26 public class SearchAction extends JosmAction { … … 38 38 public SearchAction() { 39 39 super(tr("Search ..."), "dialogs/search", tr("Search for objects."), 40 Short Cut.registerShortCut("system:find", tr("Search..."), KeyEvent.VK_F, ShortCut.GROUP_HOTKEY), true);40 Shortcut.registerShortcut("system:find", tr("Search..."), KeyEvent.VK_F, Shortcut.GROUP_HOTKEY), true); 41 41 } 42 42 -
trunk/src/org/openstreetmap/josm/gui/MainApplet.java
r1055 r1084 29 29 import org.openstreetmap.josm.data.ServerSidePreferences; 30 30 import org.openstreetmap.josm.tools.GBC; 31 import org.openstreetmap.josm.tools.Short Cut;31 import org.openstreetmap.josm.tools.Shortcut; 32 32 33 33 public class MainApplet extends JApplet { … … 36 36 public UploadPreferencesAction() { 37 37 super(tr("Upload Preferences"), "upload-preferences", tr("Upload the current preferences to the server"), 38 Short Cut.registerShortCut("applet:uploadprefs", tr("Upload Preferences"), KeyEvent.VK_U, ShortCut.GROUP_HOTKEY), true);38 Shortcut.registerShortcut("applet:uploadprefs", tr("Upload Preferences"), KeyEvent.VK_U, Shortcut.GROUP_HOTKEY), true); 39 39 } 40 40 public void actionPerformed(ActionEvent e) { -
trunk/src/org/openstreetmap/josm/gui/MainMenu.java
r1076 r1084 61 61 import org.openstreetmap.josm.actions.ToggleGPXLinesAction; 62 62 import org.openstreetmap.josm.data.DataSetChecker; 63 import org.openstreetmap.josm.tools.Short Cut;63 import org.openstreetmap.josm.tools.Shortcut; 64 64 65 65 /** … … 142 142 */ 143 143 public static void add(JMenu menu, JosmAction action) { 144 if (!action.getShort Cut().getAutomatic()) {144 if (!action.getShortcut().getAutomatic()) { 145 145 JMenuItem menuitem = menu.add(action); 146 KeyStroke ks = action.getShort Cut().getKeyStroke();146 KeyStroke ks = action.getShortcut().getKeyStroke(); 147 147 if (ks != null) { 148 148 menuitem.setAccelerator(ks); … … 157 157 */ 158 158 public void add(JMenu menu, int mnemonicKey, String shortName) { 159 Short Cut.registerShortCut("menu:"+shortName, tr("Menu: {0}", menu.getText()), mnemonicKey, ShortCut.GROUP_MNEMONIC).setMnemonic(menu);159 Shortcut.registerShortcut("menu:"+shortName, tr("Menu: {0}", menu.getText()), mnemonicKey, Shortcut.GROUP_MNEMONIC).setMnemonic(menu); 160 160 add(menu); 161 161 } … … 204 204 final JCheckBoxMenuItem wireframe = new JCheckBoxMenuItem(tr("Wireframe view")); 205 205 wireframe.setSelected(Main.pref.getBoolean("draw.wireframe", false)); 206 wireframe.setAccelerator(Short Cut.registerShortCut("menu:view:wireframe", "Toggle Wireframe view", KeyEvent.VK_W, ShortCut.GROUP_MENU).getKeyStroke());206 wireframe.setAccelerator(Shortcut.registerShortcut("menu:view:wireframe", "Toggle Wireframe view", KeyEvent.VK_W, Shortcut.GROUP_MENU).getKeyStroke()); 207 207 wireframe.addActionListener(new ActionListener() { 208 208 public void actionPerformed(ActionEvent ev) { … … 253 253 helpMenu.add(check); 254 254 current = helpMenu.add(help); // why is help not a JosmAction? 255 current.setAccelerator(Short Cut.registerShortCut("system:help", tr("Help"), KeyEvent.VK_F1, ShortCut.GROUP_DIRECT).getKeyStroke());255 current.setAccelerator(Shortcut.registerShortcut("system:help", tr("Help"), KeyEvent.VK_F1, Shortcut.GROUP_DIRECT).getKeyStroke()); 256 256 add(helpMenu, about); 257 257 add(helpMenu, historyinfo); -
trunk/src/org/openstreetmap/josm/gui/MapMover.java
r1054 r1084 15 15 import javax.swing.JComponent; 16 16 import javax.swing.JPanel; 17 import org.openstreetmap.josm.tools.Short Cut;17 import org.openstreetmap.josm.tools.Shortcut; 18 18 import static org.openstreetmap.josm.tools.I18n.tr; 19 19 … … 82 82 if (contentPane != null) { 83 83 contentPane.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put( 84 Short Cut.registerShortCut("system:movefocusright", tr("Map: {0}", tr("Move right")), KeyEvent.VK_RIGHT, ShortCut.GROUP_HOTKEY).getKeyStroke(),84 Shortcut.registerShortcut("system:movefocusright", tr("Map: {0}", tr("Move right")), KeyEvent.VK_RIGHT, Shortcut.GROUP_HOTKEY).getKeyStroke(), 85 85 "MapMover.Zoomer.right"); 86 86 contentPane.getActionMap().put("MapMover.Zoomer.right", new ZoomerAction("right")); 87 87 88 88 contentPane.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put( 89 Short Cut.registerShortCut("system:movefocusleft", tr("Map: {0}", tr("Move left")), KeyEvent.VK_LEFT, ShortCut.GROUP_HOTKEY).getKeyStroke(),89 Shortcut.registerShortcut("system:movefocusleft", tr("Map: {0}", tr("Move left")), KeyEvent.VK_LEFT, Shortcut.GROUP_HOTKEY).getKeyStroke(), 90 90 "MapMover.Zoomer.left"); 91 91 contentPane.getActionMap().put("MapMover.Zoomer.left", new ZoomerAction("left")); 92 92 93 93 contentPane.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put( 94 Short Cut.registerShortCut("system:movefocusup", tr("Map: {0}", tr("Move up")), KeyEvent.VK_UP, ShortCut.GROUP_HOTKEY).getKeyStroke(),94 Shortcut.registerShortcut("system:movefocusup", tr("Map: {0}", tr("Move up")), KeyEvent.VK_UP, Shortcut.GROUP_HOTKEY).getKeyStroke(), 95 95 "MapMover.Zoomer.up"); 96 96 contentPane.getActionMap().put("MapMover.Zoomer.up", new ZoomerAction("up")); 97 97 98 98 contentPane.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put( 99 Short Cut.registerShortCut("system:movefocusdown", tr("Map: {0}", tr("Move down")), KeyEvent.VK_DOWN, ShortCut.GROUP_HOTKEY).getKeyStroke(),99 Shortcut.registerShortcut("system:movefocusdown", tr("Map: {0}", tr("Move down")), KeyEvent.VK_DOWN, Shortcut.GROUP_HOTKEY).getKeyStroke(), 100 100 "MapMover.Zoomer.down"); 101 101 contentPane.getActionMap().put("MapMover.Zoomer.down", new ZoomerAction("down")); 102 102 103 103 contentPane.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put( 104 Short Cut.registerShortCut("view:zoominalternate", tr("Map: {0}", tr("Zoom in")), KeyEvent.VK_COMMA, ShortCut.GROUP_HOTKEY).getKeyStroke(),104 Shortcut.registerShortcut("view:zoominalternate", tr("Map: {0}", tr("Zoom in")), KeyEvent.VK_COMMA, Shortcut.GROUP_HOTKEY).getKeyStroke(), 105 105 "MapMover.Zoomer.in"); 106 106 contentPane.getActionMap().put("MapMover.Zoomer.in", new ZoomerAction(",")); 107 107 108 108 contentPane.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put( 109 Short Cut.registerShortCut("view:zoomoutalternate", tr("Map: {0}", tr("Zoom out")), KeyEvent.VK_PERIOD, ShortCut.GROUP_HOTKEY).getKeyStroke(),109 Shortcut.registerShortcut("view:zoomoutalternate", tr("Map: {0}", tr("Zoom out")), KeyEvent.VK_PERIOD, Shortcut.GROUP_HOTKEY).getKeyStroke(), 110 110 "MapMover.Zoomer.out"); 111 111 contentPane.getActionMap().put("MapMover.Zoomer.out", new ZoomerAction(".")); -
trunk/src/org/openstreetmap/josm/gui/MapView.java
r1047 r1084 110 110 JosmAction mv; 111 111 mv = new MoveAction(MoveAction.Direction.UP); 112 if (mv.getShort Cut() != null) {113 Main.contentPane.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(mv.getShort Cut().getKeyStroke(), "UP");112 if (mv.getShortcut() != null) { 113 Main.contentPane.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(mv.getShortcut().getKeyStroke(), "UP"); 114 114 Main.contentPane.getActionMap().put("UP", mv); 115 115 } 116 116 mv = new MoveAction(MoveAction.Direction.DOWN); 117 if (mv.getShort Cut() != null) {118 Main.contentPane.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(mv.getShort Cut().getKeyStroke(), "DOWN");117 if (mv.getShortcut() != null) { 118 Main.contentPane.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(mv.getShortcut().getKeyStroke(), "DOWN"); 119 119 Main.contentPane.getActionMap().put("DOWN", mv); 120 120 } 121 121 mv = new MoveAction(MoveAction.Direction.LEFT); 122 if (mv.getShort Cut() != null) {123 Main.contentPane.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(mv.getShort Cut().getKeyStroke(), "LEFT");122 if (mv.getShortcut() != null) { 123 Main.contentPane.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(mv.getShortcut().getKeyStroke(), "LEFT"); 124 124 Main.contentPane.getActionMap().put("LEFT", mv); 125 125 } 126 126 mv = new MoveAction(MoveAction.Direction.RIGHT); 127 if (mv.getShort Cut() != null) {128 Main.contentPane.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(mv.getShort Cut().getKeyStroke(), "RIGHT");127 if (mv.getShortcut() != null) { 128 Main.contentPane.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(mv.getShortcut().getKeyStroke(), "RIGHT"); 129 129 Main.contentPane.getActionMap().put("RIGHT", mv); 130 130 } -
trunk/src/org/openstreetmap/josm/gui/dialogs/CommandStackDialog.java
r1054 r1084 20 20 import org.openstreetmap.josm.gui.MapFrame; 21 21 import org.openstreetmap.josm.gui.layer.OsmDataLayer.CommandQueueListener; 22 import org.openstreetmap.josm.tools.Short Cut;22 import org.openstreetmap.josm.tools.Shortcut; 23 23 24 24 public class CommandStackDialog extends ToggleDialog implements CommandQueueListener { … … 29 29 public CommandStackDialog(final MapFrame mapFrame) { 30 30 super(tr("Command Stack"), "commandstack", tr("Open a list of all commands (undo buffer)."), 31 Short Cut.registerShortCut("subwindow:commandstack", tr("Toggle: {0}", tr("Command Stack")), KeyEvent.VK_O, ShortCut.GROUP_LAYER), 100);31 Shortcut.registerShortcut("subwindow:commandstack", tr("Toggle: {0}", tr("Command Stack")), KeyEvent.VK_O, Shortcut.GROUP_LAYER), 100); 32 32 Main.main.undoRedo.listenerCommands.add(this); 33 33 -
trunk/src/org/openstreetmap/josm/gui/dialogs/ConflictDialog.java
r1054 r1084 43 43 import org.openstreetmap.josm.gui.OsmPrimitivRenderer; 44 44 import org.openstreetmap.josm.gui.SideButton; 45 import org.openstreetmap.josm.tools.Short Cut;45 import org.openstreetmap.josm.tools.Shortcut; 46 46 47 47 public final class ConflictDialog extends ToggleDialog { … … 53 53 public ConflictDialog() { 54 54 super(tr("Conflict"), "conflict", tr("Merging conflicts."), 55 Short Cut.registerShortCut("subwindow:conflict", tr("Toggle: {0}", tr("Conflict")), KeyEvent.VK_C, ShortCut.GROUP_LAYER), 100);55 Shortcut.registerShortcut("subwindow:conflict", tr("Toggle: {0}", tr("Conflict")), KeyEvent.VK_C, Shortcut.GROUP_LAYER), 100); 56 56 displaylist.setCellRenderer(new OsmPrimitivRenderer()); 57 57 displaylist.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION); -
trunk/src/org/openstreetmap/josm/gui/dialogs/HistoryDialog.java
r1054 r1084 38 38 import org.openstreetmap.josm.tools.GBC; 39 39 import org.openstreetmap.josm.tools.ImageProvider; 40 import org.openstreetmap.josm.tools.Short Cut;40 import org.openstreetmap.josm.tools.Shortcut; 41 41 42 42 /** … … 89 89 public HistoryDialog() { 90 90 super(tr("History"), "history", tr("Display the history of all selected items."), 91 Short Cut.registerShortCut("subwindow:history", tr("Toggle: {0}", tr("History")), KeyEvent.VK_H,92 Short Cut.GROUP_LAYER, ShortCut.SHIFT_DEFAULT), 150);91 Shortcut.registerShortcut("subwindow:history", tr("Toggle: {0}", tr("History")), KeyEvent.VK_H, 92 Shortcut.GROUP_LAYER, Shortcut.SHIFT_DEFAULT), 150); 93 93 historyPane.setVisible(false); 94 94 notLoaded.setVisible(true); -
trunk/src/org/openstreetmap/josm/gui/dialogs/LayerListDialog.java
r1054 r1084 40 40 import org.openstreetmap.josm.tools.ImageProvider; 41 41 import org.openstreetmap.josm.tools.ImageProvider.OverlayPosition; 42 import org.openstreetmap.josm.tools.Short Cut;42 import org.openstreetmap.josm.tools.Shortcut; 43 43 44 44 /** … … 160 160 public LayerListDialog(MapFrame mapFrame) { 161 161 super(tr("Layers"), "layerlist", tr("Open a list of all loaded layers."), 162 Short Cut.registerShortCut("subwindow:layers", tr("Toggle: {0}", tr("Layers")), KeyEvent.VK_L, ShortCut.GROUP_LAYER), 100);162 Shortcut.registerShortcut("subwindow:layers", tr("Toggle: {0}", tr("Layers")), KeyEvent.VK_L, Shortcut.GROUP_LAYER), 100); 163 163 instance = new JList(model); 164 164 listScrollPane = new JScrollPane(instance); -
trunk/src/org/openstreetmap/josm/gui/dialogs/PropertiesDialog.java
r1075 r1084 64 64 import org.openstreetmap.josm.tools.AutoCompleteComboBox; 65 65 import org.openstreetmap.josm.tools.GBC; 66 import org.openstreetmap.josm.tools.Short Cut;66 import org.openstreetmap.josm.tools.Shortcut; 67 67 68 68 /** … … 429 429 public PropertiesDialog(MapFrame mapFrame) { 430 430 super(tr("Properties/Memberships"), "propertiesdialog", tr("Properties for selected objects."), 431 Short Cut.registerShortCut("subwindow:properies", tr("Toggle: {0}", tr("Properties/Memberships")), KeyEvent.VK_P,432 Short Cut.GROUP_LAYER, ShortCut.SHIFT_DEFAULT), 150);431 Shortcut.registerShortcut("subwindow:properies", tr("Toggle: {0}", tr("Properties/Memberships")), KeyEvent.VK_P, 432 Shortcut.GROUP_LAYER, Shortcut.SHIFT_DEFAULT), 150); 433 433 434 434 // --------------------------------------- -
trunk/src/org/openstreetmap/josm/gui/dialogs/RelationListDialog.java
r1054 r1084 32 32 import org.openstreetmap.josm.gui.layer.Layer.LayerChangeListener; 33 33 import org.openstreetmap.josm.tools.GBC; 34 import org.openstreetmap.josm.tools.Short Cut;34 import org.openstreetmap.josm.tools.Shortcut; 35 35 36 36 /** … … 57 57 public RelationListDialog() { 58 58 super(tr("Relations"), "relationlist", tr("Open a list of all relations."), 59 Short Cut.registerShortCut("subwindow:relations", tr("Toggle: {0}", tr("Relations")), KeyEvent.VK_R, ShortCut.GROUP_LAYER), 150);59 Shortcut.registerShortcut("subwindow:relations", tr("Toggle: {0}", tr("Relations")), KeyEvent.VK_R, Shortcut.GROUP_LAYER), 150); 60 60 displaylist.setCellRenderer(new OsmPrimitivRenderer()); 61 61 displaylist.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); -
trunk/src/org/openstreetmap/josm/gui/dialogs/SelectionListDialog.java
r1054 r1084 41 41 import org.openstreetmap.josm.gui.OsmPrimitivRenderer; 42 42 import org.openstreetmap.josm.gui.SideButton; 43 import org.openstreetmap.josm.tools.Short Cut;43 import org.openstreetmap.josm.tools.Shortcut; 44 44 45 45 /** … … 78 78 public SelectionListDialog() { 79 79 super(tr("Current Selection"), "selectionlist", tr("Open a selection list window."), 80 Short Cut.registerShortCut("subwindow:selection", tr("Toggle: {0}", tr("Current Selection")), KeyEvent.VK_T, ShortCut.GROUP_LAYER, ShortCut.SHIFT_DEFAULT), 150);80 Shortcut.registerShortcut("subwindow:selection", tr("Toggle: {0}", tr("Current Selection")), KeyEvent.VK_T, Shortcut.GROUP_LAYER, Shortcut.SHIFT_DEFAULT), 150); 81 81 82 82 selectionHistory = new LinkedList<Collection<? extends OsmPrimitive>>(); -
trunk/src/org/openstreetmap/josm/gui/dialogs/ToggleDialog.java
r1047 r1084 26 26 import org.openstreetmap.josm.tools.GBC; 27 27 import org.openstreetmap.josm.tools.ImageProvider; 28 import org.openstreetmap.josm.tools.Short Cut;28 import org.openstreetmap.josm.tools.Shortcut; 29 29 30 30 /** … … 40 40 public AbstractButton button; 41 41 42 private ToggleDialogAction(String name, String iconName, String tooltip, Short Cut shortCut, String prefname) {43 super(name, iconName, tooltip, short Cut, false);42 private ToggleDialogAction(String name, String iconName, String tooltip, Shortcut shortcut, String prefname) { 43 super(name, iconName, tooltip, shortcut, false); 44 44 this.prefname = prefname; 45 45 } … … 63 63 64 64 @Deprecated 65 public ToggleDialog(final String name, String iconName, String tooltip, int short Cut, int preferredHeight) {65 public ToggleDialog(final String name, String iconName, String tooltip, int shortcut, int preferredHeight) { 66 66 super(new BorderLayout()); 67 67 this.prefName = iconName; 68 ToggleDialogInit(name, iconName, tooltip, Short Cut.registerShortCut("auto:"+name, tooltip, shortCut, ShortCut.GROUP_LAYER), preferredHeight);68 ToggleDialogInit(name, iconName, tooltip, Shortcut.registerShortcut("auto:"+name, tooltip, shortcut, Shortcut.GROUP_LAYER), preferredHeight); 69 69 } 70 70 71 public ToggleDialog(final String name, String iconName, String tooltip, Short Cut shortCut, int preferredHeight) {71 public ToggleDialog(final String name, String iconName, String tooltip, Shortcut shortcut, int preferredHeight) { 72 72 super(new BorderLayout()); 73 73 this.prefName = iconName; 74 ToggleDialogInit(name, iconName, tooltip, short Cut, preferredHeight);74 ToggleDialogInit(name, iconName, tooltip, shortcut, preferredHeight); 75 75 } 76 76 77 private void ToggleDialogInit(final String name, String iconName, String tooltip, Short Cut shortCut, int preferredHeight) {77 private void ToggleDialogInit(final String name, String iconName, String tooltip, Shortcut shortcut, int preferredHeight) { 78 78 setPreferredSize(new Dimension(330,preferredHeight)); 79 action = new ToggleDialogAction(name, "dialogs/"+iconName, tooltip, short Cut, iconName);79 action = new ToggleDialogAction(name, "dialogs/"+iconName, tooltip, shortcut, iconName); 80 80 String helpId = "Dialog/"+getClass().getName().substring(getClass().getName().lastIndexOf('.')+1); 81 81 action.putValue("help", helpId.substring(0, helpId.length()-6)); -
trunk/src/org/openstreetmap/josm/gui/dialogs/UserListDialog.java
r1054 r1084 24 24 import org.openstreetmap.josm.data.osm.OsmPrimitive; 25 25 import org.openstreetmap.josm.data.osm.User; 26 import org.openstreetmap.josm.tools.Short Cut;26 import org.openstreetmap.josm.tools.Shortcut; 27 27 28 28 /** … … 52 52 public UserListDialog() { 53 53 super(tr("Authors"), "userlist", tr("Open a list of people working on the selected objects."), 54 Short Cut.registerShortCut("subwindow:authors", tr("Toggle: {0}", tr("Authors")), KeyEvent.VK_A, ShortCut.GROUP_LAYER, ShortCut.SHIFT_DEFAULT), 150);54 Shortcut.registerShortcut("subwindow:authors", tr("Toggle: {0}", tr("Authors")), KeyEvent.VK_A, Shortcut.GROUP_LAYER, Shortcut.SHIFT_DEFAULT), 150); 55 55 56 56 data.setColumnIdentifiers(new String[]{tr("Author"),tr("# Objects"),"%"}); -
trunk/src/org/openstreetmap/josm/gui/preferences/ShortcutPreference.java
r1054 r1084 10 10 11 11 import org.openstreetmap.josm.tools.GBC; 12 import org.openstreetmap.josm.tools.Short Cut;12 import org.openstreetmap.josm.tools.Shortcut; 13 13 import org.openstreetmap.josm.gui.preferences.prefJPanel; 14 14 … … 37 37 // private String[] columnNames = new String[]{tr("Action"), tr("Shortcut"), tr("Group"), tr("ID")}; 38 38 private String[] columnNames = new String[]{tr("Action"), tr("Shortcut")}; 39 private Collection<Short Cut> data;39 private Collection<Shortcut> data; 40 40 public scListModel() { 41 data = Short Cut.listAll();41 data = Shortcut.listAll(); 42 42 } 43 43 public int getColumnCount() { … … 51 51 } 52 52 public Object getValueAt(int row, int col) { 53 Short Cut sc = (ShortCut)data.toArray()[row];53 Shortcut sc = (Shortcut)data.toArray()[row]; 54 54 if (col == 0) { 55 55 return sc.getLongText(); … … 57 57 return sc.getKeyText(); 58 58 } /*else if (col == 2) { 59 if (sc.getRequestedGroup() == Short Cut.GROUP_NONE) {59 if (sc.getRequestedGroup() == Shortcut.GROUP_NONE) { 60 60 return tr("None"); 61 } else if (sc.getRequestedGroup() == Short Cut.GROUP_HOTKEY) {61 } else if (sc.getRequestedGroup() == Shortcut.GROUP_HOTKEY) { 62 62 return tr("Hotkey"); 63 } else if (sc.getRequestedGroup() == Short Cut.GROUP_MENU) {63 } else if (sc.getRequestedGroup() == Shortcut.GROUP_MENU) { 64 64 return tr("Menu"); 65 } else if (sc.getRequestedGroup() == Short Cut.GROUP_EDIT) {65 } else if (sc.getRequestedGroup() == Shortcut.GROUP_EDIT) { 66 66 return tr("Edit"); 67 } else if (sc.getRequestedGroup() == Short Cut.GROUP_LAYER) {67 } else if (sc.getRequestedGroup() == Shortcut.GROUP_LAYER) { 68 68 return tr("Subwindow"); 69 } else if (sc.getRequestedGroup() == Short Cut.GROUP_DIRECT) {69 } else if (sc.getRequestedGroup() == Shortcut.GROUP_DIRECT) { 70 70 return tr("Direct"); 71 } else if (sc.getRequestedGroup() == Short Cut.GROUP_MNEMONIC) {71 } else if (sc.getRequestedGroup() == Shortcut.GROUP_MNEMONIC) { 72 72 return tr("Mnemonic"); 73 } else if (sc.getRequestedGroup() == Short Cut.GROUP_RESERVED) {73 } else if (sc.getRequestedGroup() == Shortcut.GROUP_RESERVED) { 74 74 return tr("System"); 75 75 } else { -
trunk/src/org/openstreetmap/josm/gui/preferences/prefJPanel.java
r1053 r1084 21 21 22 22 import org.openstreetmap.josm.Main; 23 import org.openstreetmap.josm.tools.Short Cut;23 import org.openstreetmap.josm.tools.Shortcut; 24 24 25 25 /** … … 380 380 if (!lsm.isSelectionEmpty()) { 381 381 int row = lsm.getMinSelectionIndex(); 382 Short Cut sc = (ShortCut)panel.model.getValueAt(row, -1);382 Shortcut sc = (Shortcut)panel.model.getValueAt(row, -1); 383 383 panel.cbDefault.setSelected(!sc.getAssignedUser()); 384 384 panel.cbDisable.setSelected(sc.getKeyStroke() == null); … … 419 419 if (e != null) { // only if we've been called by a user action 420 420 int row = lsm.getMinSelectionIndex(); 421 Short Cut sc = (ShortCut)panel.model.getValueAt(row, -1);421 Shortcut sc = (Shortcut)panel.model.getValueAt(row, -1); 422 422 sc.setAssignedUser(!panel.cbDefault.isSelected()); 423 423 if (panel.cbDisable.isSelected()) { … … 463 463 private class bxAction extends javax.swing.AbstractAction { 464 464 public void actionPerformed(java.awt.event.ActionEvent e) { 465 Main.pref.put("shortcut.groups."+(Short Cut.GROUPS_DEFAULT+ShortCut.GROUP_EDIT), Integer.toString( modifInts[bxPrim1.getSelectedIndex()] ));466 Main.pref.put("shortcut.groups."+(Short Cut.GROUPS_ALT1 +ShortCut.GROUP_EDIT), Integer.toString( modifInts[ bxSec1.getSelectedIndex()] ));467 Main.pref.put("shortcut.groups."+(Short Cut.GROUPS_ALT2 +ShortCut.GROUP_EDIT), Integer.toString( modifInts[ bxTer1.getSelectedIndex()] ));468 469 Main.pref.put("shortcut.groups."+(Short Cut.GROUPS_DEFAULT+ShortCut.GROUP_MENU), Integer.toString( modifInts[bxPrim2.getSelectedIndex()] ));470 Main.pref.put("shortcut.groups."+(Short Cut.GROUPS_ALT1 +ShortCut.GROUP_MENU), Integer.toString( modifInts[ bxSec2.getSelectedIndex()] ));471 Main.pref.put("shortcut.groups."+(Short Cut.GROUPS_ALT2 +ShortCut.GROUP_MENU), Integer.toString( modifInts[ bxTer2.getSelectedIndex()] ));472 473 Main.pref.put("shortcut.groups."+(Short Cut.GROUPS_DEFAULT+ShortCut.GROUP_HOTKEY), Integer.toString( modifInts[bxPrim3.getSelectedIndex()] ));474 Main.pref.put("shortcut.groups."+(Short Cut.GROUPS_ALT1 +ShortCut.GROUP_HOTKEY), Integer.toString( modifInts[ bxSec3.getSelectedIndex()] ));475 Main.pref.put("shortcut.groups."+(Short Cut.GROUPS_ALT2 +ShortCut.GROUP_HOTKEY), Integer.toString( modifInts[ bxTer3.getSelectedIndex()] ));476 477 Main.pref.put("shortcut.groups."+(Short Cut.GROUPS_DEFAULT+ShortCut.GROUP_LAYER), Integer.toString( modifInts[bxPrim4.getSelectedIndex()] ));478 Main.pref.put("shortcut.groups."+(Short Cut.GROUPS_ALT1 +ShortCut.GROUP_LAYER), Integer.toString( modifInts[ bxSec4.getSelectedIndex()] ));479 Main.pref.put("shortcut.groups."+(Short Cut.GROUPS_ALT2 +ShortCut.GROUP_LAYER), Integer.toString( modifInts[ bxTer4.getSelectedIndex()] ));465 Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_DEFAULT+Shortcut.GROUP_EDIT), Integer.toString( modifInts[bxPrim1.getSelectedIndex()] )); 466 Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_ALT1 +Shortcut.GROUP_EDIT), Integer.toString( modifInts[ bxSec1.getSelectedIndex()] )); 467 Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_ALT2 +Shortcut.GROUP_EDIT), Integer.toString( modifInts[ bxTer1.getSelectedIndex()] )); 468 469 Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_DEFAULT+Shortcut.GROUP_MENU), Integer.toString( modifInts[bxPrim2.getSelectedIndex()] )); 470 Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_ALT1 +Shortcut.GROUP_MENU), Integer.toString( modifInts[ bxSec2.getSelectedIndex()] )); 471 Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_ALT2 +Shortcut.GROUP_MENU), Integer.toString( modifInts[ bxTer2.getSelectedIndex()] )); 472 473 Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_DEFAULT+Shortcut.GROUP_HOTKEY), Integer.toString( modifInts[bxPrim3.getSelectedIndex()] )); 474 Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_ALT1 +Shortcut.GROUP_HOTKEY), Integer.toString( modifInts[ bxSec3.getSelectedIndex()] )); 475 Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_ALT2 +Shortcut.GROUP_HOTKEY), Integer.toString( modifInts[ bxTer3.getSelectedIndex()] )); 476 477 Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_DEFAULT+Shortcut.GROUP_LAYER), Integer.toString( modifInts[bxPrim4.getSelectedIndex()] )); 478 Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_ALT1 +Shortcut.GROUP_LAYER), Integer.toString( modifInts[ bxSec4.getSelectedIndex()] )); 479 Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_ALT2 +Shortcut.GROUP_LAYER), Integer.toString( modifInts[ bxTer4.getSelectedIndex()] )); 480 480 } 481 481 } 482 482 483 483 private void initbx() { 484 setBx(bxPrim1, "shortcut.groups."+(Short Cut.GROUPS_DEFAULT+ShortCut.GROUP_EDIT));485 setBx(bxSec1, "shortcut.groups."+(Short Cut.GROUPS_ALT1 +ShortCut.GROUP_EDIT));486 setBx(bxTer1, "shortcut.groups."+(Short Cut.GROUPS_ALT2 +ShortCut.GROUP_EDIT));487 488 setBx(bxPrim2, "shortcut.groups."+(Short Cut.GROUPS_DEFAULT+ShortCut.GROUP_MENU));489 setBx(bxSec2, "shortcut.groups."+(Short Cut.GROUPS_ALT1 +ShortCut.GROUP_MENU));490 setBx(bxTer2, "shortcut.groups."+(Short Cut.GROUPS_ALT2 +ShortCut.GROUP_MENU));491 492 setBx(bxPrim3, "shortcut.groups."+(Short Cut.GROUPS_DEFAULT+ShortCut.GROUP_HOTKEY));493 setBx(bxSec3, "shortcut.groups."+(Short Cut.GROUPS_ALT1 +ShortCut.GROUP_HOTKEY));494 setBx(bxTer3, "shortcut.groups."+(Short Cut.GROUPS_ALT2 +ShortCut.GROUP_HOTKEY));495 496 setBx(bxPrim4, "shortcut.groups."+(Short Cut.GROUPS_DEFAULT+ShortCut.GROUP_LAYER));497 setBx(bxSec4, "shortcut.groups."+(Short Cut.GROUPS_ALT1 +ShortCut.GROUP_LAYER));498 setBx(bxTer4, "shortcut.groups."+(Short Cut.GROUPS_ALT2 +ShortCut.GROUP_LAYER));484 setBx(bxPrim1, "shortcut.groups."+(Shortcut.GROUPS_DEFAULT+Shortcut.GROUP_EDIT)); 485 setBx(bxSec1, "shortcut.groups."+(Shortcut.GROUPS_ALT1 +Shortcut.GROUP_EDIT)); 486 setBx(bxTer1, "shortcut.groups."+(Shortcut.GROUPS_ALT2 +Shortcut.GROUP_EDIT)); 487 488 setBx(bxPrim2, "shortcut.groups."+(Shortcut.GROUPS_DEFAULT+Shortcut.GROUP_MENU)); 489 setBx(bxSec2, "shortcut.groups."+(Shortcut.GROUPS_ALT1 +Shortcut.GROUP_MENU)); 490 setBx(bxTer2, "shortcut.groups."+(Shortcut.GROUPS_ALT2 +Shortcut.GROUP_MENU)); 491 492 setBx(bxPrim3, "shortcut.groups."+(Shortcut.GROUPS_DEFAULT+Shortcut.GROUP_HOTKEY)); 493 setBx(bxSec3, "shortcut.groups."+(Shortcut.GROUPS_ALT1 +Shortcut.GROUP_HOTKEY)); 494 setBx(bxTer3, "shortcut.groups."+(Shortcut.GROUPS_ALT2 +Shortcut.GROUP_HOTKEY)); 495 496 setBx(bxPrim4, "shortcut.groups."+(Shortcut.GROUPS_DEFAULT+Shortcut.GROUP_LAYER)); 497 setBx(bxSec4, "shortcut.groups."+(Shortcut.GROUPS_ALT1 +Shortcut.GROUP_LAYER)); 498 setBx(bxTer4, "shortcut.groups."+(Shortcut.GROUPS_ALT2 +Shortcut.GROUP_LAYER)); 499 499 } 500 500 private void setBx(javax.swing.JComboBox bx, String key) { -
trunk/src/org/openstreetmap/josm/tools/PlatformHook.java
r1047 r1084 3 3 4 4 import static org.openstreetmap.josm.tools.I18n.tr; 5 import org.openstreetmap.josm.tools.Short Cut;5 import org.openstreetmap.josm.tools.Shortcut; 6 6 7 7 import java.io.IOException; … … 55 55 56 56 /** 57 * The initShort CutGroups hook will be called by the58 * Short Cut class if it detects that there are no57 * The initShortcutGroups hook will be called by the 58 * Shortcut class if it detects that there are no 59 59 * groups in teh config file. So that will happen 60 60 * once on each JOSM installation only. … … 67 67 * to register any shortcuts from within. 68 68 */ 69 public void initShort CutGroups();69 public void initShortcutGroups(); 70 70 71 71 /** 72 * The initSystemShort Cuts hook will be called by the73 * Short Cut class after the modifier groups have been read72 * The initSystemShortcuts hook will be called by the 73 * Shortcut class after the modifier groups have been read 74 74 * from the config, but before any shortcuts are read from 75 75 * it or registered from within the application. … … 89 89 * user to change them. 90 90 */ 91 public void initSystemShort Cuts();91 public void initSystemShortcuts(); 92 92 93 93 /** … … 102 102 * LAFs. 103 103 */ 104 public String makeTooltip(String name, Short Cut sc);104 public String makeTooltip(String name, Shortcut sc); 105 105 } -
trunk/src/org/openstreetmap/josm/tools/PlatformHookOsx.java
r1047 r1084 3 3 4 4 import static org.openstreetmap.josm.tools.I18n.tr; 5 import org.openstreetmap.josm.tools.Short Cut;5 import org.openstreetmap.josm.tools.Shortcut; 6 6 import org.openstreetmap.josm.Main; 7 7 import org.openstreetmap.josm.tools.PlatformHookUnixoid; … … 67 67 Runtime.getRuntime().exec("open " + url); 68 68 } 69 public void initShort CutGroups() {70 // Everything but Short Cut.GROUPS_DEFAULT+ShortCut.GROUP_MENU is guesswork.71 Main.pref.put("shortcut.groups."+(Short Cut.GROUPS_DEFAULT+ShortCut.GROUP_NONE), Integer.toString(-1));72 Main.pref.put("shortcut.groups."+(Short Cut.GROUPS_DEFAULT+ShortCut.GROUP_HOTKEY), Integer.toString(KeyEvent.CTRL_DOWN_MASK));73 Main.pref.put("shortcut.groups."+(Short Cut.GROUPS_DEFAULT+ShortCut.GROUP_MENU), Integer.toString(KeyEvent.META_DOWN_MASK));74 Main.pref.put("shortcut.groups."+(Short Cut.GROUPS_DEFAULT+ShortCut.GROUP_EDIT), Integer.toString(0));75 Main.pref.put("shortcut.groups."+(Short Cut.GROUPS_DEFAULT+ShortCut.GROUP_LAYER), Integer.toString(KeyEvent.ALT_DOWN_MASK));76 Main.pref.put("shortcut.groups."+(Short Cut.GROUPS_DEFAULT+ShortCut.GROUP_DIRECT), Integer.toString(0));77 Main.pref.put("shortcut.groups."+(Short Cut.GROUPS_DEFAULT+ShortCut.GROUP_MNEMONIC),Integer.toString(KeyEvent.ALT_DOWN_MASK));78 79 Main.pref.put("shortcut.groups."+(Short Cut.GROUPS_ALT1+ShortCut.GROUP_NONE), Integer.toString(-1));80 Main.pref.put("shortcut.groups."+(Short Cut.GROUPS_ALT1+ShortCut.GROUP_HOTKEY), Integer.toString(KeyEvent.CTRL_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK));81 Main.pref.put("shortcut.groups."+(Short Cut.GROUPS_ALT1+ShortCut.GROUP_MENU), Integer.toString(KeyEvent.META_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK));82 Main.pref.put("shortcut.groups."+(Short Cut.GROUPS_ALT1+ShortCut.GROUP_EDIT), Integer.toString(KeyEvent.SHIFT_DOWN_MASK));83 Main.pref.put("shortcut.groups."+(Short Cut.GROUPS_ALT1+ShortCut.GROUP_LAYER), Integer.toString(KeyEvent.ALT_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK));84 Main.pref.put("shortcut.groups."+(Short Cut.GROUPS_ALT1+ShortCut.GROUP_DIRECT), Integer.toString(KeyEvent.SHIFT_DOWN_MASK));85 Main.pref.put("shortcut.groups."+(Short Cut.GROUPS_ALT1+ShortCut.GROUP_MNEMONIC), Integer.toString(KeyEvent.ALT_DOWN_MASK));86 87 Main.pref.put("shortcut.groups."+(Short Cut.GROUPS_ALT2+ShortCut.GROUP_NONE), Integer.toString(-1));88 Main.pref.put("shortcut.groups."+(Short Cut.GROUPS_ALT2+ShortCut.GROUP_HOTKEY), Integer.toString(KeyEvent.CTRL_DOWN_MASK | KeyEvent.ALT_DOWN_MASK));89 Main.pref.put("shortcut.groups."+(Short Cut.GROUPS_ALT2+ShortCut.GROUP_MENU), Integer.toString(KeyEvent.META_DOWN_MASK | KeyEvent.ALT_DOWN_MASK));90 Main.pref.put("shortcut.groups."+(Short Cut.GROUPS_ALT2+ShortCut.GROUP_EDIT), Integer.toString(KeyEvent.ALT_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK));91 Main.pref.put("shortcut.groups."+(Short Cut.GROUPS_ALT2+ShortCut.GROUP_LAYER), Integer.toString(KeyEvent.ALT_DOWN_MASK));92 Main.pref.put("shortcut.groups."+(Short Cut.GROUPS_ALT2+ShortCut.GROUP_DIRECT), Integer.toString(KeyEvent.SHIFT_DOWN_MASK | KeyEvent.ALT_DOWN_MASK));93 Main.pref.put("shortcut.groups."+(Short Cut.GROUPS_ALT2+ShortCut.GROUP_MNEMONIC), Integer.toString(KeyEvent.ALT_DOWN_MASK));94 } 95 public void initSystemShort Cuts() {69 public void initShortcutGroups() { 70 // Everything but Shortcut.GROUPS_DEFAULT+Shortcut.GROUP_MENU is guesswork. 71 Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_DEFAULT+Shortcut.GROUP_NONE), Integer.toString(-1)); 72 Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_DEFAULT+Shortcut.GROUP_HOTKEY), Integer.toString(KeyEvent.CTRL_DOWN_MASK)); 73 Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_DEFAULT+Shortcut.GROUP_MENU), Integer.toString(KeyEvent.META_DOWN_MASK)); 74 Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_DEFAULT+Shortcut.GROUP_EDIT), Integer.toString(0)); 75 Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_DEFAULT+Shortcut.GROUP_LAYER), Integer.toString(KeyEvent.ALT_DOWN_MASK)); 76 Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_DEFAULT+Shortcut.GROUP_DIRECT), Integer.toString(0)); 77 Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_DEFAULT+Shortcut.GROUP_MNEMONIC),Integer.toString(KeyEvent.ALT_DOWN_MASK)); 78 79 Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_ALT1+Shortcut.GROUP_NONE), Integer.toString(-1)); 80 Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_ALT1+Shortcut.GROUP_HOTKEY), Integer.toString(KeyEvent.CTRL_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK)); 81 Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_ALT1+Shortcut.GROUP_MENU), Integer.toString(KeyEvent.META_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK)); 82 Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_ALT1+Shortcut.GROUP_EDIT), Integer.toString(KeyEvent.SHIFT_DOWN_MASK)); 83 Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_ALT1+Shortcut.GROUP_LAYER), Integer.toString(KeyEvent.ALT_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK)); 84 Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_ALT1+Shortcut.GROUP_DIRECT), Integer.toString(KeyEvent.SHIFT_DOWN_MASK)); 85 Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_ALT1+Shortcut.GROUP_MNEMONIC), Integer.toString(KeyEvent.ALT_DOWN_MASK)); 86 87 Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_ALT2+Shortcut.GROUP_NONE), Integer.toString(-1)); 88 Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_ALT2+Shortcut.GROUP_HOTKEY), Integer.toString(KeyEvent.CTRL_DOWN_MASK | KeyEvent.ALT_DOWN_MASK)); 89 Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_ALT2+Shortcut.GROUP_MENU), Integer.toString(KeyEvent.META_DOWN_MASK | KeyEvent.ALT_DOWN_MASK)); 90 Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_ALT2+Shortcut.GROUP_EDIT), Integer.toString(KeyEvent.ALT_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK)); 91 Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_ALT2+Shortcut.GROUP_LAYER), Integer.toString(KeyEvent.ALT_DOWN_MASK)); 92 Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_ALT2+Shortcut.GROUP_DIRECT), Integer.toString(KeyEvent.SHIFT_DOWN_MASK | KeyEvent.ALT_DOWN_MASK)); 93 Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_ALT2+Shortcut.GROUP_MNEMONIC), Integer.toString(KeyEvent.ALT_DOWN_MASK)); 94 } 95 public void initSystemShortcuts() { 96 96 // Yeah, it's a long, long list. And people always complain that OSX has no shortcuts. 97 Short Cut.registerSystemCut("apple-reserved-01", "reserved", KeyEvent.VK_SPACE, KeyEvent.META_DOWN_MASK).setAutomatic(); // Show or hide the Spotlight search field (when multiple languages are installed, may rotate through enabled script systems).98 Short Cut.registerSystemCut("apple-reserved-02", "reserved", KeyEvent.VK_SPACE, KeyEvent.META_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK).setAutomatic(); // Apple reserved.99 Short Cut.registerSystemCut("apple-reserved-03", "reserved", KeyEvent.VK_SPACE, KeyEvent.META_DOWN_MASK | KeyEvent.ALT_DOWN_MASK).setAutomatic(); // Show the Spotlight search results window (when multiple languages are installed, may rotate through keyboard layouts and input methods within a script).100 Short Cut.registerSystemCut("apple-reserved-04", "reserved", KeyEvent.VK_SPACE, KeyEvent.META_DOWN_MASK | KeyEvent.CTRL_DOWN_MASK).setAutomatic(); // | Apple reserved.101 Short Cut.registerSystemCut("apple-reserved-05", "reserved", KeyEvent.VK_TAB, KeyEvent.SHIFT_DOWN_MASK).setAutomatic(); // Navigate through controls in a reverse direction. See "Keyboard Focus and Navigation."102 Short Cut.registerSystemCut("apple-reserved-06", "reserved", KeyEvent.VK_TAB, KeyEvent.META_DOWN_MASK).setAutomatic(); // Move forward to the next most recently used application in a list of open applications.103 Short Cut.registerSystemCut("apple-reserved-07", "reserved", KeyEvent.VK_TAB, KeyEvent.META_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK).setAutomatic(); // Move backward through a list of open applications (sorted by recent use).104 Short Cut.registerSystemCut("apple-reserved-08", "reserved", KeyEvent.VK_TAB, KeyEvent.CTRL_DOWN_MASK).setAutomatic(); // Move focus to the next grouping of controls in a dialog or the next table (when Tab moves to the next cell). See Accessibility Overview.105 Short Cut.registerSystemCut("apple-reserved-09", "reserved", KeyEvent.VK_TAB, KeyEvent.CTRL_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK).setAutomatic(); // Move focus to the previous grouping of controls. See Accessibility Overview.106 Short Cut.registerSystemCut("apple-reserved-10", "reserved", KeyEvent.VK_ESCAPE, KeyEvent.META_DOWN_MASK).setAutomatic(); // Open Front Row.107 Short Cut.registerSystemCut("apple-reserved-11", "reserved", KeyEvent.VK_ESCAPE, KeyEvent.META_DOWN_MASK | KeyEvent.ALT_DOWN_MASK).setAutomatic(); // Open the Force Quit dialog.108 Short Cut.registerSystemCut("apple-reserved-12", "reserved", KeyEvent.VK_F1, KeyEvent.CTRL_DOWN_MASK).setAutomatic(); // Toggle full keyboard access on or off. See Accessibility Overview.109 Short Cut.registerSystemCut("apple-reserved-13", "reserved", KeyEvent.VK_F2, KeyEvent.CTRL_DOWN_MASK).setAutomatic(); // Move focus to the menu bar. See Accessibility Overview.110 Short Cut.registerSystemCut("apple-reserved-14", "reserved", KeyEvent.VK_F3, KeyEvent.CTRL_DOWN_MASK).setAutomatic(); // Move focus to the Dock. See Accessibility Overview.111 Short Cut.registerSystemCut("apple-reserved-15", "reserved", KeyEvent.VK_F4, KeyEvent.CTRL_DOWN_MASK).setAutomatic(); // Move focus to the active (or next) window. See Accessibility Overview.112 Short Cut.registerSystemCut("apple-reserved-16", "reserved", KeyEvent.VK_F4, KeyEvent.CTRL_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK).setAutomatic(); // Move focus to the previously active window. See Accessibility Overview.113 Short Cut.registerSystemCut("apple-reserved-17", "reserved", KeyEvent.VK_F5, KeyEvent.CTRL_DOWN_MASK).setAutomatic(); // Move focus to the toolbar. See Accessibility Overview.114 Short Cut.registerSystemCut("apple-reserved-18", "reserved", KeyEvent.VK_F5, KeyEvent.META_DOWN_MASK).setAutomatic(); // Turn VoiceOver on or off. See Accessibility Overview.115 Short Cut.registerSystemCut("apple-reserved-19", "reserved", KeyEvent.VK_F6, KeyEvent.CTRL_DOWN_MASK).setAutomatic(); // Move focus to the first (or next) panel. See Accessibility Overview.116 Short Cut.registerSystemCut("apple-reserved-20", "reserved", KeyEvent.VK_F6, KeyEvent.CTRL_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK).setAutomatic(); // Move focus to the previous panel. See Accessibility Overview.117 Short Cut.registerSystemCut("apple-reserved-21", "reserved", KeyEvent.VK_F7, KeyEvent.CTRL_DOWN_MASK).setAutomatic(); // Temporarily override the current keyboard access mode in windows and dialogs. See Accessibility Overview.118 Short Cut.registerSystemCut("apple-reserved-22", "reserved", KeyEvent.VK_F9, 0).setAutomatic(); // Tile or untile all open windows.119 Short Cut.registerSystemCut("apple-reserved-23", "reserved", KeyEvent.VK_F10, 0).setAutomatic(); // Tile or untile all open windows in the currently active application.120 Short Cut.registerSystemCut("apple-reserved-24", "reserved", KeyEvent.VK_F11, 0).setAutomatic(); // Hide or show all open windows.121 Short Cut.registerSystemCut("apple-reserved-25", "reserved", KeyEvent.VK_F12, 0).setAutomatic(); // Hide or display Dashboard.122 Short Cut.registerSystemCut("apple-reserved-26", "reserved", KeyEvent.VK_DEAD_GRAVE, KeyEvent.META_DOWN_MASK).setAutomatic(); // Activate the next open window in the frontmost application. See "Window Layering."123 Short Cut.registerSystemCut("apple-reserved-27", "reserved", KeyEvent.VK_DEAD_GRAVE, KeyEvent.META_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK).setAutomatic(); // Activate the previous open window in the frontmost application. See "Window Layering."124 Short Cut.registerSystemCut("apple-reserved-28", "reserved", KeyEvent.VK_DEAD_GRAVE, KeyEvent.META_DOWN_MASK | KeyEvent.ALT_DOWN_MASK).setAutomatic(); // Move focus to the window drawer.125 Short Cut.registerSystemCut("apple-reserved-29", "reserved", KeyEvent.VK_MINUS, KeyEvent.META_DOWN_MASK).setAutomatic(); // Decrease the size of the selected item (equivalent to the Smaller command). See "The Format Menu."126 Short Cut.registerSystemCut("apple-reserved-30", "reserved", KeyEvent.VK_MINUS, KeyEvent.META_DOWN_MASK | KeyEvent.ALT_DOWN_MASK).setAutomatic(); // Zoom out when screen zooming is on. See Accessibility Overview.127 128 Short Cut.registerSystemCut("system:align-left", "reserved", KeyEvent.VK_OPEN_BRACKET, KeyEvent.META_DOWN_MASK); // Left-align a selection (equivalent to the Align Left command). See "The Format Menu."129 Short Cut.registerSystemCut("system:align-right","reserved", KeyEvent.VK_CLOSE_BRACKET, KeyEvent.META_DOWN_MASK); // Right-align a selection (equivalent to the Align Right command). See "The Format Menu."97 Shortcut.registerSystemShortcut("apple-reserved-01", "reserved", KeyEvent.VK_SPACE, KeyEvent.META_DOWN_MASK).setAutomatic(); // Show or hide the Spotlight search field (when multiple languages are installed, may rotate through enabled script systems). 98 Shortcut.registerSystemShortcut("apple-reserved-02", "reserved", KeyEvent.VK_SPACE, KeyEvent.META_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK).setAutomatic(); // Apple reserved. 99 Shortcut.registerSystemShortcut("apple-reserved-03", "reserved", KeyEvent.VK_SPACE, KeyEvent.META_DOWN_MASK | KeyEvent.ALT_DOWN_MASK).setAutomatic(); // Show the Spotlight search results window (when multiple languages are installed, may rotate through keyboard layouts and input methods within a script). 100 Shortcut.registerSystemShortcut("apple-reserved-04", "reserved", KeyEvent.VK_SPACE, KeyEvent.META_DOWN_MASK | KeyEvent.CTRL_DOWN_MASK).setAutomatic(); // | Apple reserved. 101 Shortcut.registerSystemShortcut("apple-reserved-05", "reserved", KeyEvent.VK_TAB, KeyEvent.SHIFT_DOWN_MASK).setAutomatic(); // Navigate through controls in a reverse direction. See "Keyboard Focus and Navigation." 102 Shortcut.registerSystemShortcut("apple-reserved-06", "reserved", KeyEvent.VK_TAB, KeyEvent.META_DOWN_MASK).setAutomatic(); // Move forward to the next most recently used application in a list of open applications. 103 Shortcut.registerSystemShortcut("apple-reserved-07", "reserved", KeyEvent.VK_TAB, KeyEvent.META_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK).setAutomatic(); // Move backward through a list of open applications (sorted by recent use). 104 Shortcut.registerSystemShortcut("apple-reserved-08", "reserved", KeyEvent.VK_TAB, KeyEvent.CTRL_DOWN_MASK).setAutomatic(); // Move focus to the next grouping of controls in a dialog or the next table (when Tab moves to the next cell). See Accessibility Overview. 105 Shortcut.registerSystemShortcut("apple-reserved-09", "reserved", KeyEvent.VK_TAB, KeyEvent.CTRL_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK).setAutomatic(); // Move focus to the previous grouping of controls. See Accessibility Overview. 106 Shortcut.registerSystemShortcut("apple-reserved-10", "reserved", KeyEvent.VK_ESCAPE, KeyEvent.META_DOWN_MASK).setAutomatic(); // Open Front Row. 107 Shortcut.registerSystemShortcut("apple-reserved-11", "reserved", KeyEvent.VK_ESCAPE, KeyEvent.META_DOWN_MASK | KeyEvent.ALT_DOWN_MASK).setAutomatic(); // Open the Force Quit dialog. 108 Shortcut.registerSystemShortcut("apple-reserved-12", "reserved", KeyEvent.VK_F1, KeyEvent.CTRL_DOWN_MASK).setAutomatic(); // Toggle full keyboard access on or off. See Accessibility Overview. 109 Shortcut.registerSystemShortcut("apple-reserved-13", "reserved", KeyEvent.VK_F2, KeyEvent.CTRL_DOWN_MASK).setAutomatic(); // Move focus to the menu bar. See Accessibility Overview. 110 Shortcut.registerSystemShortcut("apple-reserved-14", "reserved", KeyEvent.VK_F3, KeyEvent.CTRL_DOWN_MASK).setAutomatic(); // Move focus to the Dock. See Accessibility Overview. 111 Shortcut.registerSystemShortcut("apple-reserved-15", "reserved", KeyEvent.VK_F4, KeyEvent.CTRL_DOWN_MASK).setAutomatic(); // Move focus to the active (or next) window. See Accessibility Overview. 112 Shortcut.registerSystemShortcut("apple-reserved-16", "reserved", KeyEvent.VK_F4, KeyEvent.CTRL_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK).setAutomatic(); // Move focus to the previously active window. See Accessibility Overview. 113 Shortcut.registerSystemShortcut("apple-reserved-17", "reserved", KeyEvent.VK_F5, KeyEvent.CTRL_DOWN_MASK).setAutomatic(); // Move focus to the toolbar. See Accessibility Overview. 114 Shortcut.registerSystemShortcut("apple-reserved-18", "reserved", KeyEvent.VK_F5, KeyEvent.META_DOWN_MASK).setAutomatic(); // Turn VoiceOver on or off. See Accessibility Overview. 115 Shortcut.registerSystemShortcut("apple-reserved-19", "reserved", KeyEvent.VK_F6, KeyEvent.CTRL_DOWN_MASK).setAutomatic(); // Move focus to the first (or next) panel. See Accessibility Overview. 116 Shortcut.registerSystemShortcut("apple-reserved-20", "reserved", KeyEvent.VK_F6, KeyEvent.CTRL_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK).setAutomatic(); // Move focus to the previous panel. See Accessibility Overview. 117 Shortcut.registerSystemShortcut("apple-reserved-21", "reserved", KeyEvent.VK_F7, KeyEvent.CTRL_DOWN_MASK).setAutomatic(); // Temporarily override the current keyboard access mode in windows and dialogs. See Accessibility Overview. 118 Shortcut.registerSystemShortcut("apple-reserved-22", "reserved", KeyEvent.VK_F9, 0).setAutomatic(); // Tile or untile all open windows. 119 Shortcut.registerSystemShortcut("apple-reserved-23", "reserved", KeyEvent.VK_F10, 0).setAutomatic(); // Tile or untile all open windows in the currently active application. 120 Shortcut.registerSystemShortcut("apple-reserved-24", "reserved", KeyEvent.VK_F11, 0).setAutomatic(); // Hide or show all open windows. 121 Shortcut.registerSystemShortcut("apple-reserved-25", "reserved", KeyEvent.VK_F12, 0).setAutomatic(); // Hide or display Dashboard. 122 Shortcut.registerSystemShortcut("apple-reserved-26", "reserved", KeyEvent.VK_DEAD_GRAVE, KeyEvent.META_DOWN_MASK).setAutomatic(); // Activate the next open window in the frontmost application. See "Window Layering." 123 Shortcut.registerSystemShortcut("apple-reserved-27", "reserved", KeyEvent.VK_DEAD_GRAVE, KeyEvent.META_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK).setAutomatic(); // Activate the previous open window in the frontmost application. See "Window Layering." 124 Shortcut.registerSystemShortcut("apple-reserved-28", "reserved", KeyEvent.VK_DEAD_GRAVE, KeyEvent.META_DOWN_MASK | KeyEvent.ALT_DOWN_MASK).setAutomatic(); // Move focus to the window drawer. 125 Shortcut.registerSystemShortcut("apple-reserved-29", "reserved", KeyEvent.VK_MINUS, KeyEvent.META_DOWN_MASK).setAutomatic(); // Decrease the size of the selected item (equivalent to the Smaller command). See "The Format Menu." 126 Shortcut.registerSystemShortcut("apple-reserved-30", "reserved", KeyEvent.VK_MINUS, KeyEvent.META_DOWN_MASK | KeyEvent.ALT_DOWN_MASK).setAutomatic(); // Zoom out when screen zooming is on. See Accessibility Overview. 127 128 Shortcut.registerSystemShortcut("system:align-left", "reserved", KeyEvent.VK_OPEN_BRACKET, KeyEvent.META_DOWN_MASK); // Left-align a selection (equivalent to the Align Left command). See "The Format Menu." 129 Shortcut.registerSystemShortcut("system:align-right","reserved", KeyEvent.VK_CLOSE_BRACKET, KeyEvent.META_DOWN_MASK); // Right-align a selection (equivalent to the Align Right command). See "The Format Menu." 130 130 // I found no KeyEvent for | 131 //Short Cut.registerSystemCut("system:align-center", "reserved", '|', KeyEvent.META_DOWN_MASK); // Center-align a selection (equivalent to the Align Center command). See "The Format Menu."132 Short Cut.registerSystemCut("system:spelling", "reserved", KeyEvent.VK_COLON, KeyEvent.META_DOWN_MASK); // Display the Spelling window (equivalent to the Spelling command). See "The Edit Menu."133 Short Cut.registerSystemCut("system:spellcheck", "reserved", KeyEvent.VK_SEMICOLON, KeyEvent.META_DOWN_MASK); // Find misspelled words in the document (equivalent to the Check Spelling command). See "The Edit Menu."134 Short Cut.registerSystemCut("system:preferences", "reserved", KeyEvent.VK_COMMA, KeyEvent.META_DOWN_MASK).setAutomatic(); // Open the application's preferences window (equivalent to the Preferences command). See "The Application Menu."135 136 Short Cut.registerSystemCut("apple-reserved-31", "reserved", KeyEvent.VK_COMMA, KeyEvent.META_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK | KeyEvent.ALT_DOWN_MASK).setAutomatic(); // Decrease screen contrast. See Accessibility Overview.137 Short Cut.registerSystemCut("apple-reserved-32", "reserved", KeyEvent.VK_PERIOD, KeyEvent.META_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK | KeyEvent.ALT_DOWN_MASK).setAutomatic(); // Increase screen contrast. See Accessibility Overview.131 //Shortcut.registerSystemCut("system:align-center", "reserved", '|', KeyEvent.META_DOWN_MASK); // Center-align a selection (equivalent to the Align Center command). See "The Format Menu." 132 Shortcut.registerSystemShortcut("system:spelling", "reserved", KeyEvent.VK_COLON, KeyEvent.META_DOWN_MASK); // Display the Spelling window (equivalent to the Spelling command). See "The Edit Menu." 133 Shortcut.registerSystemShortcut("system:spellcheck", "reserved", KeyEvent.VK_SEMICOLON, KeyEvent.META_DOWN_MASK); // Find misspelled words in the document (equivalent to the Check Spelling command). See "The Edit Menu." 134 Shortcut.registerSystemShortcut("system:preferences", "reserved", KeyEvent.VK_COMMA, KeyEvent.META_DOWN_MASK).setAutomatic(); // Open the application's preferences window (equivalent to the Preferences command). See "The Application Menu." 135 136 Shortcut.registerSystemShortcut("apple-reserved-31", "reserved", KeyEvent.VK_COMMA, KeyEvent.META_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK | KeyEvent.ALT_DOWN_MASK).setAutomatic(); // Decrease screen contrast. See Accessibility Overview. 137 Shortcut.registerSystemShortcut("apple-reserved-32", "reserved", KeyEvent.VK_PERIOD, KeyEvent.META_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK | KeyEvent.ALT_DOWN_MASK).setAutomatic(); // Increase screen contrast. See Accessibility Overview. 138 138 139 139 // I found no KeyEvent for ? 140 //Short Cut.registerSystemCut("system:help", "reserved", '?', KeyEvent.META_DOWN_MASK).setAutomatic(); // Open the application's help in Help Viewer. See "The Help Menu."141 142 Short Cut.registerSystemCut("apple-reserved-33", "reserved", KeyEvent.VK_SLASH, KeyEvent.META_DOWN_MASK | KeyEvent.ALT_DOWN_MASK).setAutomatic(); // Turn font smoothing on or off.143 Short Cut.registerSystemCut("apple-reserved-34", "reserved", KeyEvent.VK_EQUALS, KeyEvent.META_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK).setAutomatic(); // Increase the size of the selected item (equivalent to the Bigger command). See "The Format Menu."144 Short Cut.registerSystemCut("apple-reserved-35", "reserved", KeyEvent.VK_EQUALS, KeyEvent.META_DOWN_MASK | KeyEvent.ALT_DOWN_MASK).setAutomatic(); // Zoom in when screen zooming is on. See Accessibility Overview.145 Short Cut.registerSystemCut("apple-reserved-36", "reserved", KeyEvent.VK_3, KeyEvent.META_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK).setAutomatic(); // Capture the screen to a file.146 Short Cut.registerSystemCut("apple-reserved-37", "reserved", KeyEvent.VK_3, KeyEvent.META_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK | KeyEvent.CTRL_DOWN_MASK).setAutomatic(); // Capture the screen to the Clipboard.147 Short Cut.registerSystemCut("apple-reserved-38", "reserved", KeyEvent.VK_4, KeyEvent.META_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK).setAutomatic(); // Capture a selection to a file.148 Short Cut.registerSystemCut("apple-reserved-39", "reserved", KeyEvent.VK_4, KeyEvent.META_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK | KeyEvent.CTRL_DOWN_MASK).setAutomatic(); // Capture a selection to the Clipboard.149 Short Cut.registerSystemCut("apple-reserved-40", "reserved", KeyEvent.VK_8, KeyEvent.META_DOWN_MASK | KeyEvent.ALT_DOWN_MASK).setAutomatic(); // Turn screen zooming on or off. See Accessibility Overview.150 Short Cut.registerSystemCut("apple-reserved-41", "reserved", KeyEvent.VK_8, KeyEvent.META_DOWN_MASK | KeyEvent.ALT_DOWN_MASK | KeyEvent.CTRL_DOWN_MASK).setAutomatic(); // Invert the screen colors. See Accessibility Overview.151 152 Short Cut.registerSystemCut("system:selectall", "reserved", KeyEvent.VK_A, KeyEvent.META_DOWN_MASK); // Highlight every item in a document or window, or all characters in a text field (equivalent to the Select All command). See "The Edit Menu."153 Short Cut.registerSystemCut("system:bold", "reserved", KeyEvent.VK_B, KeyEvent.META_DOWN_MASK); // Boldface the selected text or toggle boldfaced text on and off (equivalent to the Bold command). See "The Edit Menu."154 Short Cut.registerSystemCut("system:copy", "reserved", KeyEvent.VK_C, KeyEvent.META_DOWN_MASK); // Duplicate the selected data and store on the Clipboard (equivalent to the Copy command). See "The Edit Menu."155 Short Cut.registerSystemCut("system:colors", "reserved", KeyEvent.VK_C, KeyEvent.META_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK); // Display the Colors window (equivalent to the Show Colors command). See "The Format Menu."156 Short Cut.registerSystemCut("system:copystyle", "reserved", KeyEvent.VK_C, KeyEvent.META_DOWN_MASK | KeyEvent.ALT_DOWN_MASK); // Copy the style of the selected text (equivalent to the Copy Style command). See "The Format Menu."157 Short Cut.registerSystemCut("system:copyformat", "reserved", KeyEvent.VK_C, KeyEvent.META_DOWN_MASK | KeyEvent.CTRL_DOWN_MASK).setAutomatic(); // Copy the formatting settings of the selected item and store on the Clipboard (equivalent to the Copy Ruler command). See "The Format Menu."158 159 Short Cut.registerSystemCut("apple-reserved-42", "reserved", KeyEvent.VK_D, KeyEvent.META_DOWN_MASK | KeyEvent.ALT_DOWN_MASK).setAutomatic(); // Show or hide the Dock. See "The Dock."160 161 Short Cut.registerSystemCut("system:dictionarylookup", "reserved", KeyEvent.VK_D, KeyEvent.META_DOWN_MASK | KeyEvent.CTRL_DOWN_MASK); // Display the definition of the selected word in the Dictionary application.162 Short Cut.registerSystemCut("system:findselected", "reserved", KeyEvent.VK_E, KeyEvent.META_DOWN_MASK); // Use the selection for a find operation. See "Find Windows."163 Short Cut.registerSystemCut("system:find", "reserved", KeyEvent.VK_F, KeyEvent.META_DOWN_MASK); // Open a Find window (equivalent to the Find command). See "The Edit Menu."164 Short Cut.registerSystemCut("system:search", "reserved", KeyEvent.VK_F, KeyEvent.META_DOWN_MASK | KeyEvent.ALT_DOWN_MASK); // Jump to the search field control. See "Search Fields."165 Short Cut.registerSystemCut("system:findnext", "reserved", KeyEvent.VK_G, KeyEvent.META_DOWN_MASK); // Find the next occurrence of the selection (equivalent to the Find Next command). See "The Edit Menu."166 Short Cut.registerSystemCut("system:findprev", "reserved", KeyEvent.VK_G, KeyEvent.META_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK); // Find the previous occurrence of the selection (equivalent to the Find Previous command). See "The Edit Menu."167 Short Cut.registerSystemCut("system:hide", "reserved", KeyEvent.VK_H, KeyEvent.META_DOWN_MASK).setAutomatic(); // Hide the windows of the currently running application (equivalent to the Hide ApplicationName command). See "The Application Menu."168 Short Cut.registerSystemCut("system:hideothers", "reserved", KeyEvent.VK_H, KeyEvent.META_DOWN_MASK | KeyEvent.ALT_DOWN_MASK).setAutomatic(); // Hide the windows of all other running applications (equivalent to the Hide Others command). See "The Application Menu."140 //Shortcut.registerSystemCut("system:help", "reserved", '?', KeyEvent.META_DOWN_MASK).setAutomatic(); // Open the application's help in Help Viewer. See "The Help Menu." 141 142 Shortcut.registerSystemShortcut("apple-reserved-33", "reserved", KeyEvent.VK_SLASH, KeyEvent.META_DOWN_MASK | KeyEvent.ALT_DOWN_MASK).setAutomatic(); // Turn font smoothing on or off. 143 Shortcut.registerSystemShortcut("apple-reserved-34", "reserved", KeyEvent.VK_EQUALS, KeyEvent.META_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK).setAutomatic(); // Increase the size of the selected item (equivalent to the Bigger command). See "The Format Menu." 144 Shortcut.registerSystemShortcut("apple-reserved-35", "reserved", KeyEvent.VK_EQUALS, KeyEvent.META_DOWN_MASK | KeyEvent.ALT_DOWN_MASK).setAutomatic(); // Zoom in when screen zooming is on. See Accessibility Overview. 145 Shortcut.registerSystemShortcut("apple-reserved-36", "reserved", KeyEvent.VK_3, KeyEvent.META_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK).setAutomatic(); // Capture the screen to a file. 146 Shortcut.registerSystemShortcut("apple-reserved-37", "reserved", KeyEvent.VK_3, KeyEvent.META_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK | KeyEvent.CTRL_DOWN_MASK).setAutomatic(); // Capture the screen to the Clipboard. 147 Shortcut.registerSystemShortcut("apple-reserved-38", "reserved", KeyEvent.VK_4, KeyEvent.META_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK).setAutomatic(); // Capture a selection to a file. 148 Shortcut.registerSystemShortcut("apple-reserved-39", "reserved", KeyEvent.VK_4, KeyEvent.META_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK | KeyEvent.CTRL_DOWN_MASK).setAutomatic(); // Capture a selection to the Clipboard. 149 Shortcut.registerSystemShortcut("apple-reserved-40", "reserved", KeyEvent.VK_8, KeyEvent.META_DOWN_MASK | KeyEvent.ALT_DOWN_MASK).setAutomatic(); // Turn screen zooming on or off. See Accessibility Overview. 150 Shortcut.registerSystemShortcut("apple-reserved-41", "reserved", KeyEvent.VK_8, KeyEvent.META_DOWN_MASK | KeyEvent.ALT_DOWN_MASK | KeyEvent.CTRL_DOWN_MASK).setAutomatic(); // Invert the screen colors. See Accessibility Overview. 151 152 Shortcut.registerSystemShortcut("system:selectall", "reserved", KeyEvent.VK_A, KeyEvent.META_DOWN_MASK); // Highlight every item in a document or window, or all characters in a text field (equivalent to the Select All command). See "The Edit Menu." 153 Shortcut.registerSystemShortcut("system:bold", "reserved", KeyEvent.VK_B, KeyEvent.META_DOWN_MASK); // Boldface the selected text or toggle boldfaced text on and off (equivalent to the Bold command). See "The Edit Menu." 154 Shortcut.registerSystemShortcut("system:copy", "reserved", KeyEvent.VK_C, KeyEvent.META_DOWN_MASK); // Duplicate the selected data and store on the Clipboard (equivalent to the Copy command). See "The Edit Menu." 155 Shortcut.registerSystemShortcut("system:colors", "reserved", KeyEvent.VK_C, KeyEvent.META_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK); // Display the Colors window (equivalent to the Show Colors command). See "The Format Menu." 156 Shortcut.registerSystemShortcut("system:copystyle", "reserved", KeyEvent.VK_C, KeyEvent.META_DOWN_MASK | KeyEvent.ALT_DOWN_MASK); // Copy the style of the selected text (equivalent to the Copy Style command). See "The Format Menu." 157 Shortcut.registerSystemShortcut("system:copyformat", "reserved", KeyEvent.VK_C, KeyEvent.META_DOWN_MASK | KeyEvent.CTRL_DOWN_MASK).setAutomatic(); // Copy the formatting settings of the selected item and store on the Clipboard (equivalent to the Copy Ruler command). See "The Format Menu." 158 159 Shortcut.registerSystemShortcut("apple-reserved-42", "reserved", KeyEvent.VK_D, KeyEvent.META_DOWN_MASK | KeyEvent.ALT_DOWN_MASK).setAutomatic(); // Show or hide the Dock. See "The Dock." 160 161 Shortcut.registerSystemShortcut("system:dictionarylookup", "reserved", KeyEvent.VK_D, KeyEvent.META_DOWN_MASK | KeyEvent.CTRL_DOWN_MASK); // Display the definition of the selected word in the Dictionary application. 162 Shortcut.registerSystemShortcut("system:findselected", "reserved", KeyEvent.VK_E, KeyEvent.META_DOWN_MASK); // Use the selection for a find operation. See "Find Windows." 163 Shortcut.registerSystemShortcut("system:find", "reserved", KeyEvent.VK_F, KeyEvent.META_DOWN_MASK); // Open a Find window (equivalent to the Find command). See "The Edit Menu." 164 Shortcut.registerSystemShortcut("system:search", "reserved", KeyEvent.VK_F, KeyEvent.META_DOWN_MASK | KeyEvent.ALT_DOWN_MASK); // Jump to the search field control. See "Search Fields." 165 Shortcut.registerSystemShortcut("system:findnext", "reserved", KeyEvent.VK_G, KeyEvent.META_DOWN_MASK); // Find the next occurrence of the selection (equivalent to the Find Next command). See "The Edit Menu." 166 Shortcut.registerSystemShortcut("system:findprev", "reserved", KeyEvent.VK_G, KeyEvent.META_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK); // Find the previous occurrence of the selection (equivalent to the Find Previous command). See "The Edit Menu." 167 Shortcut.registerSystemShortcut("system:hide", "reserved", KeyEvent.VK_H, KeyEvent.META_DOWN_MASK).setAutomatic(); // Hide the windows of the currently running application (equivalent to the Hide ApplicationName command). See "The Application Menu." 168 Shortcut.registerSystemShortcut("system:hideothers", "reserved", KeyEvent.VK_H, KeyEvent.META_DOWN_MASK | KeyEvent.ALT_DOWN_MASK).setAutomatic(); // Hide the windows of all other running applications (equivalent to the Hide Others command). See "The Application Menu." 169 169 // What about applications that have italic text AND info windows? 170 //Short Cut.registerSystemCut("system:italic", "reserved", KeyEvent.VK_I, KeyEvent.META_DOWN_MASK); // Italicize the selected text or toggle italic text on or off (equivalent to the Italic command). See "The Format Menu."171 Short Cut.registerSystemCut("system:info", "reserved", KeyEvent.VK_I, KeyEvent.META_DOWN_MASK); // Display an Info window. See "Inspector Windows."172 Short Cut.registerSystemCut("system:inspector", "reserved", KeyEvent.VK_I, KeyEvent.META_DOWN_MASK | KeyEvent.ALT_DOWN_MASK); // Display an inspector window. See "Inspector Windows."173 Short Cut.registerSystemCut("system:toselection", "reserved", KeyEvent.VK_J, KeyEvent.META_DOWN_MASK); // Scroll to a selection.174 Short Cut.registerSystemCut("system:minimize", "reserved", KeyEvent.VK_M, KeyEvent.META_DOWN_MASK); // Minimize the active window to the Dock (equivalent to the Minimize command). See "The Window Menu."175 Short Cut.registerSystemCut("system:minimizeall", "reserved", KeyEvent.VK_M, KeyEvent.META_DOWN_MASK | KeyEvent.ALT_DOWN_MASK); // Minimize all windows of the active application to the Dock (equivalent to the Minimize All command). See "The Window Menu."176 Short Cut.registerSystemCut("system:new", "reserved", KeyEvent.VK_N, KeyEvent.META_DOWN_MASK); // Open a new document (equivalent to the New command). See "The File Menu."177 Short Cut.registerSystemCut("system:open", "reserved", KeyEvent.VK_O, KeyEvent.META_DOWN_MASK); // Display a dialog for choosing a document to open (equivalent to the Open command). See "The File Menu."178 Short Cut.registerSystemCut("system:print", "reserved", KeyEvent.VK_P, KeyEvent.META_DOWN_MASK); // Display the Print dialog (equivalent to the Print command). See "The File Menu."179 Short Cut.registerSystemCut("system:printsetup", "reserved", KeyEvent.VK_P, KeyEvent.META_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK); // Display a dialog for specifying printing parameters (equivalent to the Page Setup command). See "The File Menu."180 Short Cut.registerSystemCut("system:menuexit", "reserved", KeyEvent.VK_Q, KeyEvent.META_DOWN_MASK).setAutomatic(); // Quit the application (equivalent to the Quit command). See "The Application Menu."181 182 Short Cut.registerSystemCut("apple-reserved-43", "reserved", KeyEvent.VK_Q, KeyEvent.META_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK).setAutomatic(); // Log out the current user (equivalent to the Log Out command).183 Short Cut.registerSystemCut("apple-reserved-44", "reserved", KeyEvent.VK_Q, KeyEvent.META_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK | KeyEvent.ALT_DOWN_MASK).setAutomatic(); // Log out the current user without confirmation.184 185 Short Cut.registerSystemCut("system:save", "reserved", KeyEvent.VK_S, KeyEvent.META_DOWN_MASK); // Save the active document (equivalent to the Save command). See "The File Menu."186 Short Cut.registerSystemCut("system:saveas", "reserved", KeyEvent.VK_S, KeyEvent.META_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK); // Display the Save dialog (equivalent to the Save As command). See "The File Menu."187 Short Cut.registerSystemCut("system:fonts", "reserved", KeyEvent.VK_T, KeyEvent.META_DOWN_MASK); // Display the Fonts window (equivalent to the Show Fonts command). See "The Format Menu."188 Short Cut.registerSystemCut("system:toggletoolbar", "reserved", KeyEvent.VK_T, KeyEvent.META_DOWN_MASK | KeyEvent.ALT_DOWN_MASK); // Show or hide a toolbar (equivalent to the Show/Hide Toolbar command). See "The View Menu" and "Toolbars."189 Short Cut.registerSystemCut("system:underline", "reserved", KeyEvent.VK_U, KeyEvent.META_DOWN_MASK); // Underline the selected text or turn underlining on or off (equivalent to the Underline command). See "The Format Menu."190 Short Cut.registerSystemCut("system:paste", "reserved", KeyEvent.VK_V, KeyEvent.META_DOWN_MASK); // Insert the Clipboard contents at the insertion point (equivalent to the Paste command). See "The File Menu."191 Short Cut.registerSystemCut("system:pastestyle", "reserved", KeyEvent.VK_V, KeyEvent.META_DOWN_MASK | KeyEvent.ALT_DOWN_MASK); // Apply the style of one object to the selected object (equivalent to the Paste Style command). See "The Format Menu."192 Short Cut.registerSystemCut("system:pastemwithoutstyle", "reserved", KeyEvent.VK_V, KeyEvent.META_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK | KeyEvent.ALT_DOWN_MASK); // Apply the style of the surrounding text to the inserted object (equivalent to the Paste and Match Style command). See "The Edit Menu."193 Short Cut.registerSystemCut("system:pasteformatting", "reserved", KeyEvent.VK_V, KeyEvent.META_DOWN_MASK | KeyEvent.CTRL_DOWN_MASK); // Apply formatting settings to the selected object (equivalent to the Paste Ruler command). See "The Format Menu."194 Short Cut.registerSystemCut("system:closewindow", "reserved", KeyEvent.VK_W, KeyEvent.META_DOWN_MASK); // Close the active window (equivalent to the Close command). See "The File Menu."195 Short Cut.registerSystemCut("system:closefile", "reserved", KeyEvent.VK_W, KeyEvent.META_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK); // Close a file and its associated windows (equivalent to the Close File command). See "The File Menu."196 Short Cut.registerSystemCut("system:closeallwindows", "reserved", KeyEvent.VK_W, KeyEvent.META_DOWN_MASK | KeyEvent.ALT_DOWN_MASK); // Close all windows in the application (equivalent to the Close All command). See "The File Menu."197 Short Cut.registerSystemCut("system:cut", "reserved", KeyEvent.VK_X, KeyEvent.META_DOWN_MASK); // Remove the selection and store on the Clipboard (equivalent to the Cut command). See "The Edit Menu."198 Short Cut.registerSystemCut("system:undo", "reserved", KeyEvent.VK_Z, KeyEvent.META_DOWN_MASK); // Reverse the effect of the user's previous operation (equivalent to the Undo command). See "The Edit Menu."199 Short Cut.registerSystemCut("system:redo", "reserved", KeyEvent.VK_Z, KeyEvent.META_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK); // Reverse the effect of the last Undo command (equivalent to the Redo command). See "The Edit Menu."200 201 Short Cut.registerSystemCut("apple-reserved-45", "reserved", KeyEvent.VK_RIGHT, KeyEvent.META_DOWN_MASK).setAutomatic(); // Change the keyboard layout to current layout of Roman script.202 //Short Cut.registerSystemCut("apple-reserved-46", "reserved", KeyEvent.VK_RIGHT, KeyEvent.META_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK).setAutomatic(); // Extend selection to the next semantic unit, typically the end of the current line.203 //Short Cut.registerSystemCut("apple-reserved-47", "reserved", KeyEvent.VK_RIGHT, KeyEvent.SHIFT_DOWN_MASK).setAutomatic(); // Extend selection one character to the right.204 //Short Cut.registerSystemCut("apple-reserved-48", "reserved", KeyEvent.VK_RIGHT, KeyEvent.ALT_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK).setAutomatic(); // Extend selection to the end of the current word, then to the end of the next word.205 206 Short Cut.registerSystemCut("system:movefocusright", "reserved", KeyEvent.VK_RIGHT, KeyEvent.CTRL_DOWN_MASK); // Move focus to another value or cell within a view, such as a table. See Accessibility Overview.207 208 Short Cut.registerSystemCut("apple-reserved-49", "reserved", KeyEvent.VK_LEFT, KeyEvent.META_DOWN_MASK).setAutomatic(); // Change the keyboard layout to current layout of system script.209 //Short Cut.registerSystemCut("apple-reserved-50", "reserved", KeyEvent.VK_LEFT, KeyEvent.META_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK).setAutomatic(); // Extend selection to the previous semantic unit, typically the beginning of the current line.210 //Short Cut.registerSystemCut("apple-reserved-51", "reserved", KeyEvent.VK_LEFT, KeyEvent.SHIFT_DOWN_MASK).setAutomatic(); // Extend selection one character to the left.211 //Short Cut.registerSystemCut("apple-reserved-52", "reserved", KeyEvent.VK_LEFT, KeyEvent.ALT_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK).setAutomatic(); // Extend selection to the beginning of the current word, then to the beginning of the previous word.212 213 Short Cut.registerSystemCut("system:movefocusleft", "reserved", KeyEvent.VK_LEFT, KeyEvent.CTRL_DOWN_MASK); // Move focus to another value or cell within a view, such as a table. See Accessibility Overview.214 215 //Short Cut.registerSystemCut("apple-reserved-53", "reserved", KeyEvent.VK_UP, KeyEvent.META_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK).setAutomatic(); // Extend selection upward in the next semantic unit, typically the beginning of the document.216 //Short Cut.registerSystemCut("apple-reserved-54", "reserved", KeyEvent.VK_UP, KeyEvent.SHIFT_DOWN_MASK).setAutomatic(); // Extend selection to the line above, to the nearest character boundary at the same horizontal location.217 //Short Cut.registerSystemCut("apple-reserved-55", "reserved", KeyEvent.VK_UP, KeyEvent.ALT_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK).setAutomatic(); // Extend selection to the beginning of the current paragraph, then to the beginning of the next paragraph.218 219 Short Cut.registerSystemCut("system:movefocusup", "reserved", KeyEvent.VK_UP, KeyEvent.CTRL_DOWN_MASK); // Move focus to another value or cell within a view, such as a table. See Accessibility Overview.220 221 //Short Cut.registerSystemCut("apple-reserved-56", "reserved", KeyEvent.VK_DOWN, KeyEvent.META_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK).setAutomatic(); // Extend selection downward in the next semantic unit, typically the end of the document.222 //Short Cut.registerSystemCut("apple-reserved-57", "reserved", KeyEvent.VK_DOWN, KeyEvent.SHIFT_DOWN_MASK).setAutomatic(); // Extend selection to the line below, to the nearest character boundary at the same horizontal location.223 //Short Cut.registerSystemCut("apple-reserved-58", "reserved", KeyEvent.VK_DOWN, KeyEvent.ALT_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK).setAutomatic(); // Extend selection to the end of the current paragraph, then to the end of the next paragraph (include the blank line between paragraphs in cut, copy, and paste operations).224 225 Short Cut.registerSystemCut("system:movefocusdown", "reserved", KeyEvent.VK_DOWN, KeyEvent.CTRL_DOWN_MASK); // Move focus to another value or cell within a view, such as a table. See Accessibility Overview.226 227 Short Cut.registerSystemCut("system:about", "reserved", 0, -1).setAutomatic(); // About228 } 229 public String makeTooltip(String name, Short Cut sc) {170 //Shortcut.registerSystemCut("system:italic", "reserved", KeyEvent.VK_I, KeyEvent.META_DOWN_MASK); // Italicize the selected text or toggle italic text on or off (equivalent to the Italic command). See "The Format Menu." 171 Shortcut.registerSystemShortcut("system:info", "reserved", KeyEvent.VK_I, KeyEvent.META_DOWN_MASK); // Display an Info window. See "Inspector Windows." 172 Shortcut.registerSystemShortcut("system:inspector", "reserved", KeyEvent.VK_I, KeyEvent.META_DOWN_MASK | KeyEvent.ALT_DOWN_MASK); // Display an inspector window. See "Inspector Windows." 173 Shortcut.registerSystemShortcut("system:toselection", "reserved", KeyEvent.VK_J, KeyEvent.META_DOWN_MASK); // Scroll to a selection. 174 Shortcut.registerSystemShortcut("system:minimize", "reserved", KeyEvent.VK_M, KeyEvent.META_DOWN_MASK); // Minimize the active window to the Dock (equivalent to the Minimize command). See "The Window Menu." 175 Shortcut.registerSystemShortcut("system:minimizeall", "reserved", KeyEvent.VK_M, KeyEvent.META_DOWN_MASK | KeyEvent.ALT_DOWN_MASK); // Minimize all windows of the active application to the Dock (equivalent to the Minimize All command). See "The Window Menu." 176 Shortcut.registerSystemShortcut("system:new", "reserved", KeyEvent.VK_N, KeyEvent.META_DOWN_MASK); // Open a new document (equivalent to the New command). See "The File Menu." 177 Shortcut.registerSystemShortcut("system:open", "reserved", KeyEvent.VK_O, KeyEvent.META_DOWN_MASK); // Display a dialog for choosing a document to open (equivalent to the Open command). See "The File Menu." 178 Shortcut.registerSystemShortcut("system:print", "reserved", KeyEvent.VK_P, KeyEvent.META_DOWN_MASK); // Display the Print dialog (equivalent to the Print command). See "The File Menu." 179 Shortcut.registerSystemShortcut("system:printsetup", "reserved", KeyEvent.VK_P, KeyEvent.META_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK); // Display a dialog for specifying printing parameters (equivalent to the Page Setup command). See "The File Menu." 180 Shortcut.registerSystemShortcut("system:menuexit", "reserved", KeyEvent.VK_Q, KeyEvent.META_DOWN_MASK).setAutomatic(); // Quit the application (equivalent to the Quit command). See "The Application Menu." 181 182 Shortcut.registerSystemShortcut("apple-reserved-43", "reserved", KeyEvent.VK_Q, KeyEvent.META_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK).setAutomatic(); // Log out the current user (equivalent to the Log Out command). 183 Shortcut.registerSystemShortcut("apple-reserved-44", "reserved", KeyEvent.VK_Q, KeyEvent.META_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK | KeyEvent.ALT_DOWN_MASK).setAutomatic(); // Log out the current user without confirmation. 184 185 Shortcut.registerSystemShortcut("system:save", "reserved", KeyEvent.VK_S, KeyEvent.META_DOWN_MASK); // Save the active document (equivalent to the Save command). See "The File Menu." 186 Shortcut.registerSystemShortcut("system:saveas", "reserved", KeyEvent.VK_S, KeyEvent.META_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK); // Display the Save dialog (equivalent to the Save As command). See "The File Menu." 187 Shortcut.registerSystemShortcut("system:fonts", "reserved", KeyEvent.VK_T, KeyEvent.META_DOWN_MASK); // Display the Fonts window (equivalent to the Show Fonts command). See "The Format Menu." 188 Shortcut.registerSystemShortcut("system:toggletoolbar", "reserved", KeyEvent.VK_T, KeyEvent.META_DOWN_MASK | KeyEvent.ALT_DOWN_MASK); // Show or hide a toolbar (equivalent to the Show/Hide Toolbar command). See "The View Menu" and "Toolbars." 189 Shortcut.registerSystemShortcut("system:underline", "reserved", KeyEvent.VK_U, KeyEvent.META_DOWN_MASK); // Underline the selected text or turn underlining on or off (equivalent to the Underline command). See "The Format Menu." 190 Shortcut.registerSystemShortcut("system:paste", "reserved", KeyEvent.VK_V, KeyEvent.META_DOWN_MASK); // Insert the Clipboard contents at the insertion point (equivalent to the Paste command). See "The File Menu." 191 Shortcut.registerSystemShortcut("system:pastestyle", "reserved", KeyEvent.VK_V, KeyEvent.META_DOWN_MASK | KeyEvent.ALT_DOWN_MASK); // Apply the style of one object to the selected object (equivalent to the Paste Style command). See "The Format Menu." 192 Shortcut.registerSystemShortcut("system:pastemwithoutstyle", "reserved", KeyEvent.VK_V, KeyEvent.META_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK | KeyEvent.ALT_DOWN_MASK); // Apply the style of the surrounding text to the inserted object (equivalent to the Paste and Match Style command). See "The Edit Menu." 193 Shortcut.registerSystemShortcut("system:pasteformatting", "reserved", KeyEvent.VK_V, KeyEvent.META_DOWN_MASK | KeyEvent.CTRL_DOWN_MASK); // Apply formatting settings to the selected object (equivalent to the Paste Ruler command). See "The Format Menu." 194 Shortcut.registerSystemShortcut("system:closewindow", "reserved", KeyEvent.VK_W, KeyEvent.META_DOWN_MASK); // Close the active window (equivalent to the Close command). See "The File Menu." 195 Shortcut.registerSystemShortcut("system:closefile", "reserved", KeyEvent.VK_W, KeyEvent.META_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK); // Close a file and its associated windows (equivalent to the Close File command). See "The File Menu." 196 Shortcut.registerSystemShortcut("system:closeallwindows", "reserved", KeyEvent.VK_W, KeyEvent.META_DOWN_MASK | KeyEvent.ALT_DOWN_MASK); // Close all windows in the application (equivalent to the Close All command). See "The File Menu." 197 Shortcut.registerSystemShortcut("system:cut", "reserved", KeyEvent.VK_X, KeyEvent.META_DOWN_MASK); // Remove the selection and store on the Clipboard (equivalent to the Cut command). See "The Edit Menu." 198 Shortcut.registerSystemShortcut("system:undo", "reserved", KeyEvent.VK_Z, KeyEvent.META_DOWN_MASK); // Reverse the effect of the user's previous operation (equivalent to the Undo command). See "The Edit Menu." 199 Shortcut.registerSystemShortcut("system:redo", "reserved", KeyEvent.VK_Z, KeyEvent.META_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK); // Reverse the effect of the last Undo command (equivalent to the Redo command). See "The Edit Menu." 200 201 Shortcut.registerSystemShortcut("apple-reserved-45", "reserved", KeyEvent.VK_RIGHT, KeyEvent.META_DOWN_MASK).setAutomatic(); // Change the keyboard layout to current layout of Roman script. 202 //Shortcut.registerSystemCut("apple-reserved-46", "reserved", KeyEvent.VK_RIGHT, KeyEvent.META_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK).setAutomatic(); // Extend selection to the next semantic unit, typically the end of the current line. 203 //Shortcut.registerSystemCut("apple-reserved-47", "reserved", KeyEvent.VK_RIGHT, KeyEvent.SHIFT_DOWN_MASK).setAutomatic(); // Extend selection one character to the right. 204 //Shortcut.registerSystemCut("apple-reserved-48", "reserved", KeyEvent.VK_RIGHT, KeyEvent.ALT_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK).setAutomatic(); // Extend selection to the end of the current word, then to the end of the next word. 205 206 Shortcut.registerSystemShortcut("system:movefocusright", "reserved", KeyEvent.VK_RIGHT, KeyEvent.CTRL_DOWN_MASK); // Move focus to another value or cell within a view, such as a table. See Accessibility Overview. 207 208 Shortcut.registerSystemShortcut("apple-reserved-49", "reserved", KeyEvent.VK_LEFT, KeyEvent.META_DOWN_MASK).setAutomatic(); // Change the keyboard layout to current layout of system script. 209 //Shortcut.registerSystemCut("apple-reserved-50", "reserved", KeyEvent.VK_LEFT, KeyEvent.META_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK).setAutomatic(); // Extend selection to the previous semantic unit, typically the beginning of the current line. 210 //Shortcut.registerSystemCut("apple-reserved-51", "reserved", KeyEvent.VK_LEFT, KeyEvent.SHIFT_DOWN_MASK).setAutomatic(); // Extend selection one character to the left. 211 //Shortcut.registerSystemCut("apple-reserved-52", "reserved", KeyEvent.VK_LEFT, KeyEvent.ALT_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK).setAutomatic(); // Extend selection to the beginning of the current word, then to the beginning of the previous word. 212 213 Shortcut.registerSystemShortcut("system:movefocusleft", "reserved", KeyEvent.VK_LEFT, KeyEvent.CTRL_DOWN_MASK); // Move focus to another value or cell within a view, such as a table. See Accessibility Overview. 214 215 //Shortcut.registerSystemCut("apple-reserved-53", "reserved", KeyEvent.VK_UP, KeyEvent.META_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK).setAutomatic(); // Extend selection upward in the next semantic unit, typically the beginning of the document. 216 //Shortcut.registerSystemCut("apple-reserved-54", "reserved", KeyEvent.VK_UP, KeyEvent.SHIFT_DOWN_MASK).setAutomatic(); // Extend selection to the line above, to the nearest character boundary at the same horizontal location. 217 //Shortcut.registerSystemCut("apple-reserved-55", "reserved", KeyEvent.VK_UP, KeyEvent.ALT_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK).setAutomatic(); // Extend selection to the beginning of the current paragraph, then to the beginning of the next paragraph. 218 219 Shortcut.registerSystemShortcut("system:movefocusup", "reserved", KeyEvent.VK_UP, KeyEvent.CTRL_DOWN_MASK); // Move focus to another value or cell within a view, such as a table. See Accessibility Overview. 220 221 //Shortcut.registerSystemCut("apple-reserved-56", "reserved", KeyEvent.VK_DOWN, KeyEvent.META_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK).setAutomatic(); // Extend selection downward in the next semantic unit, typically the end of the document. 222 //Shortcut.registerSystemCut("apple-reserved-57", "reserved", KeyEvent.VK_DOWN, KeyEvent.SHIFT_DOWN_MASK).setAutomatic(); // Extend selection to the line below, to the nearest character boundary at the same horizontal location. 223 //Shortcut.registerSystemCut("apple-reserved-58", "reserved", KeyEvent.VK_DOWN, KeyEvent.ALT_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK).setAutomatic(); // Extend selection to the end of the current paragraph, then to the end of the next paragraph (include the blank line between paragraphs in cut, copy, and paste operations). 224 225 Shortcut.registerSystemShortcut("system:movefocusdown", "reserved", KeyEvent.VK_DOWN, KeyEvent.CTRL_DOWN_MASK); // Move focus to another value or cell within a view, such as a table. See Accessibility Overview. 226 227 Shortcut.registerSystemShortcut("system:about", "reserved", 0, -1).setAutomatic(); // About 228 } 229 public String makeTooltip(String name, Shortcut sc) { 230 230 String lafid = UIManager.getLookAndFeel().getID(); 231 231 boolean canHtml = true; -
trunk/src/org/openstreetmap/josm/tools/PlatformHookUnixoid.java
r1047 r1084 3 3 4 4 import static org.openstreetmap.josm.tools.I18n.tr; 5 import org.openstreetmap.josm.tools.Short Cut;5 import org.openstreetmap.josm.tools.Shortcut; 6 6 import org.openstreetmap.josm.Main; 7 7 … … 29 29 } 30 30 } 31 public void initShort CutGroups() {31 public void initShortcutGroups() { 32 32 // This is the Windows list. Someone should look over it and make it more "*nix"... 33 Main.pref.put("shortcut.groups."+(Short Cut.GROUPS_DEFAULT+ShortCut.GROUP_NONE), Integer.toString(-1));34 Main.pref.put("shortcut.groups."+(Short Cut.GROUPS_DEFAULT+ShortCut.GROUP_HOTKEY), Integer.toString(KeyEvent.CTRL_DOWN_MASK));35 Main.pref.put("shortcut.groups."+(Short Cut.GROUPS_DEFAULT+ShortCut.GROUP_MENU), Integer.toString(KeyEvent.CTRL_DOWN_MASK));36 Main.pref.put("shortcut.groups."+(Short Cut.GROUPS_DEFAULT+ShortCut.GROUP_EDIT), Integer.toString(0));37 Main.pref.put("shortcut.groups."+(Short Cut.GROUPS_DEFAULT+ShortCut.GROUP_LAYER), Integer.toString(KeyEvent.ALT_DOWN_MASK));38 Main.pref.put("shortcut.groups."+(Short Cut.GROUPS_DEFAULT+ShortCut.GROUP_DIRECT), Integer.toString(0));39 Main.pref.put("shortcut.groups."+(Short Cut.GROUPS_DEFAULT+ShortCut.GROUP_MNEMONIC),Integer.toString(KeyEvent.ALT_DOWN_MASK));33 Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_DEFAULT+Shortcut.GROUP_NONE), Integer.toString(-1)); 34 Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_DEFAULT+Shortcut.GROUP_HOTKEY), Integer.toString(KeyEvent.CTRL_DOWN_MASK)); 35 Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_DEFAULT+Shortcut.GROUP_MENU), Integer.toString(KeyEvent.CTRL_DOWN_MASK)); 36 Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_DEFAULT+Shortcut.GROUP_EDIT), Integer.toString(0)); 37 Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_DEFAULT+Shortcut.GROUP_LAYER), Integer.toString(KeyEvent.ALT_DOWN_MASK)); 38 Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_DEFAULT+Shortcut.GROUP_DIRECT), Integer.toString(0)); 39 Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_DEFAULT+Shortcut.GROUP_MNEMONIC),Integer.toString(KeyEvent.ALT_DOWN_MASK)); 40 40 41 Main.pref.put("shortcut.groups."+(Short Cut.GROUPS_ALT1+ShortCut.GROUP_NONE), Integer.toString(-1));42 Main.pref.put("shortcut.groups."+(Short Cut.GROUPS_ALT1+ShortCut.GROUP_HOTKEY), Integer.toString(KeyEvent.CTRL_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK));43 Main.pref.put("shortcut.groups."+(Short Cut.GROUPS_ALT1+ShortCut.GROUP_MENU), Integer.toString(KeyEvent.CTRL_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK));44 Main.pref.put("shortcut.groups."+(Short Cut.GROUPS_ALT1+ShortCut.GROUP_EDIT), Integer.toString(KeyEvent.SHIFT_DOWN_MASK));45 Main.pref.put("shortcut.groups."+(Short Cut.GROUPS_ALT1+ShortCut.GROUP_LAYER), Integer.toString(KeyEvent.ALT_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK));46 Main.pref.put("shortcut.groups."+(Short Cut.GROUPS_ALT1+ShortCut.GROUP_DIRECT), Integer.toString(KeyEvent.SHIFT_DOWN_MASK));47 Main.pref.put("shortcut.groups."+(Short Cut.GROUPS_ALT1+ShortCut.GROUP_MNEMONIC), Integer.toString(KeyEvent.ALT_DOWN_MASK));41 Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_ALT1+Shortcut.GROUP_NONE), Integer.toString(-1)); 42 Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_ALT1+Shortcut.GROUP_HOTKEY), Integer.toString(KeyEvent.CTRL_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK)); 43 Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_ALT1+Shortcut.GROUP_MENU), Integer.toString(KeyEvent.CTRL_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK)); 44 Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_ALT1+Shortcut.GROUP_EDIT), Integer.toString(KeyEvent.SHIFT_DOWN_MASK)); 45 Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_ALT1+Shortcut.GROUP_LAYER), Integer.toString(KeyEvent.ALT_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK)); 46 Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_ALT1+Shortcut.GROUP_DIRECT), Integer.toString(KeyEvent.SHIFT_DOWN_MASK)); 47 Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_ALT1+Shortcut.GROUP_MNEMONIC), Integer.toString(KeyEvent.ALT_DOWN_MASK)); 48 48 49 Main.pref.put("shortcut.groups."+(Short Cut.GROUPS_ALT2+ShortCut.GROUP_NONE), Integer.toString(-1));50 Main.pref.put("shortcut.groups."+(Short Cut.GROUPS_ALT2+ShortCut.GROUP_HOTKEY), Integer.toString(KeyEvent.CTRL_DOWN_MASK | KeyEvent.ALT_DOWN_MASK));51 Main.pref.put("shortcut.groups."+(Short Cut.GROUPS_ALT2+ShortCut.GROUP_MENU), Integer.toString(KeyEvent.CTRL_DOWN_MASK | KeyEvent.ALT_DOWN_MASK));52 Main.pref.put("shortcut.groups."+(Short Cut.GROUPS_ALT2+ShortCut.GROUP_EDIT), Integer.toString(KeyEvent.ALT_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK));53 Main.pref.put("shortcut.groups."+(Short Cut.GROUPS_ALT2+ShortCut.GROUP_LAYER), Integer.toString(KeyEvent.ALT_DOWN_MASK));54 Main.pref.put("shortcut.groups."+(Short Cut.GROUPS_ALT2+ShortCut.GROUP_DIRECT), Integer.toString(KeyEvent.CTRL_DOWN_MASK));55 Main.pref.put("shortcut.groups."+(Short Cut.GROUPS_ALT2+ShortCut.GROUP_MNEMONIC), Integer.toString(KeyEvent.ALT_DOWN_MASK));49 Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_ALT2+Shortcut.GROUP_NONE), Integer.toString(-1)); 50 Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_ALT2+Shortcut.GROUP_HOTKEY), Integer.toString(KeyEvent.CTRL_DOWN_MASK | KeyEvent.ALT_DOWN_MASK)); 51 Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_ALT2+Shortcut.GROUP_MENU), Integer.toString(KeyEvent.CTRL_DOWN_MASK | KeyEvent.ALT_DOWN_MASK)); 52 Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_ALT2+Shortcut.GROUP_EDIT), Integer.toString(KeyEvent.ALT_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK)); 53 Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_ALT2+Shortcut.GROUP_LAYER), Integer.toString(KeyEvent.ALT_DOWN_MASK)); 54 Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_ALT2+Shortcut.GROUP_DIRECT), Integer.toString(KeyEvent.CTRL_DOWN_MASK)); 55 Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_ALT2+Shortcut.GROUP_MNEMONIC), Integer.toString(KeyEvent.ALT_DOWN_MASK)); 56 56 } 57 public void initSystemShort Cuts() {57 public void initSystemShortcuts() { 58 58 // TODO: Insert system shortcuts here. See Windows and espacially OSX to see how to. 59 59 } … … 63 63 * this is implemented here... 64 64 */ 65 public String makeTooltip(String name, Short Cut sc) {65 public String makeTooltip(String name, Shortcut sc) { 66 66 String result = ""; 67 67 result += "<html>"; -
trunk/src/org/openstreetmap/josm/tools/PlatformHookWindows.java
r1047 r1084 3 3 4 4 import static org.openstreetmap.josm.tools.I18n.tr; 5 import org.openstreetmap.josm.tools.Short Cut;5 import org.openstreetmap.josm.tools.Shortcut; 6 6 import org.openstreetmap.josm.tools.PlatformHookUnixoid; 7 7 import org.openstreetmap.josm.Main; … … 21 21 Runtime.getRuntime().exec("rundll32 url.dll,FileProtocolHandler " + url); 22 22 } 23 public void initShort CutGroups() {24 Main.pref.put("shortcut.groups."+(Short Cut.GROUPS_DEFAULT+ShortCut.GROUP_NONE), Integer.toString(-1));25 Main.pref.put("shortcut.groups."+(Short Cut.GROUPS_DEFAULT+ShortCut.GROUP_HOTKEY), Integer.toString(KeyEvent.CTRL_DOWN_MASK));26 Main.pref.put("shortcut.groups."+(Short Cut.GROUPS_DEFAULT+ShortCut.GROUP_MENU), Integer.toString(KeyEvent.CTRL_DOWN_MASK));27 Main.pref.put("shortcut.groups."+(Short Cut.GROUPS_DEFAULT+ShortCut.GROUP_EDIT), Integer.toString(0));28 Main.pref.put("shortcut.groups."+(Short Cut.GROUPS_DEFAULT+ShortCut.GROUP_LAYER), Integer.toString(KeyEvent.ALT_DOWN_MASK));29 Main.pref.put("shortcut.groups."+(Short Cut.GROUPS_DEFAULT+ShortCut.GROUP_DIRECT), Integer.toString(0));30 Main.pref.put("shortcut.groups."+(Short Cut.GROUPS_DEFAULT+ShortCut.GROUP_MNEMONIC),Integer.toString(KeyEvent.ALT_DOWN_MASK));23 public void initShortcutGroups() { 24 Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_DEFAULT+Shortcut.GROUP_NONE), Integer.toString(-1)); 25 Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_DEFAULT+Shortcut.GROUP_HOTKEY), Integer.toString(KeyEvent.CTRL_DOWN_MASK)); 26 Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_DEFAULT+Shortcut.GROUP_MENU), Integer.toString(KeyEvent.CTRL_DOWN_MASK)); 27 Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_DEFAULT+Shortcut.GROUP_EDIT), Integer.toString(0)); 28 Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_DEFAULT+Shortcut.GROUP_LAYER), Integer.toString(KeyEvent.ALT_DOWN_MASK)); 29 Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_DEFAULT+Shortcut.GROUP_DIRECT), Integer.toString(0)); 30 Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_DEFAULT+Shortcut.GROUP_MNEMONIC),Integer.toString(KeyEvent.ALT_DOWN_MASK)); 31 31 32 Main.pref.put("shortcut.groups."+(Short Cut.GROUPS_ALT1+ShortCut.GROUP_NONE), Integer.toString(-1));33 Main.pref.put("shortcut.groups."+(Short Cut.GROUPS_ALT1+ShortCut.GROUP_HOTKEY), Integer.toString(KeyEvent.CTRL_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK));34 Main.pref.put("shortcut.groups."+(Short Cut.GROUPS_ALT1+ShortCut.GROUP_MENU), Integer.toString(KeyEvent.CTRL_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK));35 Main.pref.put("shortcut.groups."+(Short Cut.GROUPS_ALT1+ShortCut.GROUP_EDIT), Integer.toString(KeyEvent.SHIFT_DOWN_MASK));36 Main.pref.put("shortcut.groups."+(Short Cut.GROUPS_ALT1+ShortCut.GROUP_LAYER), Integer.toString(KeyEvent.ALT_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK));37 Main.pref.put("shortcut.groups."+(Short Cut.GROUPS_ALT1+ShortCut.GROUP_DIRECT), Integer.toString(KeyEvent.SHIFT_DOWN_MASK));38 Main.pref.put("shortcut.groups."+(Short Cut.GROUPS_ALT1+ShortCut.GROUP_MNEMONIC), Integer.toString(KeyEvent.ALT_DOWN_MASK));32 Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_ALT1+Shortcut.GROUP_NONE), Integer.toString(-1)); 33 Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_ALT1+Shortcut.GROUP_HOTKEY), Integer.toString(KeyEvent.CTRL_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK)); 34 Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_ALT1+Shortcut.GROUP_MENU), Integer.toString(KeyEvent.CTRL_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK)); 35 Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_ALT1+Shortcut.GROUP_EDIT), Integer.toString(KeyEvent.SHIFT_DOWN_MASK)); 36 Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_ALT1+Shortcut.GROUP_LAYER), Integer.toString(KeyEvent.ALT_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK)); 37 Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_ALT1+Shortcut.GROUP_DIRECT), Integer.toString(KeyEvent.SHIFT_DOWN_MASK)); 38 Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_ALT1+Shortcut.GROUP_MNEMONIC), Integer.toString(KeyEvent.ALT_DOWN_MASK)); 39 39 40 Main.pref.put("shortcut.groups."+(Short Cut.GROUPS_ALT2+ShortCut.GROUP_NONE), Integer.toString(-1));41 Main.pref.put("shortcut.groups."+(Short Cut.GROUPS_ALT2+ShortCut.GROUP_HOTKEY), Integer.toString(KeyEvent.CTRL_DOWN_MASK | KeyEvent.ALT_DOWN_MASK));42 Main.pref.put("shortcut.groups."+(Short Cut.GROUPS_ALT2+ShortCut.GROUP_MENU), Integer.toString(KeyEvent.CTRL_DOWN_MASK | KeyEvent.ALT_DOWN_MASK));43 Main.pref.put("shortcut.groups."+(Short Cut.GROUPS_ALT2+ShortCut.GROUP_EDIT), Integer.toString(KeyEvent.ALT_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK));44 Main.pref.put("shortcut.groups."+(Short Cut.GROUPS_ALT2+ShortCut.GROUP_LAYER), Integer.toString(KeyEvent.ALT_DOWN_MASK));45 Main.pref.put("shortcut.groups."+(Short Cut.GROUPS_ALT2+ShortCut.GROUP_DIRECT), Integer.toString(KeyEvent.CTRL_DOWN_MASK));46 Main.pref.put("shortcut.groups."+(Short Cut.GROUPS_ALT2+ShortCut.GROUP_MNEMONIC), Integer.toString(KeyEvent.ALT_DOWN_MASK));40 Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_ALT2+Shortcut.GROUP_NONE), Integer.toString(-1)); 41 Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_ALT2+Shortcut.GROUP_HOTKEY), Integer.toString(KeyEvent.CTRL_DOWN_MASK | KeyEvent.ALT_DOWN_MASK)); 42 Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_ALT2+Shortcut.GROUP_MENU), Integer.toString(KeyEvent.CTRL_DOWN_MASK | KeyEvent.ALT_DOWN_MASK)); 43 Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_ALT2+Shortcut.GROUP_EDIT), Integer.toString(KeyEvent.ALT_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK)); 44 Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_ALT2+Shortcut.GROUP_LAYER), Integer.toString(KeyEvent.ALT_DOWN_MASK)); 45 Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_ALT2+Shortcut.GROUP_DIRECT), Integer.toString(KeyEvent.CTRL_DOWN_MASK)); 46 Main.pref.put("shortcut.groups."+(Shortcut.GROUPS_ALT2+Shortcut.GROUP_MNEMONIC), Integer.toString(KeyEvent.ALT_DOWN_MASK)); 47 47 } 48 public void initSystemShort Cuts() {48 public void initSystemShortcuts() { 49 49 // This list if far from complete! 50 Short Cut.registerSystemCut("system:exit", "unused", KeyEvent.VK_F4, KeyEvent.ALT_DOWN_MASK).setAutomatic(); // items with automatic shortcuts will not be added to the menu bar at all51 Short Cut.registerSystemCut("system:menuexit", "unused", KeyEvent.VK_Q, KeyEvent.CTRL_DOWN_MASK);52 Short Cut.registerSystemCut("system:copy", "unused", KeyEvent.VK_C, KeyEvent.CTRL_DOWN_MASK);53 Short Cut.registerSystemCut("system:paste", "unused", KeyEvent.VK_V, KeyEvent.CTRL_DOWN_MASK);54 Short Cut.registerSystemCut("system:cut", "unused", KeyEvent.VK_X, KeyEvent.CTRL_DOWN_MASK);55 Short Cut.registerSystemCut("system:duplicate", "unused", KeyEvent.VK_D, KeyEvent.CTRL_DOWN_MASK); // not really system, but to avoid odd results56 Short Cut.registerSystemCut("system:help", "unused", KeyEvent.VK_F1, 0);50 Shortcut.registerSystemShortcut("system:exit", "unused", KeyEvent.VK_F4, KeyEvent.ALT_DOWN_MASK).setAutomatic(); // items with automatic shortcuts will not be added to the menu bar at all 51 Shortcut.registerSystemShortcut("system:menuexit", "unused", KeyEvent.VK_Q, KeyEvent.CTRL_DOWN_MASK); 52 Shortcut.registerSystemShortcut("system:copy", "unused", KeyEvent.VK_C, KeyEvent.CTRL_DOWN_MASK); 53 Shortcut.registerSystemShortcut("system:paste", "unused", KeyEvent.VK_V, KeyEvent.CTRL_DOWN_MASK); 54 Shortcut.registerSystemShortcut("system:cut", "unused", KeyEvent.VK_X, KeyEvent.CTRL_DOWN_MASK); 55 Shortcut.registerSystemShortcut("system:duplicate", "unused", KeyEvent.VK_D, KeyEvent.CTRL_DOWN_MASK); // not really system, but to avoid odd results 56 Shortcut.registerSystemShortcut("system:help", "unused", KeyEvent.VK_F1, 0); 57 57 } 58 58 }
Note:
See TracChangeset
for help on using the changeset viewer.