mirror of
https://github.com/processing/processing4.git
synced 2026-01-31 12:21:07 +01:00
lots of changes from sunday/monday morning in japan
This commit is contained in:
@@ -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...",
|
||||
|
||||
Reference in New Issue
Block a user