mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
tweaks for javadoc and prepping 0081 release
This commit is contained in:
@@ -17,8 +17,8 @@
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
@@ -41,10 +41,12 @@ public class PdeKeywords extends CTokenMarker {
|
||||
|
||||
|
||||
/**
|
||||
* Handles loading of keywords file. uses getKeywords()
|
||||
* method because that's part of the TokenMarker classes.
|
||||
*
|
||||
* It is recommended that a # sign be used for comments
|
||||
* Handles loading of keywords file.
|
||||
* <P>
|
||||
* Uses getKeywords() method because that's part of the
|
||||
* TokenMarker classes.
|
||||
* <P>
|
||||
* It is recommended that a # sign be used for comments
|
||||
* inside keywords.txt.
|
||||
*/
|
||||
static public KeywordMap getKeywords() {
|
||||
@@ -76,7 +78,7 @@ public class PdeKeywords extends CTokenMarker {
|
||||
// KEYWORD1 -> 0, KEYWORD2 -> 1, etc
|
||||
int num = coloring.charAt(coloring.length() - 1) - '1';
|
||||
byte id = (byte) ((isKey ? Token.KEYWORD1 : Token.LITERAL1) + num);
|
||||
//System.out.println("got " + (isKey ? "keyword" : "literal") +
|
||||
//System.out.println("got " + (isKey ? "keyword" : "literal") +
|
||||
// (num+1) + " for " + keyword);
|
||||
keywordColoring.add(keyword, id);
|
||||
}
|
||||
@@ -88,8 +90,8 @@ public class PdeKeywords extends CTokenMarker {
|
||||
reader.close();
|
||||
|
||||
} catch (Exception e) {
|
||||
PdeBase.showError("Problem loading keywords",
|
||||
"Could not find keywords.txt,\n" +
|
||||
PdeBase.showError("Problem loading keywords",
|
||||
"Could not find keywords.txt,\n" +
|
||||
"please re-install Processing.", e);
|
||||
System.exit(1);
|
||||
}
|
||||
|
||||
@@ -624,12 +624,13 @@ public class PdeSketch {
|
||||
|
||||
|
||||
/**
|
||||
* handles 'save as' for a sketch.. essentially duplicates
|
||||
* the current sketch folder to a new location, and then calls
|
||||
* 'save'. (needs to take the current state of the open files
|
||||
* and save them to the new folder.. but not save over the old
|
||||
* versions for the old sketch..)
|
||||
*
|
||||
* Handles 'save as' for a sketch.
|
||||
* <P>
|
||||
* This basically just duplicates the current sketch folder to
|
||||
* a new location, and then calls 'Save'. (needs to take the current
|
||||
* state of the open files and save them to the new folder..
|
||||
* but not save over the old versions for the old sketch..)
|
||||
* <P>
|
||||
* also removes the previously-generated .class and .jar files,
|
||||
* because they can cause trouble.
|
||||
*/
|
||||
@@ -853,9 +854,11 @@ public class PdeSketch {
|
||||
|
||||
/**
|
||||
* Change what file is currently being edited.
|
||||
* 1. store the String for the text of the current file.
|
||||
* 2. retrieve the String for the text of the new file.
|
||||
* 3. change the text that's visible in the text area
|
||||
* <OL>
|
||||
* <LI> store the String for the text of the current file.
|
||||
* <LI> retrieve the String for the text of the new file.
|
||||
* <LI> change the text that's visible in the text area
|
||||
* </OL>
|
||||
*/
|
||||
public void setCurrent(int which) {
|
||||
// get the text currently being edited
|
||||
|
||||
@@ -0,0 +1,125 @@
|
||||
/* -*- mode: jde; c-basic-offset: 2; indent-tabs-mode: nil -*- */
|
||||
|
||||
/*
|
||||
PresentMode - helper class for full-screen presentation mode
|
||||
Part of the Processing project - http://processing.org
|
||||
|
||||
Copyright (c) 2005- Ben Fry and Casey Reas
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
|
||||
import java.awt.*;
|
||||
import java.awt.event.*;
|
||||
import java.util.Vector;
|
||||
import javax.swing.*;
|
||||
|
||||
|
||||
public class PresentMode {
|
||||
|
||||
static GraphicsDevice devices[];
|
||||
|
||||
/**
|
||||
* Index of the default display device, probably the one that p5 was
|
||||
* started from.
|
||||
*/
|
||||
static int defaultIndex;
|
||||
|
||||
/**
|
||||
* Menu object for preferences window
|
||||
*/
|
||||
//JMenu preferencesMenu;
|
||||
static JComboBox selector;
|
||||
|
||||
/**
|
||||
* Index of the currently selected display to be used for present mode.
|
||||
*/
|
||||
static GraphicsDevice device;
|
||||
|
||||
|
||||
static {
|
||||
GraphicsEnvironment environment =
|
||||
GraphicsEnvironment.getLocalGraphicsEnvironment();
|
||||
devices = environment.getScreenDevices();
|
||||
GraphicsDevice defaultDevice = environment.getDefaultScreenDevice();
|
||||
|
||||
Vector names = new Vector();
|
||||
for (int i = 0; i < devices.length; i++) {
|
||||
String name = String.valueOf(i + 1);
|
||||
if (devices[i] == defaultDevice) {
|
||||
defaultIndex = i;
|
||||
name += " (default)";
|
||||
}
|
||||
names.add(name);
|
||||
}
|
||||
|
||||
selector = new JComboBox(names);
|
||||
selector.addActionListener(new ActionListener() {
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
int index = selector.getSelectedIndex();
|
||||
//device = devices[index];
|
||||
PdePreferences.setInteger("run.present.display", index + 1);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
static public JComboBox getSelector() {
|
||||
int deviceIndex = PdePreferences.getInteger("run.present.display") - 1;
|
||||
selector.setSelectedIndex(deviceIndex);
|
||||
return selector;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
static public JFrame create() {
|
||||
int deviceIndex = PrePreferences.getInteger("run.present.display") - 1;
|
||||
if ((deviceIndex < 0) || (deviceIndex >= devices.length)) {
|
||||
PdeBase.showWarning("Display doesn't exist",
|
||||
"Present Mode is set to use display " +
|
||||
(deviceIndex+1) +
|
||||
" but that doesn't seem to exist. \n" +
|
||||
"This preference will be reset to " +
|
||||
"use the default display.", null);
|
||||
deviceIndex = defaultIndex;
|
||||
}
|
||||
//GraphicsDevice device = devices[
|
||||
//JFrame frame = new JFrame(devices[deviceIndex]);
|
||||
PresentFrame frame = new PresentFrame(devices[deviceIndex]);
|
||||
}
|
||||
|
||||
|
||||
public void show() {
|
||||
setUndecorated(true);
|
||||
setResizable(false);
|
||||
device.setFullScreenWindow(this);
|
||||
}
|
||||
|
||||
|
||||
public Window getWindow() {
|
||||
return device.getFullScreenWindow(); // isn't this just me?
|
||||
}
|
||||
|
||||
|
||||
public void dispose() {
|
||||
Window window = device.getFullScreenWindow();
|
||||
if (window != null) {
|
||||
window.dispose();
|
||||
}
|
||||
device.setFullScreenWindow(null);
|
||||
}
|
||||
*/
|
||||
}
|
||||
@@ -12,10 +12,12 @@ HOW TO BUILD PROCESSING ON YOUR FAVORITE PLATFORM
|
||||
|
||||
** of the packages, begin with the defaults, and add:
|
||||
|
||||
+ cvs - used for version control
|
||||
|
||||
+ gcc-mingw - used to build processing.exe
|
||||
(this will also pull in gcc-core)
|
||||
|
||||
+ cvs - used for version control
|
||||
+ make
|
||||
|
||||
+ perl - use this version, activestate or other distros have trouble
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ releases will be super crusty.
|
||||
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
|
||||
|
||||
|
||||
ABOUT REV 0081 - who knows
|
||||
ABOUT REV 0081 - 4 april 2005
|
||||
|
||||
* major api changes in this release *
|
||||
|
||||
@@ -16,17 +16,18 @@ once again broken things. this time, we've moved around how renderers
|
||||
work.
|
||||
|
||||
- depth() is gone, and so is the renderer menu, in its place, we
|
||||
have a new method for specifying how you want to render. e.g:
|
||||
have a new method for specifying how you want to render.
|
||||
|
||||
this allocates a 2D buffer to draw into, using the Java2D
|
||||
engine or the original 1.1-compliant engine depending on whether
|
||||
or not you're using Java 1.3 or higher:
|
||||
size(200, 200);
|
||||
so now, size(200, 200) this allocates a 2D buffer to draw into,
|
||||
using the Java2D engine or the original 1.1-compliant engine depending
|
||||
on whether or not you're using Java 1.3 or higher.
|
||||
|
||||
this gets the original processing 2D renderer:
|
||||
or this gets the original processing 2D renderer:
|
||||
(which is often better for pixel operations, though is currently quite
|
||||
borked.. lines and whatnot don't work properly)
|
||||
size(200, 200, P2D);
|
||||
|
||||
this provides the oroginal processing 3D renderer:
|
||||
this provides the original processing 3D renderer:
|
||||
size(200, 200, P3D);
|
||||
|
||||
and this loads (drum roll) opengl:
|
||||
@@ -43,6 +44,54 @@ work.
|
||||
back around 70 or whenever they were implemented)
|
||||
import net.java.games.jogl.GL;
|
||||
|
||||
- the applet placement, sizing, and window issues should now be sorted
|
||||
out completely. no more windows showing up in weird places or applets
|
||||
being offset strangely within them.
|
||||
|
||||
- present mode has been rewritten to use java's proper full screen api.
|
||||
no more ghetto full screen with menubar on osx. should be more stable
|
||||
than it was in the past. also note that things running in presentation
|
||||
mode will run using an external java vm, rather than inside the
|
||||
environment itself.
|
||||
|
||||
- processing itself requires java 1.4. it's sort of required it for a
|
||||
little while, but this is now made explicit in the code. if you're lucky
|
||||
a new erorr dialog will pop up and tell you to install a newer version
|
||||
if you try running under 1.3 or whatever.
|
||||
|
||||
- background(PImage) should now be working in opengl
|
||||
|
||||
- saveFrame() path bug fixed
|
||||
|
||||
- preferences madness
|
||||
+ preferences panel is now a modal dialog, and doesn't hide the
|
||||
editor window in the weird way it used to.
|
||||
+ you can also click the link to the preferences .txt file and it'll
|
||||
open in whatever your default text editor is on your machine.
|
||||
+ editor font size is now a preference that can be set from the
|
||||
prefs window.
|
||||
+ fixed a bug where prefs were applied even if you hit cancel.
|
||||
|
||||
- lots more internal fixes and tweaking that we'll be documenting
|
||||
soon (i.e. the new renderer setup means pluggable renderers, or
|
||||
PApplet has lots of fancy command line options like --present)
|
||||
|
||||
|
||||
* other bits to note *
|
||||
|
||||
- it should also be noted again that java 1.1 stuff is almost
|
||||
completely unusable in this release. the PApplet class temporarily
|
||||
contains some 1.4-specific code (which will be removed) and the
|
||||
graphics engine still doesn't work. so this version isn't useful
|
||||
for exporting things to the web.
|
||||
|
||||
- there are a bunch of bugs with save & save as... quirky things
|
||||
about folders not winding up in the right place and whatnot.
|
||||
looking to fix these this week
|
||||
|
||||
- release 82 (or 83?) will be all about getting proper 3D lighting,
|
||||
camera, and geometry working. simon's done some amazing work.
|
||||
|
||||
|
||||
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
|
||||
|
||||
|
||||
@@ -146,7 +146,7 @@ PLATFORM=windows
|
||||
|
||||
|
||||
CLASSPATH="..\\build\\$PLATFORM\\work\\lib\\core.jar:..\\build\\$PLATFORM\\work\\java\\lib\\rt.jar"
|
||||
JIKES="..\\build\\$PLATFORM\\work\\jikes"
|
||||
JIKES="..\\build\\$PLATFORM\\work\\jikes.exe"
|
||||
CORE="..\\build\\$PLATFORM\\work\\lib\\core.jar"
|
||||
LIBRARIES="..\\build\\$PLATFORM\\work\\libraries"
|
||||
|
||||
|
||||
@@ -112,7 +112,7 @@ public class PApplet extends Applet
|
||||
public PGraphics recorder;
|
||||
|
||||
/**
|
||||
* Command line options passed in from main()
|
||||
* Command line options passed in from main().
|
||||
* <P>
|
||||
* This does not include the arguments passed in to PApplet itself.
|
||||
*/
|
||||
@@ -4602,6 +4602,8 @@ v PApplet.this.stop();
|
||||
|
||||
|
||||
/**
|
||||
* main() method for running this class from the command line.
|
||||
* <P>
|
||||
* The simplest way to turn and applet into an application is to
|
||||
* add the following code to your program:
|
||||
* <PRE>static public void main(String args[]) {
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
serial.jar
|
||||
@@ -144,6 +144,9 @@ _ and include an md5hash to see if the file is correct
|
||||
|
||||
_ straighten out int() -> toInt() conversion in the preproc
|
||||
|
||||
_ move build scripts to something better like ant
|
||||
_ too much to maintain the multiple versions, no dependencies, too much code
|
||||
|
||||
_ some type of sketch archive format for posting examples (.psk?)
|
||||
_ would be nice to open a sketch directly from a zip file
|
||||
|
||||
|
||||
@@ -35,8 +35,8 @@ import quicktime.std.sg.*;
|
||||
import quicktime.util.RawEncodedImage;
|
||||
|
||||
|
||||
public class Camera extends PImage
|
||||
implements StdQTConstants, StdQTConstants4, Runnable {
|
||||
public class Camera extends PImage implements Runnable {
|
||||
//implements StdQTConstants, StdQTConstants4, Runnable {
|
||||
PApplet parent;
|
||||
Method cameraEventMethod;
|
||||
String name; // keep track for error messages
|
||||
|
||||
@@ -41,7 +41,7 @@ import quicktime.util.RawEncodedImage;
|
||||
|
||||
|
||||
public class Movie extends PImage
|
||||
implements StdQTConstants, StdQTConstants4, PConstants, Runnable {
|
||||
implements /*StdQTConstants, StdQTConstants4,*/ PConstants, Runnable {
|
||||
PApplet parent;
|
||||
Method movieEventMethod;
|
||||
String filename;
|
||||
|
||||
Reference in New Issue
Block a user