Commit 26ab4d8
committed
Allow pasting text into SwingFileWidget
This restores the ability to paste text into the JTextField of SwingFileWidget. Before this change, the custom TransferHandler did not accept String values.
Now we try to get a File value first, and fall back to getting the String value of the current transfer operation.
I also tried to restore the full default Copy/Cut/Paste functionality by calling super.importData(support), but couldn't get it to work. So let's stay with some minimal Paste functionality at least.1 parent d9447c6 commit 26ab4d8
File tree
1 file changed
+27
-1
lines changed- src/main/java/org/scijava/ui/swing/widget
1 file changed
+27
-1
lines changedLines changed: 27 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
288 | 288 | | |
289 | 289 | | |
290 | 290 | | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
291 | 309 | | |
292 | 310 | | |
293 | 311 | | |
| |||
348 | 366 | | |
349 | 367 | | |
350 | 368 | | |
351 | | - | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
352 | 378 | | |
353 | 379 | | |
354 | 380 | | |
| |||
0 commit comments