X   some method for getting list of serial ports
X     pde menu item for listing serial ports available
o     could just println them to the console
X   import javax.comm stuff as standard in kjc (but not export)
X can't get fonts to load - tested working ok
X   bagel complaint: could not load font Univerx76.vlw.gz
X   why the x? what's going on?
This commit is contained in:
benfry
2002-08-01 04:17:57 +00:00
parent 8853223602
commit 391ca270ff
7 changed files with 122 additions and 73 deletions

View File

@@ -190,7 +190,7 @@ public class KjcEngine extends PdeEngine {
index = s.indexOf(' ');
name = s.substring(0, index);
tempClass = name;
// and we're running inside
if (kjc) { // if running inside processing...
index = program.indexOf(EXTENDS); // ...and extends BApplet
@@ -213,12 +213,15 @@ public class KjcEngine extends PdeEngine {
// spew out a bunch of java imports
for (int i = 0; i < imports.length; i++) {
writer.print("import " + imports[i] + ".*; ");
// add serial if running inside pde
if (kjc) writer.print("import javax.comm.*;");
if (!kjc) writer.println();
}
if (!kjc) writer.println();
writer.print("public class " + name + " extends " +
((kjc && !usingExternal) ? "KjcApplet" : "BApplet") + " {");
((kjc && !usingExternal) ?
"KjcApplet" : "BApplet") + " {");
}
if (programType == BEGINNER) {
if (!kjc) writer.println();