X macosx.. editor.status.font needs to be size 12

X   same under windows, just wasn't being set properly before
X   header font needed to be set each time as well
X introduce pde.properties_OSNAME
X   tested to make sure it joins with the other pde.properties ok
X setPixel(i, j, #99CC00);
X   not working anymore Syntax error: unexpected token: CC00
X   problem was substitute only worked along with =
This commit is contained in:
benfry
2002-07-27 19:14:28 +00:00
parent c71b71abe4
commit ca98781fa7
10 changed files with 60 additions and 53 deletions

View File

@@ -215,7 +215,8 @@ public class KjcEngine extends at.dms.kjc.Main implements PdeEngine {
if (PdeBase.getBoolean("compiler.inline_web_colors", true)) {
// convert "= #cc9988" into "= 0xffcc9988"
program = substipoot(program, "(=\\s*)\\#([0-9a-fA-F][0-9a-fA-F])([0-9a-fA-F][0-9a-fA-F])([0-9a-fA-F][0-9a-fA-F])", "$1 0xff$2$3$4");
//program = substipoot(program, "(=\\s*)\\#([0-9a-fA-F][0-9a-fA-F])([0-9a-fA-F][0-9a-fA-F])([0-9a-fA-F][0-9a-fA-F])", "$1 0xff$2$3$4");
program = substipoot(program, "#([0-9a-fA-F][0-9a-fA-F])([0-9a-fA-F][0-9a-fA-F])([0-9a-fA-F][0-9a-fA-F])", "0xff$1$2$3");
}
if ((program.indexOf("void setup()") != -1) ||

View File

@@ -43,7 +43,15 @@ public class PdeBase implements ActionListener {
} else {
//System.out.println("unknown OS");
System.out.println(System.getProperty("os.name");
//System.out.println(System.getProperty("os.name"));
String osname = System.getProperty("os.name");
//System.out.println("osname is " + osname);
if (osname.indexOf("Windows") != -1) {
platform = WINDOWS;
} else {
System.out.println("unhandled osname: " + osname);
System.exit(1);
}
}
}
@@ -67,6 +75,9 @@ public class PdeBase implements ActionListener {
try {
//properties.load(new FileInputStream("lib/pde.properties"));
properties.load(getClass().getResource("pde.properties").openStream());
String platformProps = "pde.properties_" + platforms[platform];
properties.load(getClass().getResource(platformProps).openStream());
//properties.list(System.out);
} catch (Exception e) {
System.err.println("Error reading pde.properties");

View File

@@ -122,7 +122,6 @@ public class PdeEditorHeader extends Panel /* implements ActionListener*/ {
Graphics g = offscreen.getGraphics();
if (font == null) {
//font = new Font("SansSerif", Font.PLAIN, 12);
font = PdeBase.getFont("editor.header.font",
new Font("SansSerif", Font.PLAIN, 12));
g.setFont(font);
@@ -158,6 +157,7 @@ public class PdeEditorHeader extends Panel /* implements ActionListener*/ {
boolean boringUser = editor.userName.equals("default");
g.setFont(font); // needs to be set each time
g.setColor(secondaryColor);
g.drawString(SKETCH_TITLER, sketchTitleLeft, baseline);
if (sketchModified) g.drawString("\u00A7", modifiedLeft, baseline);

View File

@@ -23,11 +23,11 @@ public class PdeEditorListener extends KeyAdapter implements FocusListener {
public PdeEditorListener(PdeEditor editor) {
this.editor = editor;
expandTabs = PdeBase.getBoolean("editor.expandTabs", false);
expandTabs = PdeBase.getBoolean("editor.expandTabs", true);
tabSize = PdeBase.getInteger("editor.tabSize", 2);
tabString = spaces.substring(0, tabSize);
autoIndent = PdeBase.getBoolean("editor.autoIndent", false);
balanceParens = PdeBase.getBoolean("editor.balanceParens", false);
autoIndent = PdeBase.getBoolean("editor.autoIndent", true);
balanceParens = PdeBase.getBoolean("editor.balanceParens", true);
}

View File

@@ -318,7 +318,7 @@ public class PdeEditorStatus extends Panel
Graphics g = offscreen.getGraphics();
if (font == null) {
font = PdeBase.getFont("editor.status.font",
new Font("SansSerif", Font.PLAIN, 10));
new Font("SansSerif", Font.PLAIN, 12));
g.setFont(font);
metrics = g.getFontMetrics();
ascent = metrics.getAscent();

View File

View File

@@ -3,24 +3,24 @@
# edit these only if you know what you're doing.
editor.buttons.bgcolor = #999999
editor.buttons.status.font = SansSerif,plain,10
editor.buttons.status.color = #333333
#editor.buttons.bgcolor = #999999
#editor.buttons.status.font = SansSerif,plain,10
#editor.buttons.status.color = #333333
editor.program.rows = 20
editor.program.columns = 60
editor.program.font = Monospaced,plain,12
#editor.program.rows = 20
#editor.program.columns = 60
#editor.program.font = Monospaced,plain,12
editor.header.bgcolor = #333333
editor.header.fgcolor.primary = #ffffff
editor.header.fgcolor.secondary = #cccccc
editor.header.font = SansSerif,plain,12
#editor.header.bgcolor = #333333
#editor.header.fgcolor.primary = #ffffff
#editor.header.fgcolor.secondary = #cccccc
#editor.header.font = SansSerif,plain,12
editor.console.bgcolor = #0a0a0a
editor.console.fgcolor.output = #cccccc
editor.console.fgcolor.error = #cc0000
editor.console.font = Monospaced,plain,11
editor.console.lines = 6
#editor.console.bgcolor = #0a0a0a
#editor.console.fgcolor.output = #cccccc
#editor.console.fgcolor.error = #cc0000
#editor.console.font = Monospaced,plain,11
#editor.console.lines = 6
#editor.status.notice.fgcolor = #333333
#editor.status.notice.bgcolor = #cccccc
@@ -32,43 +32,30 @@ editor.console.lines = 6
# not necessary to set bgcolor of window b/c it comes from os
#run.window.bgcolor = #666666
run.window.width.minimum = 120
run.window.height.minimum = 120
run.present.bgcolor = #999999
#run.window.width.minimum = 120
#run.window.height.minimum = 120
#run.present.bgcolor = #999999
serial.port = COM1
serial.rate = 9600
serial.parity = N
serial.databits = 8
serial.stopbits = 1
#serial.port = COM1
#serial.rate = 9600
#serial.parity = N
#serial.databits = 8
#serial.stopbits = 1
# enable this to run hack-version mildly stabler external processing
#play.external = true
# use this with above under windows 2000
play.externalCommand = .\\bin\\jre -cp lib;lib\\sketchbook;lib\\pde.jar;lib\\kjc.jar;lib\\comm.jar ProcessingAppletViewer
#play.externalCommand = .\\bin\\jre -cp lib;lib\\sketchbook;lib\\pde.jar;lib\\kjc.jar;lib\\comm.jar ProcessingAppletViewer
# use this with above for window 95/98/ME and you want play.external
# it will also be necessary to put processing in c:\
#play.externalCommand = C:\\processing\\bin\\jre -cp c:\\processing\\lib;c:\\processing\\lib\\pde.jar;c:\\processing\\lib\\kjc.jar;c:\\processing\\lib\\comm.jar ProcessingAppletViewer
program = fillstrokebroken.pde
#program = lib/dbn.pde
#program = hack.pde
#program = glyphrot3.pde
#program = ../test/shape-spatial-lineloop.pde
#program = ../test/shape-points.pde
#program = ../test/font-vlw.pde
#program = ../test/bagelfixes.pde
#program = ../sketchbook/standard/SimpleSerialDemo.pde
#program = ../basicstamp/test.pde
#program = ../test/colorcube.pde
#program = ../kjc/export.pde
editor.expandTabs=true
editor.tabSize=2
editor.autoIndent=true
editor.balanceParens=true
#editor.expandTabs=true
#editor.tabSize=2
#editor.autoIndent=true
#editor.balanceParens=true
#update.enabled
#update.url = http://acg.media.mit.edu/people/fry/processing/update/

View File

@@ -7,15 +7,21 @@ X make buttons taller by 4 pixels (looking bad on macos9/macosx)
X change to uppercase (looks dumb on mac, and casey doesn't like)
X set background color of buttons in EditorStatus
X check splash screen and icons into cvs
X macosx.. editor.status.font needs to be size 12
X same under windows, just wasn't being set properly before
X header font needed to be set each time as well
X introduce pde.properties_OSNAME
X tested to make sure it joins with the other pde.properties ok
X setPixel(i, j, #99CC00);
X not working anymore Syntax error: unexpected token: CC00
X problem was substitute only worked along with =
_ get icon in macos9/macosx/windows formats
_ macosx.. editor.status.font needs to be size 12
_ introduce pde.properties_OSNAME
_ check osname under win98 and linux
_ should fix paren balancing bug.. or disable by default for alpha
_ background() not working
_ imageMode() is gone
_ setPixel(i, j, #99CC00);
_ not working anymore Syntax error: unexpected token: CC00
_ mouse coords coming from window when outside applet.. bad!
void setup() {
size(100,100);
@@ -44,6 +50,7 @@ _ box is not opaque
_ size() not being called in setup is gonna cause lots of headaches
b _ option to delete current project
_ save window position (only during session) of sketch run window
_ present mode should hide editor frame
_ present mode doesn't work for draw()
@@ -116,6 +123,7 @@ a _ see if possible to set background of button object
a _ or maybe just background of the awt object it sits on
a _ use type/creator Pde1
a _ crashes when people click on help in top bar (same in DBN) [macos9]
a _ use osx utilities to setfileinfo for .jar files etc
macosx
a _ how to make double-clickable version for osx