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