diff --git a/processing/app/PdeEditor.java b/processing/app/PdeEditor.java index 8b1f8a85d..3ad176774 100644 --- a/processing/app/PdeEditor.java +++ b/processing/app/PdeEditor.java @@ -84,7 +84,8 @@ public class PdeEditor extends Panel { PdeBase base; - // hack until i have a better text editor + // hack while fixing layout issues + Component pain; public PdeEditor(PdeBase base) { this.base = base; @@ -106,8 +107,10 @@ public class PdeEditor extends Panel { add("West", leftPanel); + //Panel rightPanel = new Panel(); Panel rightPanel = new Panel(); - rightPanel.setLayout(new BorderLayout()); + //rightPanel.setLayout(new BorderLayout()); + rightPanel.setLayout(new BoxLayout(rightPanel, BoxLayout.Y_AXIS)); header = new PdeEditorHeader(this); rightPanel.add("North", header); @@ -134,18 +137,39 @@ public class PdeEditor extends Panel { rightPanel.add("Center", scroller); //rightPanel.add("Center", textarea); + /* Panel statusPanel = new Panel(); - statusPanel.setLayout(new BorderLayout()); + //statusPanel.setLayout(new BorderLayout()); + statusPanel.setLayout(new BoxLayout(statusPanel, BoxLayout.Y_AXIS)); + //statusPanel.setLayout(new FlowLayout(FlowLayout.VERTICAL)); status = new PdeEditorStatus(this); - statusPanel.add("North", status); + statusPanel.add("Center", status); console = new PdeEditorConsole(this); - //statusPanel.add("South", console); - statusPanel.add("Center", console); + statusPanel.add("South", console); rightPanel.add("South", statusPanel); + */ + + status = new PdeEditorStatus(this); + rightPanel.add(status); + console = new PdeEditorConsole(this); + rightPanel.add(console); + + /* + //pain = statusPanel; + textarea.addComponentListener(new ComponentAdapter() { + public void componentResized(ComponentEvent e) { + //System.out.println("textarea: " + e); + System.out.println("attempting to force layout"); + //PdeBase.frame.doLayout(); + pain.doLayout(); + } + }); + */ add("Center", rightPanel); // hopefully these are no longer needed w/ swing + // (that was wishful thinking, they still are, until we switch to jedit) PdeEditorListener listener = new PdeEditorListener(this); textarea.addKeyListener(listener); //textarea.addFocusListener(listener); diff --git a/processing/app/PdeEditorConsole.java b/processing/app/PdeEditorConsole.java index 587e53bee..04b822b80 100644 --- a/processing/app/PdeEditorConsole.java +++ b/processing/app/PdeEditorConsole.java @@ -339,6 +339,10 @@ public class PdeEditorConsole extends Component { ascent*lineCount + VINSET*2); //} } + + public Dimension getMinimumSize() { + return getPreferredSize(); + } } diff --git a/processing/app/PdeEditorHeader.java b/processing/app/PdeEditorHeader.java index 30a87154a..e5083fe5d 100644 --- a/processing/app/PdeEditorHeader.java +++ b/processing/app/PdeEditorHeader.java @@ -203,6 +203,11 @@ public class PdeEditorHeader extends Panel /* implements ActionListener*/ { public Dimension getPreferredSize() { + //return new Dimension(300, PdeEditor.GRID_SIZE); + return getMinimumSize(); + } + + public Dimension getMinimumSize() { return new Dimension(300, PdeEditor.GRID_SIZE); } diff --git a/processing/app/PdeEditorStatus.java b/processing/app/PdeEditorStatus.java index e92f7edbd..4b5901351 100644 --- a/processing/app/PdeEditorStatus.java +++ b/processing/app/PdeEditorStatus.java @@ -372,6 +372,10 @@ public class PdeEditorStatus extends Panel return new Dimension(300, PdeEditor.GRID_SIZE); } + public Dimension getMinimumSize() { + return getPreferredSize(); + } + public void actionPerformed(ActionEvent e) { if (e.getSource() == noButton) { diff --git a/processing/todo.txt b/processing/todo.txt index 4c25069c5..e1d3953fc 100644 --- a/processing/todo.txt +++ b/processing/todo.txt @@ -94,6 +94,10 @@ X use date in the sketch name sketch_021104 X with a _2 if needed or '021104a' '021104b' etc X when using save as, allow to remove the old (numbered) sketch X better default size than 300x300 when starting up first time +X bug report from the site +resizing the editor window in Mac OS X leaves the status bar in +place. The result is an editor window with a grey bar layered on top, +obscuring the editable text. FINISH for 46 @@ -105,10 +109,6 @@ _ also printing of objects, esp when null, in jdk 14 _ exception when trying to write to stdout macosx -_ bug report from the site -resizing the editor window in Mac OS X leaves the status bar in -place. The result is an editor window with a grey bar layered on top, -obscuring the editable text. _ update dist script for new layout _ put mac rxtx inside the p5 folder (hide it?) _ include more strongly worded message about rxtx