mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
Merge branch 'master' of https://github.com/processing/processing.git
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
@@ -1647,6 +1647,10 @@ public class PShape implements PConstants {
|
||||
return parent;
|
||||
}
|
||||
|
||||
/**
|
||||
* @webref
|
||||
* @brief Returns the number of children
|
||||
*/
|
||||
public int getChildCount() {
|
||||
return childCount;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user