more tidbits for macosx

This commit is contained in:
benfry
2002-09-02 16:09:29 +00:00
parent c8fc82ac51
commit 17c2852dbb
4 changed files with 35 additions and 1 deletions

View File

@@ -661,6 +661,7 @@ public class KjcEngine extends PdeEngine {
window = new Window(new Frame());
window.addKeyListener(new KeyAdapter() {
public void keyPressed(KeyEvent e) {
//System.out.println("window got " + e);
if (e.getKeyCode() == KeyEvent.VK_ESCAPE) {
//editor.doClose();
//new DelayedClose(editor);
@@ -691,6 +692,7 @@ public class KjcEngine extends PdeEngine {
applet.addKeyListener(new KeyAdapter() {
public void keyPressed(KeyEvent e) {
//System.out.println("applet got " + e);
if (e.getKeyCode() == KeyEvent.VK_ESCAPE) {
stop();
editor.doClose();

View File

@@ -85,7 +85,12 @@ public class PdeBase implements ActionListener {
}
public PdeBase() {
frame = new Frame(WINDOW_TITLE);
frame = new Frame(WINDOW_TITLE) {
// hack for #@#)$(* macosx
public Dimension getMinimumSize() {
return new Dimension(300, 300);
}
};
try {
icon = Toolkit.getDefaultToolkit().getImage("lib/icon.gif");
@@ -282,6 +287,8 @@ public class PdeBase implements ActionListener {
//((PdeEditor)environment).frame = frame
frame.pack(); // maybe this should be before the setBounds call
//System.out.println(frame.getMinimumSize() + " " + frame.getSize());
editor.frame = frame; // no longer really used
editor.init();
rebuildSketchbookMenu(sketchbookMenu);

View File

@@ -115,6 +115,24 @@ public class PdeEditor extends Panel {
PdeBase.getInteger("editor.program.rows", 20),
PdeBase.getInteger("editor.program.columns", 60),
TextArea.SCROLLBARS_VERTICAL_ONLY);
/* {
public Dimension minimumSize() {
System.out.println("old minimum");
return new Dimension(100, 100);
}
public Dimension getMinimumSize() {
System.out.println("new minimum");
return new Dimension(100, 100);
}
public Dimension getMinimumSize(int r, int c) {
System.out.println("new minimum 2");
return new Dimension(100, 100);
}
};*/
textarea.setFont(PdeBase.getFont("editor.program.font",
new Font("Monospaced",
Font.PLAIN, 12)));
@@ -166,6 +184,11 @@ public class PdeEditor extends Panel {
} else {
presentationWindow = new Window(new Frame());
presentationWindow.setBounds(0, 0, screen.width, screen.height);
//presentationWindow.addKeyListener(new KeyAdapter() {
// public void keyPressed(KeyEvent e) {
// System.out.println("pwindow got " + e);
// }
//});
}
Label label = new Label("stop");

View File

@@ -0,0 +1,2 @@
# osx makes things a little large by default
editor.program.font = Monospaced,plain,10