From 53fd5a064bf11e1c18c7ddef18b3eae51f0a0d07 Mon Sep 17 00:00:00 2001 From: benfry Date: Fri, 28 Sep 2001 22:18:24 +0000 Subject: [PATCH] last changes for rev 9, including fixing some of the focus/who's in front issues with the full screen window frame --- processing/app/PdeApplication.java | 4 +++- processing/app/PdeEditor.java | 23 ++++++++++++++++++++++- processing/todo.txt | 24 ++++++++++++++---------- 3 files changed, 39 insertions(+), 12 deletions(-) diff --git a/processing/app/PdeApplication.java b/processing/app/PdeApplication.java index bc4e644fe..75588106a 100644 --- a/processing/app/PdeApplication.java +++ b/processing/app/PdeApplication.java @@ -11,7 +11,9 @@ public class PdeApplication extends PdeApplet implements ActionListener #endif { - Frame frame; + // made static so that toFront() can be called by + // full screen code in editor + static Frame frame; WindowAdapter windowListener; static public void main(String args[]) { diff --git a/processing/app/PdeEditor.java b/processing/app/PdeEditor.java index aa5d7887c..ed93e25ef 100644 --- a/processing/app/PdeEditor.java +++ b/processing/app/PdeEditor.java @@ -1,6 +1,7 @@ #ifdef EDITOR import java.awt.*; +import java.awt.event.*; import java.io.*; import java.net.*; import java.util.*; @@ -745,18 +746,38 @@ public class PdeEditor extends Panel implements PdeEnvironment { fullScreenWindow.setBounds(0, 0, screen.width, screen.height); } fullScreenWindow.setBackground(new Color(102, 102, 102)); + + /* + fullScreenWindow.addWindowListener(new WindowAdapter() { + public void windowActivated(WindowEvent e) { + System.out.println("activated"); + } + } + ); + */ + fullScreenWindow.addFocusListener(new FocusAdapter() { + public void focusGained(FocusEvent e) { + //System.out.println("activated"); + /*PdeApplication.*/ + if (frame != null) frame.toFront(); + } + } + ); } fullScreenWindow.show(); + fullScreenWindow.toFront(); // not sure what to do with applet.. // (since i can't bring the browser window to the front) // unless there's a method in AppletContext - if (frame != null) frame.toFront(); + //if (frame != null) frame.toFront(); + /* try { //System.out.println("my parent is " + getParent()); ((PdeApplication)getParent()).frame.toFront(); } catch (Exception e) { } + */ try { ((KjcEngine)(runner.engine)).window.toFront(); diff --git a/processing/todo.txt b/processing/todo.txt index 2efe9adfc..c5ca50040 100644 --- a/processing/todo.txt +++ b/processing/todo.txt @@ -1,4 +1,4 @@ -iprocessing todo list // last updated 17 september 2001 +iprocessing todo list // last updated 28 september 2001 (most up-to-date version of this file is in processing cvs) @@ -12,18 +12,17 @@ X fill white, stroke black, background white default in bagel X remove duplicates: LINE/LINES etc X 'draw mode' applet support X 'advanced' applet support -_ write documentation about having to use 'extends KjcProcessingApplet' -_ option to enable/disable frame -_ add a note about editor.expandTabs,balanceParens,tabSize,autoIndent -_ also add note about paren balancing doing strange things -_ leave the others turned on, but parens off by default -_ getMillis() doesn't seem to work -_ write email to creas to see what the problem is -_ enable/disable full screen leaves windows in back -_ (may just require two toFront() calls) +X write documentation about having to use 'extends KjcProcessingApplet' +X add a note about editor.expandTabs,balanceParens,tabSize,autoIndent +X also add note about paren balancing doing strange things +X leave the others turned on, but parens off by default +X enable/disable full screen leaves windows in back +X (may just require two toFront() calls) +X whenever background is frontmost, have it call tofront on editor for 0010 +_ option to enable/disable frame _ compiling .java files leaves the .class files next to the .java _ make sure all the dirs in sketchbook added to classpath on startup _ if new dir added, must restart processing (this is acceptable) @@ -104,7 +103,12 @@ _ show creas how to get access to cvs _ how to use ssh identity file to maintain auth for brancusi +BUG WATCH +_ getMillis() returning 0 in some instances/on some machines + + PROCESSING - FEATURES +_ run code with a main() that's not a processing applet _ want emacs-style editor that's faster loading than emacs _ anti-aliasing _ alpha