fixup netscape.javascript stuff, fixes to the font builder

This commit is contained in:
benfry
2004-09-26 20:30:48 +00:00
parent b4c7533808
commit 28cc09fb1b
5 changed files with 52 additions and 120 deletions
+12 -5
View File
@@ -29,7 +29,7 @@ import java.awt.event.*;
import java.io.*;
//import java.net.*;
//import java.text.*;
//import java.util.*;
import java.util.*;
//import java.util.zip.*;
import javax.swing.*;
@@ -49,6 +49,7 @@ public class PdeFontBuilder extends JFrame {
JButton okButton;
JTextField filenameField;
Hashtable table;
boolean smooth = true;
boolean all = false;
@@ -124,6 +125,7 @@ public class PdeFontBuilder extends JFrame {
Font fonts[] = ge.getAllFonts();
String flist[] = new String[fonts.length];
table = new Hashtable();
//String flist[] = ge.getAvailableFontFamilyNames();
//fontSelector = new JComboBox();
@@ -144,6 +146,7 @@ public class PdeFontBuilder extends JFrame {
int index = 0;
for (int i = 0; i < fonts.length; i++) {
flist[index++] = fonts[i].getPSName();
table.put(fonts[i].getPSName(), fonts[i]);
}
list = new String[index];
@@ -158,7 +161,6 @@ public class PdeFontBuilder extends JFrame {
//selection = e.getFirstIndex();
selection = fontSelector.getSelectedIndex();
okButton.setEnabled(true);
update();
/*
@@ -271,6 +273,7 @@ public class PdeFontBuilder extends JFrame {
smoothBox.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
smooth = smoothBox.isSelected();
update();
}
});
smoothBox.setSelected(smooth);
@@ -346,12 +349,15 @@ public class PdeFontBuilder extends JFrame {
} catch (NumberFormatException e2) { }
// if a deselect occurred, selection will be -1
if ((fontsize != 0) && (fontsize < 256) && (selection != -1)) {
font = new Font(list[selection], Font.PLAIN, fontsize);
if ((fontsize > 0) && (fontsize < 256) && (selection != -1)) {
//font = new Font(list[selection], Font.PLAIN, fontsize);
Font instance = (Font) table.get(list[selection]);
font = instance.deriveFont(Font.PLAIN, fontsize);
//System.out.println("setting font to " + font);
sample.setFont(font);
String filenameSuggestion = list[selection].replace(' ', '_');
filenameSuggestion += "-" + fontsize;
filenameField.setText(filenameSuggestion);
}
}
@@ -380,7 +386,8 @@ public class PdeFontBuilder extends JFrame {
}
try {
font = new Font(list[selection], Font.PLAIN, fontsize);
Font instance = (Font) table.get(list[selection]);
font = instance.deriveFont(Font.PLAIN, fontsize);
PFont2 f = new PFont2(font, all, smooth);
// make sure the 'data' folder exists
+1 -1
View File
@@ -196,7 +196,7 @@ preproc.output_parse_tree = false
preproc.jdk_version = 1.1
# base imports to include for java 1.1 (or higher)
preproc.imports.jdk11 = java.applet,java.awt,java.awt.image,java.awt.event,java.io,java.net,java.text,java.util,java.util.zip,netscape.javascript
preproc.imports.jdk11 = java.applet,java.awt,java.awt.image,java.awt.event,java.io,java.net,java.text,java.util,java.util.zip
# additional imports when exporting to java 1.3 or higher
preproc.imports.jdk13 = javax.sound.midi,javax.sound.midi.spi,javax.sound.sampled,javax.sound.sampled.spi
+6 -6
View File
@@ -15,14 +15,14 @@ rm -rf processing-*
cp -r ../shared processing
rm -rf processing/CVS
rm -rf processing/lib/CVS
rm -rf processing/lib/netscape/CVS
rm -rf processing/lib/netscape/javascript/CVS
rm -rf processing/fonts/CVS
#rm -rf processing/lib/netscape/CVS
#rm -rf processing/lib/netscape/javascript/CVS
#rm -rf processing/fonts/CVS
rm -rf processing/reference/CVS
rm -rf processing/reference/images/CVS
rm -rf processing/sketchbook/CVS
rm -rf processing/sketchbook/default/CVS
rm -f processing/sketchbook/default/.cvsignore
#rm -rf processing/sketchbook/CVS
#rm -rf processing/sketchbook/default/CVS
#rm -f processing/sketchbook/default/.cvsignore
# new style examples thing ala reas
cd processing
-78
View File
@@ -1,29 +1,8 @@
#!/bin/sh
# move to base 'processing' directory
#cd ../..
### -- CHECK TO MAKE SURE BAGEL EXISTS -------------------------
# make sure bagel exists, if not, check it out of cvs
#if test -d bagel
#then
#else
# echo Doing CVS checkout of bagel...
# cvs co bagel
# cd bagel
# cvs update -P
# cd ..
#fi
### -- SETUP WORK DIR -------------------------------------------
# back to where we came from
#cd build/windows
if test -d work
then
else
@@ -61,30 +40,14 @@ else
chmod +x client/*.dll
cd ../../..
# mkdir work/lib/export
mkdir work/lib/build
# this will copy cvs files intact, meaning that changes
# could be made and checked back in.. interesting
mkdir work/classes
# no longer needed with megabucket
#cp dist/lib/pde_windows.properties work/lib/
# java application stubs
#cp dist/lib/mrj.jar work/lib/
echo Compiling processing.exe
cd launcher
make && cp processing.exe ../work/
cd ..
# get the serial stuff
# echo Copying serial support from processing.lib dir...
# cp ../../lib/serial/comm.jar work/lib/
# cp ../../lib/serial/javax.comm.properties work/lib/
# cp ../../lib/serial/win32com.dll work/
# chmod +x work/win32com.dll
# get jikes and depedencies
cp dist/jikes.exe work/
chmod +x work/jikes.exe
@@ -101,29 +64,7 @@ echo Building processing.core
cd core
rm -f processing/core/*.class
# clear jikespath to avoid problems if it is defined elsewhere
#unset JIKESPATH
#QT_JAVA_PATH="$WINDIR\\system32\\QTJava.zip"
#if test -f "${QT_JAVA_PATH}"
#then
# #echo "Found Quicktime at $QT_JAVA_PATH"
#else
# QT_JAVA_PATH="$WINDIR\\system\\QTJava.zip"
# if test -f "${QT_JAVA_PATH}"
# echo "could not find qtjava.zip in either"
# echo "${WINDIR}\\system32\\qtjava.zip or"
# echo "${WINDIR}\\system\\qtjava.zip"
# echo "quicktime for java must be installed before building."
# exit 1;
# then
# #echo "Found Quicktime at $QT_JAVA_PATH"
# else
# fi
#fi
# new regular version
#CLASSPATH="..\\build\\windows\\work\\java\\lib\\rt.jar;..\\build\\windows\\work\\lib\\comm.jar;${QT_JAVA_PATH}"
CLASSPATH="..\\build\\windows\\work\\java\\lib\\rt.jar"
export CLASSPATH
@@ -133,24 +74,6 @@ perl preproc.pl
#/cygdrive/c/msjdk-4.0/bin/jvc /d . *.java
zip -rq ../build/windows/work/lib/core.jar processing
#perl make.pl JIKES=../build/windows/work/jikes JDK13
#cp classes/*.class ../build/windows/work/classes/
#echo Building export classes for 1.1
#rm -f classes/*.class
#perl make.pl JIKES=../build/windows/work/jikes
#cd classes
#zip -0q ../../build/windows/work/lib/export11.jar *.class
#cd ..
#echo Building export classes for 1.3
#rm -f classes/*.class
#perl make.pl JIKES=../build/windows/work/jikes
#cd classes
#zip -0q ../../build/windows/work/lib/export13.jar *.class
#cd ..
# back to base processing dir
cd ..
@@ -188,7 +111,6 @@ fi
cd app
#CLASSPATH="..\\build\\windows\\work\\lib\\core.jar;..\\build\\windows\\work\\lib\\mrj.jar;..\\build\\windows\\work\\lib\antlr.jar;..\\build\\windows\\work\\lib\\oro.jar;..\\build\\windows\\work\\java\\lib\\rt.jar;..\\build\\windows\\work\\lib\\comm.jar"
CLASSPATH="..\\build\\windows\\work\\lib\\core.jar;..\\build\\windows\\work\\lib\\mrj.jar;..\\build\\windows\\work\\lib\antlr.jar;..\\build\\windows\\work\\lib\\oro.jar;..\\build\\windows\\work\\java\\lib\\rt.jar"
../build/windows/work/jikes +D -classpath $CLASSPATH -d ..\\build\\windows\\work/classes *.java jeditsyntax/*.java preprocessor/*.java
+33 -30
View File
@@ -96,26 +96,6 @@ X errorMessage in PSerial/PClient/PServer are all using System.out
X write handler for loop() error, warning user to rename loop to draw
X c:/fry/processing/build/windows/work/lib/build/Temporary_1452_9170.java:29:6:29:11: Semantic Error: The method "void loop();" with default access cannot replace the accessible method "void loop();" with public access declared in type "processing.core.PApplet".
hanging bug
* it may be something to do with the editor consoles. try shutting off
output to the console and see if it'll still crash.
* most likely related to io streams to the external java process. when
run via a disconnected process, using "cmd /c start java", the thing
will never hang. in that instance, the process terminates almost
immediately, and no i/o needs to happen (since it's a cmd prompt that
never shows up).
* it could also be a graphics sync bug that just gets more testy
because the environment, a second java process, is running at the same
time. mis.newPixels() may hork since it's over in the applet's thread,
and it might be calling repaint() or Toolkit.sync() to update the
image on-screen.
* shows up on key presses.. not sure if this is because of the actual
key press, or if it's because they're often accompanied by a println()
* blank spaces in filenames/parent folder often cause trouble.. not
sure if related. same for PATH and CLASSPATH.
* some virus scanning software, particularly older NAV versions cause
the trouble.
040925
X change how export.txt works
X make p2 dist for amit
@@ -132,17 +112,18 @@ X jsyn.jar not needed on export, netscape libs not needed on export
o crap.. libraries need to be in packages for this to work
o but annoying: attach("simong.particlesystem.ParticleSystem")
X disable "export application"
X font builder
X properly update the font on new selection
X update when smooth is sel/desel
X don't allow negative font sizes
_ double-check library stuff to make sure they're using the new system
_ add "archive" option since history is gone
_ fix dist.sh for mac, pc, linux
_ write better handler for compiler error:
_ c:/fry/processing/build/windows/work/lib/build/Temporary_8501_3382.java:1:63:1:70: Semantic Error: You need to modify your classpath, sourcepath, bootclasspath, and/or extdirs setup. Package "poo/shoe" could not be found in:
_ static applets need to be able to resize themselves on 'play'
_ figure out what to do with static apps exported as application
_ needs to just hang there
_ scripts (no graphics) will need to call exit() explicitly
_ "create font" not working well with postscript font names
_ need to remap the postscript name back to the java font name
_ or keep a list of font objects, not just the names
@@ -201,6 +182,33 @@ _ http://processing.org/discourse/yabb/YaBB.cgi?board=Proce55ing_software_bugs
_ http://processing.org/discourse/yabb/YaBB.cgi?board=Proce55ing_software_bugs;action=display;num=1078714442;start=0
_ something in that one about mouse position halting or not
hanging bug
* it may be something to do with the editor consoles. try shutting off
output to the console and see if it'll still crash.
* most likely related to io streams to the external java process. when
run via a disconnected process, using "cmd /c start java", the thing
will never hang. in that instance, the process terminates almost
immediately, and no i/o needs to happen (since it's a cmd prompt that
never shows up).
* it could also be a graphics sync bug that just gets more testy
because the environment, a second java process, is running at the same
time. mis.newPixels() may hork since it's over in the applet's thread,
and it might be calling repaint() or Toolkit.sync() to update the
image on-screen.
* shows up on key presses.. not sure if this is because of the actual
key press, or if it's because they're often accompanied by a println()
* blank spaces in filenames/parent folder often cause trouble.. not
sure if related. same for PATH and CLASSPATH.
* some virus scanning software, particularly older NAV versions cause
the trouble.
static apps/scripts
_ static applets need to be able to resize themselves on 'play'
_ figure out what to do with static apps exported as application
_ needs to just hang there
_ scripts (w/ no graphics) will need to call exit() explicitly
exporting libraries
_ compiling - main file is a .java not a .pde
@@ -294,11 +302,6 @@ _ maybe something that shows stack trace?
_ with an 'email this' button? (include source code too?)
_ also need a "prompt" dialog for asking filenames, etc
_ implement and remove PdeEditorStatus stuff
_ check into open-source paperwork for p5
_
..................................................................