-
-
Notifications
You must be signed in to change notification settings - Fork 182
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e9f3042
commit a277fb9
Showing
5 changed files
with
22 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 8 additions & 6 deletions
14
src/main/java/com/marginallyclever/makelangelo/makeart/io/TurtleLoader.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,31 @@ | ||
package com.marginallyclever.makelangelo.makeart.io; | ||
|
||
import java.io.InputStream; | ||
import com.marginallyclever.makelangelo.turtle.Turtle; | ||
|
||
import javax.swing.filechooser.FileNameExtensionFilter; | ||
import java.io.InputStream; | ||
|
||
import com.marginallyclever.makelangelo.turtle.Turtle; | ||
|
||
/** | ||
* A TurtleLoader is a plugin that can load a file into the system as a {@link Turtle}. | ||
*/ | ||
public interface TurtleLoader { | ||
/** | ||
* @return returns a FileNameExtensionFilter with the extensions supported by this filter. | ||
*/ | ||
public FileNameExtensionFilter getFileNameFilter(); | ||
FileNameExtensionFilter getFileNameFilter(); | ||
|
||
/** | ||
* Checks a string's filename, which includes the file extension, (e.g. foo.jpg). | ||
* | ||
* @param filename absolute path of file to load. | ||
* @return true if this plugin can load this file. | ||
*/ | ||
public boolean canLoad(String filename); | ||
boolean canLoad(String filename); | ||
|
||
/** | ||
* attempt to load a file into the system from a given stream | ||
* @param inputStream source of image | ||
* @return true if load successful. | ||
*/ | ||
public Turtle load(InputStream inputStream) throws Exception; | ||
Turtle load(InputStream inputStream) throws Exception; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters