Last change
on this file since 140 was 140, checked in by bjn8, 16 years ago |
Drag and Drop now supported.
Asynchronous saving and loading now supported
|
File size:
562 bytes
|
Line | |
---|
1 | package org.expeditee.io;
|
---|
2 |
|
---|
3 | import java.awt.Point;
|
---|
4 | import java.io.File;
|
---|
5 | import java.io.IOException;
|
---|
6 |
|
---|
7 | import org.expeditee.FrameDNDTransferHandler;
|
---|
8 |
|
---|
9 | /**
|
---|
10 | * The most basic of file importers: imports a file/directory as a Text item.
|
---|
11 | *
|
---|
12 | * @author Brook Novak
|
---|
13 | *
|
---|
14 | */
|
---|
15 | public class FilePathImporter implements FileImporter {
|
---|
16 |
|
---|
17 | public boolean importFile(File f, Point location) throws IOException {
|
---|
18 |
|
---|
19 | if (location != null && f != null) {
|
---|
20 |
|
---|
21 | FrameDNDTransferHandler.importString(f.getAbsolutePath(), location);
|
---|
22 | return true;
|
---|
23 |
|
---|
24 | }
|
---|
25 |
|
---|
26 | return false;
|
---|
27 |
|
---|
28 | }
|
---|
29 |
|
---|
30 |
|
---|
31 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.