Changeset 19120 in josm for trunk/src/org/openstreetmap/josm/tools
- Timestamp:
- 2024-06-20T15:55:07+02:00 (9 months ago)
- Location:
- trunk/src/org/openstreetmap/josm/tools
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/tools/PlatformHook.java
r19105 r19120 248 248 /** 249 249 * Returns extended modifier key used as the appropriate accelerator key for menu shortcuts. 250 * It is advised everywhere to use {@link Toolkit#getMenuShortcutKeyMask()} to get the cross-platform modifier, but:250 * It was advised everywhere to use {@link Toolkit#getMenuShortcutKeyMask()} to get the cross-platform modifier, but: 251 251 * <ul> 252 252 * <li>it returns KeyEvent.CTRL_MASK instead of KeyEvent.CTRL_DOWN_MASK. We used the extended … … 258 258 */ 259 259 default int getMenuShortcutKeyMaskEx() { 260 // To remove when switching to Java 10+, and use Toolkit.getMenuShortcutKeyMaskEx instead 260 if (!GraphicsEnvironment.isHeadless()) { 261 return Toolkit.getDefaultToolkit().getMenuShortcutKeyMaskEx(); 262 } 261 263 return InputEvent.CTRL_DOWN_MASK; 262 264 } -
trunk/src/org/openstreetmap/josm/tools/PlatformHookOsx.java
r19103 r19120 104 104 return !("true".equals(getSystemProperty("apple.laf.useScreenMenuBar")) 105 105 && ("Aqua".equals(laf) || laf.contains("Mac"))); 106 }107 108 @Override109 public int getMenuShortcutKeyMaskEx() {110 return InputEvent.META_DOWN_MASK;111 106 } 112 107 -
trunk/src/org/openstreetmap/josm/tools/StreamUtils.java
r17333 r19120 68 68 */ 69 69 public static <T> Collector<T, ?, List<T>> toUnmodifiableList() { 70 // Java 10: use java.util.stream.Collectors.toUnmodifiableList 70 // Java 10: use java.util.stream.Collectors.toUnmodifiableList (note: does not like null checks OR null entries) 71 71 return Collectors.collectingAndThen(Collectors.toList(), Utils::toUnmodifiableList); 72 72 }
Note:
See TracChangeset
for help on using the changeset viewer.