Changeset 1102 in josm for trunk/src/org/openstreetmap/josm/tools
- Timestamp:
- 2008-12-03T18:41:48+01:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/tools/Shortcut.java
r1084 r1102 10 10 import java.util.Map; 11 11 import java.util.Collection; 12 import javax.swing.AbstractButton; 12 13 import javax.swing.KeyStroke; 13 14 import javax.swing.JMenu; … … 178 179 } 179 180 } 181 /** 182 * use this to set a buttons's mnemonic 183 */ 184 public void setMnemonic(AbstractButton button) { 185 if (requestedGroup == GROUP_MNEMONIC && assignedModifier == groups.get(requestedGroup + GROUPS_DEFAULT) && getKeyStroke() != null && KeyEvent.getKeyText(assignedKey).length() == 1) { 186 button.setMnemonic(KeyEvent.getKeyText(assignedKey).charAt(0)); //getKeyStroke().getKeyChar() seems not to work here 187 } 188 } 180 189 181 190 /**
Note:
See TracChangeset
for help on using the changeset viewer.