From a66f844d8b763b423fa5a757dd4a0d319a247f53 Mon Sep 17 00:00:00 2001 From: REAS Date: Wed, 22 May 2013 12:44:36 -0700 Subject: [PATCH 1/5] Removing two Typography examples from the web --- core/src/processing/data/XML.java | 29 ++++++++++++++++--- .../Basics/Typography/Letters/Letters.pde | 5 +--- .../Basics/Typography/Words/Words.pde | 5 +--- 3 files changed, 27 insertions(+), 12 deletions(-) diff --git a/core/src/processing/data/XML.java b/core/src/processing/data/XML.java index bc1fd7fac..656f6ede5 100644 --- a/core/src/processing/data/XML.java +++ b/core/src/processing/data/XML.java @@ -61,7 +61,9 @@ public class XML implements Serializable { /** Child elements, once loaded. */ protected XML[] children; - + /** + * @nowebref + */ protected XML() { } @@ -81,6 +83,8 @@ public class XML implements Serializable { /** * Advanced users only; see loadXML() in PApplet. + * + * @nowebref */ public XML(File file) throws IOException, ParserConfigurationException, SAXException { this(file, null); @@ -89,12 +93,16 @@ public class XML implements Serializable { /** * Advanced users only; see loadXML() in PApplet. + * + * @nowebref */ public XML(File file, String options) throws IOException, ParserConfigurationException, SAXException { this(PApplet.createReader(file), options); } - + /** + * @nowebref + */ public XML(InputStream input) throws IOException, ParserConfigurationException, SAXException { this(input, null); } @@ -104,6 +112,8 @@ public class XML implements Serializable { * Shouldn't be part of main p5 reference, this is for advanced users. * Note that while it doesn't accept anything but UTF-8, this is preserved * so that we have some chance of implementing that in the future. + * + * @nowebref */ public XML(InputStream input, String options) throws IOException, ParserConfigurationException, SAXException { this(PApplet.createReader(input), options); @@ -112,6 +122,8 @@ public class XML implements Serializable { /** * Advanced users only; see loadXML() in PApplet. + * + * @nowebref */ public XML(Reader reader) throws IOException, ParserConfigurationException, SAXException { this(reader, null); @@ -120,6 +132,8 @@ public class XML implements Serializable { /** * Advanced users only; see loadXML() in PApplet. + * + * @nowebref */ public XML(Reader reader, String options) throws IOException, ParserConfigurationException, SAXException { DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); @@ -166,6 +180,8 @@ public class XML implements Serializable { /** * @param name description TBD + * + * @nowebref */ public XML(String name) { try { @@ -181,7 +197,9 @@ public class XML implements Serializable { } } - + /** + * @nowebref + */ protected XML(XML parent, Node node) { this.node = node; this.parent = parent; @@ -197,12 +215,15 @@ public class XML implements Serializable { * @throws SAXException * @throws ParserConfigurationException * @throws IOException + * @nowebref */ static public XML parse(String data) throws IOException, ParserConfigurationException, SAXException { return XML.parse(data, null); } - + /** + * @nowebref + */ static public XML parse(String data, String options) throws IOException, ParserConfigurationException, SAXException { return new XML(new StringReader(data), null); } diff --git a/java/examples/Basics/Typography/Letters/Letters.pde b/java/examples/Basics/Typography/Letters/Letters.pde index 6f0314c73..781d2aac7 100644 --- a/java/examples/Basics/Typography/Letters/Letters.pde +++ b/java/examples/Basics/Typography/Letters/Letters.pde @@ -5,9 +5,6 @@ * setting the font, and then drawing the letters. */ -// The next line is needed if running in JavaScript Mode with Processing.js -/* @pjs font="Courier.ttf"; */ - PFont f; void setup() { @@ -16,7 +13,7 @@ void setup() { // Create the font println(PFont.list()); - f = createFont("Monospaced", 24); + f = createFont("Georgia", 24); textFont(f); textAlign(CENTER, CENTER); } diff --git a/java/examples/Basics/Typography/Words/Words.pde b/java/examples/Basics/Typography/Words/Words.pde index 445a6fef9..c86bdcbb6 100644 --- a/java/examples/Basics/Typography/Words/Words.pde +++ b/java/examples/Basics/Typography/Words/Words.pde @@ -5,9 +5,6 @@ * The letters can be aligned left, center, or right with the * textAlign() function. */ - -// The next line is needed if running in JavaScript Mode with Processing.js -/* @pjs font="Georgia.ttf"; */ PFont f; @@ -16,7 +13,7 @@ void setup() { // Create the font println(PFont.list()); - f = createFont("Serif", 24); + f = createFont("Georgia", 24); textFont(f); } From 99a4d8fa304dfae48c07a370b51beedc7dd7ad0b Mon Sep 17 00:00:00 2001 From: REAS Date: Wed, 22 May 2013 14:38:13 -0700 Subject: [PATCH 2/5] Adjustment to KeyboardFunctions example --- .../Basics/Input/KeyboardFunctions/KeyboardFunctions.pde | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/java/examples/Basics/Input/KeyboardFunctions/KeyboardFunctions.pde b/java/examples/Basics/Input/KeyboardFunctions/KeyboardFunctions.pde index f0554ab93..e08079140 100644 --- a/java/examples/Basics/Input/KeyboardFunctions/KeyboardFunctions.pde +++ b/java/examples/Basics/Input/KeyboardFunctions/KeyboardFunctions.pde @@ -54,8 +54,8 @@ void draw() void keyPressed() { - // If the key is between 'A'(65) and 'z'(122) - if( key >= 'A' && key <= 'z') { + // If the key is between 'A'(65) to 'Z' and 'a' to 'z'(122) + if((key >= 'A' && key <= 'Z') || (key >= 'a' && key <= 'z')) { int keyIndex; if(key <= 'Z') { keyIndex = key-'A'; From 543388c8eb905de83f3bf04b41c3bc7ab902494f Mon Sep 17 00:00:00 2001 From: REAS Date: Wed, 22 May 2013 15:28:43 -0700 Subject: [PATCH 3/5] Add getChildCount() to PShape reference --- core/src/processing/core/PShape.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/src/processing/core/PShape.java b/core/src/processing/core/PShape.java index 026d3214c..e5eaa28fd 100644 --- a/core/src/processing/core/PShape.java +++ b/core/src/processing/core/PShape.java @@ -1647,6 +1647,10 @@ public class PShape implements PConstants { return parent; } + /** + * @webref + * @brief Returns the number of children + */ public int getChildCount() { return childCount; } From a88296abb78b2709c1d3f93e0ac85b1f076d08b8 Mon Sep 17 00:00:00 2001 From: REAS Date: Wed, 22 May 2013 15:56:15 -0700 Subject: [PATCH 4/5] Add wheelMouse() to reference --- core/src/processing/core/PApplet.java | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/core/src/processing/core/PApplet.java b/core/src/processing/core/PApplet.java index 388ea6530..44bed52d9 100644 --- a/core/src/processing/core/PApplet.java +++ b/core/src/processing/core/PApplet.java @@ -3069,10 +3069,19 @@ public class PApplet extends Applet mouseExited(); } - + /** + * @nowebref + */ public void mouseWheel() { } - + /** + * The event.getAmount() method returns negative values if the mouse wheel + * if rotated up or away from the user and positive in the other direction. + * On OS X with "natural" scrolling enabled, the values are opposite. + * + * @webref input:mouse + * @param event the MouseEvent + */ public void mouseWheel(MouseEvent event) { mouseWheel(); } From 06d0812fc03a629f83ed90593f30d7353931a37e Mon Sep 17 00:00:00 2001 From: Scott Murray Date: Wed, 22 May 2013 17:57:52 -0700 Subject: [PATCH 5/5] Added reference for Table addColumn() and removeColumn() --- core/src/processing/data/Table.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/src/processing/data/Table.java b/core/src/processing/data/Table.java index b84ad37cb..71eafdd2e 100644 --- a/core/src/processing/data/Table.java +++ b/core/src/processing/data/Table.java @@ -1297,11 +1297,15 @@ public class Table { /** * @webref table:method * @brief Removes a column from the table + * @param columnName the title of the column to be removed */ public void removeColumn(String columnName) { removeColumn(getColumnIndex(columnName)); } + /** + * @param column the index number of the column to be removed + */ public void removeColumn(int column) { int newCount = columns.length - 1;