mirror of
https://github.com/processing/processing4.git
synced 2026-02-12 10:00:42 +01:00
moving things to bapplet et al
This commit is contained in:
@@ -3,8 +3,8 @@ import java.io.*;
|
||||
import java.net.*;
|
||||
|
||||
|
||||
public class ProcessingAppletViewer implements Runnable {
|
||||
ProcessingApplet applet;
|
||||
public class BAppletViewer implements Runnable {
|
||||
BApplet applet;
|
||||
Thread killer;
|
||||
//int portnum;
|
||||
//Socket umbilical;
|
||||
@@ -17,18 +17,18 @@ public class ProcessingAppletViewer implements Runnable {
|
||||
//portnum = Integer.parseInt(args[1]);
|
||||
//umbilical = new Socket("localhost", portnum);
|
||||
|
||||
new ProcessingAppletViewer(args[0],
|
||||
Integer.parseInt(args[1]),
|
||||
Integer.parseInt(args[2]));
|
||||
new BAppletViewer(args[0],
|
||||
Integer.parseInt(args[1]),
|
||||
Integer.parseInt(args[2]));
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public ProcessingAppletViewer(String name, int x1, int y1) throws Exception {
|
||||
public BAppletViewer(String name, int x1, int y1) throws Exception {
|
||||
Class c = Class.forName(name);
|
||||
applet = (ProcessingApplet) c.newInstance();
|
||||
applet = (BApplet) c.newInstance();
|
||||
applet.init();
|
||||
applet.start();
|
||||
|
||||
@@ -381,11 +381,17 @@ public class PdeEditor extends Panel implements PdeEnvironment {
|
||||
ps.flush();
|
||||
ps.close();
|
||||
|
||||
String exportDir = ("lib" + File.separator +
|
||||
"export" + File.separator);
|
||||
String bagelClasses[] = new File(exportDir).list();
|
||||
|
||||
/*
|
||||
final String classes[] = {
|
||||
"Bagel.class", "BagelConstants.class", "BagelFont.class",
|
||||
"BagelImage.class", "BagelLight.class", "BagelPolygon.class",
|
||||
"ProcessingApplet.class"
|
||||
};
|
||||
*/
|
||||
|
||||
// create new .jar file
|
||||
FileOutputStream zipOutputFile =
|
||||
@@ -394,13 +400,13 @@ public class PdeEditor extends Panel implements PdeEnvironment {
|
||||
ZipEntry entry;
|
||||
|
||||
// add standard .class files to the jar
|
||||
for (int i = 0; i < classes.length; i++) {
|
||||
for (int i = 0; i < bagelClasses.length; i++) {
|
||||
if ((bagelClasses[i].equals(".")) ||
|
||||
(bagelClasses[i].equals(".."))) continue;
|
||||
//System.out.println("adding class " + (i+1) + " of " + classes.length);
|
||||
entry = new ZipEntry(classes[i]);
|
||||
entry = new ZipEntry(bagelClasses[i]);
|
||||
zos.putNextEntry(entry);
|
||||
zos.write(grabFile(new File("lib" + File.separator +
|
||||
"export" + File.separator +
|
||||
classes[i])));
|
||||
zos.write(grabFile(new File(exportDir + bagelClasses[i])));
|
||||
zos.closeEntry();
|
||||
}
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user