Changeset 16415 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2020-05-15T22:39:16+02:00 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/preferences/ToolbarPreferences.java
r16414 r16415 593 593 @SuppressWarnings("unchecked") 594 594 protected Transferable createTransferable(JComponent c) { 595 List<ActionDefinition> actions = new ArrayList<>(); 596 for (ActionDefinition o: ((JList<ActionDefinition>) c).getSelectedValuesList()) { 597 actions.add(o); 598 } 595 List<ActionDefinition> actions = new ArrayList<>(((JList<ActionDefinition>) c).getSelectedValuesList()); 599 596 return new ActionTransferable(actions); 600 597 } … … 607 604 @Override 608 605 public boolean canImport(JComponent comp, DataFlavor[] transferFlavors) { 609 for (DataFlavor f : transferFlavors) { 610 if (ACTION_FLAVOR.equals(f)) 611 return true; 612 } 613 return false; 606 return Arrays.stream(transferFlavors).anyMatch(ACTION_FLAVOR::equals); 614 607 } 615 608
Note:
See TracChangeset
for help on using the changeset viewer.