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