lots of changes from sunday/monday morning in japan

This commit is contained in:
benfry
2001-08-06 02:02:44 +00:00
parent e3395f991e
commit 4df45d0531
6 changed files with 201 additions and 75 deletions

View File

@@ -111,11 +111,19 @@ public class PdeEditor extends Panel implements PdeEnvironment {
add("North", top);
if (program == null) program = DEFAULT_PROGRAM;
textarea = new TextArea(program, 20, 48);
textarea = new TextArea(program, 20, 48,
TextArea.SCROLLBARS_VERTICAL_ONLY );
textarea.setFont(PdeApplet.getFont("editor"));
//right.add("Center", textarea);
add("Center", textarea);
/*
TextArea console = new TextArea("welcome to pr0[3551ng", 5, 48,
TextArea.SCROLLBARS_VERTICAL_ONLY);
console.setBackground(Color.gray);
add("South", console);
*/
//#ifdef FANCY
// right.add("South", PdeFancy.makeDescription());
//#endif
@@ -135,7 +143,8 @@ public class PdeEditor extends Panel implements PdeEnvironment {
public void doPlay() {
doStop();
//doStop();
doClose();
playing = true;
buttons.play();
@@ -146,14 +155,17 @@ public class PdeEditor extends Panel implements PdeEnvironment {
//graphics.requestFocus(); // removed for pde
}
#ifdef RECORDER
public void doRecord() {
doStop();
//doStop();
doClose();
PdeRecorder.start(this, graphics.width, graphics.height);
doPlay();
}
#endif
public void doStop() {
#ifdef RECORDER
if (!playing) return;
@@ -164,6 +176,17 @@ public class PdeEditor extends Panel implements PdeEnvironment {
}
public void doClose() {
if (playing) doStop();
// some code to close the window here
try {
// runner.engine is null (runner is not)
((KjcEngine)(runner.engine)).close();
} catch (Exception e) { }
buttons.clear();
}
public void doOpen() {
FileDialog fd = new FileDialog(new Frame(),
"Open a PDE program...",