working on libraries and menu layout

This commit is contained in:
benfry
2004-09-12 21:26:56 +00:00
parent d0df4ec2e0
commit 73fa9e4359
5 changed files with 197 additions and 59 deletions

View File

@@ -51,6 +51,8 @@ public class PdeSketch {
// true if any of the files have been modified
boolean modified;
boolean library; // true if it's a library
File folder; //sketchFolder;
File dataFolder;
File codeFolder;
@@ -114,6 +116,11 @@ public class PdeSketch {
codeFolder = new File(folder, "code");
dataFolder = new File(folder, "data");
File libraryFolder = new File(folder, "library");
if (libraryFolder.exists()) {
library = true;
}
load();
}
@@ -497,6 +504,14 @@ public class PdeSketch {
}
/**
* Return true if this sketch is a library.
*/
public boolean isLibrary() {
return library;
}
/**
* Sets the modified value for the code in the frontmost tab.
*/
@@ -1242,12 +1257,13 @@ public class PdeSketch {
* + +
* +-------------------------------------------------------+
*/
public boolean export() throws Exception {
return exportApplet(true);
}
//public boolean export() throws Exception {
//return exportApplet(true);
//}
public boolean exportApplet(boolean replaceHtml) throws Exception {
public boolean exportApplet(/*boolean replaceHtml*/) throws Exception {
boolean replaceHtml = true;
//File appletDir, String exportSketchName, File dataDir) {
//String program = textarea.getText();
@@ -1505,6 +1521,16 @@ public class PdeSketch {
}
public boolean exportApplication() {
return true;
}
public boolean exportLibrary() {
return true;
}
/**
* Slurps up .class files from a colon (or semicolon on windows)
* separated list of paths and adds them to a ZipOutputStream.