diff --git a/core/src/processing/core/PApplet.java b/core/src/processing/core/PApplet.java index be34e5ce4..9e942b484 100644 --- a/core/src/processing/core/PApplet.java +++ b/core/src/processing/core/PApplet.java @@ -81,7 +81,7 @@ import processing.opengl.*; * project of our (tiny) size, we should be focusing on the future, rather * than working around legacy Java code. */ -@SuppressWarnings({"unused", "FinalStaticMethod"}) +@SuppressWarnings({"unused", "FinalStaticMethod", "ManualMinMaxCalculation"}) public class PApplet implements PConstants { //public class PApplet extends PSketch { // possible in the next alpha /** Full name of the Java version (i.e. 1.5.0_11). */ @@ -454,7 +454,7 @@ public class PApplet implements PConstants { * *

Advanced:

* - * If running on Mac OS, a ctrl-click will be interpreted as the right-hand + * If running on macOS, a ctrl-click will be interpreted as the right-hand * mouse button (unlike Java, which reports it as the left mouse). * @webref input:mouse * @webBrief Shows which mouse button is pressed @@ -567,10 +567,10 @@ public class PApplet implements PConstants { * KeyEvent * reference. *

- * There are issues with how keyCode behaves across different renderers - * and operating systems. Watch out for unexpected behavior as you switch - * renderers and operating systems and you are using keys are aren't mentioned - * in this reference entry. + * There are issues with how keyCode behaves across different + * renderers and operating systems. Watch out for unexpected behavior + * as you switch renderers and operating systems, and also whenever + * you are using keys not mentioned in this reference entry. *

* If you are using P2D or P3D as your renderer, use the * NEWT KeyEvent constants. @@ -580,7 +580,7 @@ public class PApplet implements PConstants { * When "key" is set to CODED, this will contain a Java key code. *

* For the arrow keys, keyCode will be one of UP, DOWN, LEFT and RIGHT. - * Also available are ALT, CONTROL and SHIFT. A full set of constants + * ALT, CONTROL and SHIFT are also available. A full set of constants * can be obtained from java.awt.event.KeyEvent, from the VK_XXXX variables. * * @webref input:keyboard @@ -656,9 +656,9 @@ public class PApplet implements PConstants { protected boolean redraw = true; /** - * The system variable frameCount contains the number of frames - * displayed since the program started. Inside setup() the value is - * 0 and and after the first iteration of draw it is 1, etc. + * The system variable frameCount contains the number o + * frames displayed since the program started. Inside setup() + * the value is 0 and during the first iteration of draw it is 1, etc. * * @webref environment * @webBrief The system variable that contains the number of frames @@ -802,7 +802,7 @@ public class PApplet implements PConstants { /** * @param method "size" or "fullScreen" - * @param args parameters passed to the function so we can show the user + * @param args parameters passed to the function to show the user * @return true if safely inside the settings() method */ boolean insideSettings(String method, Object... args) { @@ -890,32 +890,31 @@ public class PApplet implements PConstants { /** - * - * The settings() function is new with Processing 3.0. - * It's not needed in most sketches. It's only useful when it's - * absolutely necessary to define the parameters to size() - * with a variable. Alternately, the settings() function - * is necessary when using Processing code outside of the - * Processing Development Environment (PDE). For example, when - * using the Eclipse code editor, it's necessary to use - * settings() to define the size() and - * smooth() values for a sketch.. - *

- * The settings() method runs before the sketch has been - * set up, so other Processing functions cannot be used at that - * point. For instance, do not use loadImage() inside settings(). - * The settings() method runs "passively" to set a few variables, - * compared to the setup() command that call commands in - * the Processing API. - * - * @webref environment - * @webBrief Used when absolutely necessary to define the parameters to size() - * with a variable - * @see PApplet#fullScreen() - * @see PApplet#setup() - * @see PApplet#size(int,int) - * @see PApplet#smooth() - */ + * The settings() function is new with Processing 3.0. + * It's not needed in most sketches. It's only useful when it's + * absolutely necessary to define the parameters to size() + * with a variable. Alternately, the settings() function + * is necessary when using Processing code outside the + * Processing Development Environment (PDE). For example, when + * using the Eclipse code editor, it's necessary to use + * settings() to define the size() and + * smooth() values for a sketch.. + *

+ * The settings() method runs before the sketch has been + * set up, so other Processing functions cannot be used at that + * point. For instance, do not use loadImage() inside settings(). + * The settings() method runs "passively" to set a few variables, + * compared to the setup() command that call commands in + * the Processing API. + * + * @webref environment + * @webBrief Used when absolutely necessary to define the parameters to size() + * with a variable + * @see PApplet#fullScreen() + * @see PApplet#setup() + * @see PApplet#size(int,int) + * @see PApplet#smooth() + */ public void settings() { // is this necessary? (doesn't appear to be, so removing) //size(DEFAULT_WIDTH, DEFAULT_HEIGHT, JAVA2D); @@ -1038,21 +1037,20 @@ public class PApplet implements PConstants { /** - * This function is new with Processing 3.0. It makes it - * possible for Processing to render using all of the - * pixels on high resolutions screens like Apple Retina - * displays and Windows High-DPI displays. This function - * can only be run once within a program and it must be - * used right after size() in a program without a setup() - * and used within setup() when a program has one. The + * This function makes it possible to render using all the pixels + * on high resolutions screens like Apple Retina and Windows HiDPI. + * This function can only be run once within a program, and must + * be called right after size() in a program without a + * setup() function, or within setup() if present. + * * pixelDensity() should only be used with hardcoded * numbers (in almost all cases this number will be 2) * or in combination with displayDensity() as in the * third example above. * - * When the pixel density is set to more than 1, it - * changes all of the pixel operations including the way - * get(), set(), blend(), copy(), and updatePixels() + * When the pixel density is set to more than 1, it changes the + * pixel operations including the way get(), set(), + * blend(), copy(), and updatePixels() * all work. See the reference for pixelWidth and * pixelHeight for more information. * @@ -1062,7 +1060,7 @@ public class PApplet implements PConstants { * about this on the settings() reference page. * * @webref environment - * @webBrief It makes it possible for Processing to render using all of the + * @webBrief It makes it possible for Processing to render using all the * pixels on high resolutions screens * @param density 1 or 2 * @see PApplet#pixelWidth @@ -1370,7 +1368,7 @@ public class PApplet implements PConstants { } else { t = e; } - // check for RuntimeException, and allow to bubble up + // check for RuntimeException, and allow it to bubble up if (t instanceof RuntimeException) { // re-throw exception throw (RuntimeException) t; @@ -1411,7 +1409,7 @@ public class PApplet implements PConstants { entries.remove(object); methods.remove(object); } else { - // Currently iterating the list of methods, remove this afterwards + // Iterates the list of methods, remove this afterwards removals.add(object); } }