From b61f3c26b67afa07123301ffb1f233282d240529 Mon Sep 17 00:00:00 2001 From: benfry Date: Sat, 1 Sep 2012 09:26:38 +0000 Subject: [PATCH] add annotations for overrides... starting cleanup of shape --- android/core/src/processing/core/PFont.java | 11 +- android/core/src/processing/core/PImage.java | 1 - app/.settings/org.eclipse.jdt.core.prefs | 30 + .../test/processing/mode/java/UTCompiler.java | 10 +- core/.settings/org.eclipse.jdt.core.prefs | 84 + core/.settings/org.eclipse.jdt.ui.prefs | 53 + core/src/processing/core/PApplet.java | 158 +- core/src/processing/core/PFont.java | 200 +- core/src/processing/core/PGraphicsJava2D.java | 95 +- core/src/processing/core/PImage.java | 378 +- core/src/processing/core/PShape.java | 340 +- core/src/processing/core/PShapeSVG.java | 2 + core/src/processing/core/PVector.java | 239 +- core/src/processing/data/XML.java | 1 + core/src/processing/opengl/FrameBuffer.java | 317 +- core/src/processing/opengl/LinePath.java | 105 +- core/src/processing/opengl/PGL.java | 313 +- core/src/processing/opengl/PGraphics2D.java | 69 +- core/src/processing/opengl/PGraphics3D.java | 260 +- .../processing/opengl/PGraphicsOpenGL.java | 1049 +++-- core/src/processing/opengl/PShader.java | 513 +-- core/src/processing/opengl/PShape2D.java | 121 +- core/src/processing/opengl/PShape3D.java | 28 +- core/src/processing/opengl/PShapeOpenGL.java | 3601 +++++++++-------- core/src/processing/opengl/Texture.java | 961 ++--- core/todo.txt | 52 + todo.txt | 52 + 27 files changed, 4906 insertions(+), 4137 deletions(-) diff --git a/android/core/src/processing/core/PFont.java b/android/core/src/processing/core/PFont.java index 57ec06ab6..0b54778b5 100644 --- a/android/core/src/processing/core/PFont.java +++ b/android/core/src/processing/core/PFont.java @@ -24,16 +24,9 @@ package processing.core; import java.io.*; -import java.lang.reflect.Method; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Set; +import java.util.*; -import android.graphics.Bitmap; -import android.graphics.Canvas; -import android.graphics.Color; -import android.graphics.Paint; -import android.graphics.Typeface; +import android.graphics.*; import android.graphics.Bitmap.Config; /** diff --git a/android/core/src/processing/core/PImage.java b/android/core/src/processing/core/PImage.java index 9174f7e59..d185ead25 100644 --- a/android/core/src/processing/core/PImage.java +++ b/android/core/src/processing/core/PImage.java @@ -26,7 +26,6 @@ package processing.core; import java.io.*; import java.lang.reflect.Method; import java.util.HashMap; -import java.util.Set; import android.graphics.Bitmap; import android.graphics.Bitmap.CompressFormat; diff --git a/app/.settings/org.eclipse.jdt.core.prefs b/app/.settings/org.eclipse.jdt.core.prefs index fa85032c9..1492d704f 100644 --- a/app/.settings/org.eclipse.jdt.core.prefs +++ b/app/.settings/org.eclipse.jdt.core.prefs @@ -1,4 +1,9 @@ eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore +org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull +org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault +org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable +org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve @@ -9,12 +14,15 @@ org.eclipse.jdt.core.compiler.debug.sourceFile=generate org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.autoboxing=ignore +org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning +org.eclipse.jdt.core.compiler.problem.deadCode=ignore org.eclipse.jdt.core.compiler.problem.deprecation=warning org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled org.eclipse.jdt.core.compiler.problem.discouragedReference=warning org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled org.eclipse.jdt.core.compiler.problem.fieldHiding=warning @@ -22,45 +30,67 @@ org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning org.eclipse.jdt.core.compiler.problem.forbiddenReference=error org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning +org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning +org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore +org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled +org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore +org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled org.eclipse.jdt.core.compiler.problem.missingSerialVersion=ignore +org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore +org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error org.eclipse.jdt.core.compiler.problem.nullReference=ignore +org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error +org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore +org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore org.eclipse.jdt.core.compiler.problem.rawTypeReference=ignore +org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore +org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore +org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore +org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore +org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning +org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning +org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=ignore +org.eclipse.jdt.core.compiler.problem.unclosedCloseable=ignore org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled org.eclipse.jdt.core.compiler.problem.unusedImport=warning org.eclipse.jdt.core.compiler.problem.unusedLabel=warning org.eclipse.jdt.core.compiler.problem.unusedLocal=warning +org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning +org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning org.eclipse.jdt.core.compiler.source=1.6 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false diff --git a/app/test/src/test/processing/mode/java/UTCompiler.java b/app/test/src/test/processing/mode/java/UTCompiler.java index 57c39a4ed..ab6d5a695 100644 --- a/app/test/src/test/processing/mode/java/UTCompiler.java +++ b/app/test/src/test/processing/mode/java/UTCompiler.java @@ -10,7 +10,7 @@ import processing.app.exec.ProcessResult; /** * Utility class for compiling single compilationUnits. - * + * * @author Jonathan Feinberg <jdf@pobox.com> * */ @@ -56,8 +56,12 @@ class UTCompiler { java.close(); } try { - return new ProcessHelper("javac", "-sourcepath", tmpdir.getAbsolutePath(), "-cp", - classpath, "-nowarn", "-d", tmpdir.getAbsolutePath(), javaFile.getAbsolutePath()).execute(); + return new ProcessHelper("javac", + "-sourcepath", tmpdir.getAbsolutePath(), + "-cp", classpath, + "-nowarn", + "-d", tmpdir.getAbsolutePath(), + javaFile.getAbsolutePath()).execute(); } catch (InterruptedException e) { throw new RuntimeException(e); } finally { diff --git a/core/.settings/org.eclipse.jdt.core.prefs b/core/.settings/org.eclipse.jdt.core.prefs index d70fc0b09..4dce02721 100644 --- a/core/.settings/org.eclipse.jdt.core.prefs +++ b/core/.settings/org.eclipse.jdt.core.prefs @@ -1,4 +1,9 @@ eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore +org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull +org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault +org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable +org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve @@ -6,8 +11,87 @@ org.eclipse.jdt.core.compiler.compliance=1.6 org.eclipse.jdt.core.compiler.debug.lineNumber=generate org.eclipse.jdt.core.compiler.debug.localVariable=generate org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.autoboxing=ignore +org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning +org.eclipse.jdt.core.compiler.problem.deadCode=ignore +org.eclipse.jdt.core.compiler.problem.deprecation=warning +org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled +org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled +org.eclipse.jdt.core.compiler.problem.discouragedReference=warning +org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore +org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore +org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled +org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore +org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning +org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning +org.eclipse.jdt.core.compiler.problem.forbiddenReference=error +org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning +org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled +org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning +org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning +org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore +org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore +org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning +org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore +org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore +org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled +org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=warning +org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning +org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=disabled +org.eclipse.jdt.core.compiler.problem.missingSerialVersion=ignore +org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore +org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning +org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning +org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore +org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error +org.eclipse.jdt.core.compiler.problem.nullReference=warning +org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error +org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning +org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning +org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore +org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore +org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore +org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore +org.eclipse.jdt.core.compiler.problem.rawTypeReference=ignore +org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning +org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore +org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore +org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore +org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore +org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore +org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled +org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning +org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled +org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled +org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore +org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning +org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled +org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=ignore +org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning +org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore +org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning +org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore +org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore +org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled +org.eclipse.jdt.core.compiler.problem.unusedImport=warning +org.eclipse.jdt.core.compiler.problem.unusedLabel=warning +org.eclipse.jdt.core.compiler.problem.unusedLocal=warning +org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore +org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore +org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled +org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled +org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled +org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning +org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning +org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning org.eclipse.jdt.core.compiler.source=1.6 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=18 diff --git a/core/.settings/org.eclipse.jdt.ui.prefs b/core/.settings/org.eclipse.jdt.ui.prefs index 0d6ea5b9d..18a5c596a 100644 --- a/core/.settings/org.eclipse.jdt.ui.prefs +++ b/core/.settings/org.eclipse.jdt.ui.prefs @@ -1,4 +1,57 @@ eclipse.preferences.version=1 +editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true formatter_profile=_processing formatter_settings_version=12 org.eclipse.jdt.ui.text.custom_code_templates= +sp_cleanup.add_default_serial_version_id=true +sp_cleanup.add_generated_serial_version_id=false +sp_cleanup.add_missing_annotations=true +sp_cleanup.add_missing_deprecated_annotations=false +sp_cleanup.add_missing_methods=false +sp_cleanup.add_missing_nls_tags=false +sp_cleanup.add_missing_override_annotations=true +sp_cleanup.add_missing_override_annotations_interface_methods=false +sp_cleanup.add_serial_version_id=false +sp_cleanup.always_use_blocks=true +sp_cleanup.always_use_parentheses_in_expressions=false +sp_cleanup.always_use_this_for_non_static_field_access=false +sp_cleanup.always_use_this_for_non_static_method_access=false +sp_cleanup.convert_to_enhanced_for_loop=false +sp_cleanup.correct_indentation=false +sp_cleanup.format_source_code=false +sp_cleanup.format_source_code_changes_only=false +sp_cleanup.make_local_variable_final=false +sp_cleanup.make_parameters_final=false +sp_cleanup.make_private_fields_final=true +sp_cleanup.make_type_abstract_if_missing_method=false +sp_cleanup.make_variable_declarations_final=false +sp_cleanup.never_use_blocks=false +sp_cleanup.never_use_parentheses_in_expressions=true +sp_cleanup.on_save_use_additional_actions=true +sp_cleanup.organize_imports=false +sp_cleanup.qualify_static_field_accesses_with_declaring_class=false +sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true +sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true +sp_cleanup.qualify_static_member_accesses_with_declaring_class=false +sp_cleanup.qualify_static_method_accesses_with_declaring_class=false +sp_cleanup.remove_private_constructors=true +sp_cleanup.remove_trailing_whitespaces=true +sp_cleanup.remove_trailing_whitespaces_all=true +sp_cleanup.remove_trailing_whitespaces_ignore_empty=false +sp_cleanup.remove_unnecessary_casts=false +sp_cleanup.remove_unnecessary_nls_tags=false +sp_cleanup.remove_unused_imports=false +sp_cleanup.remove_unused_local_variables=false +sp_cleanup.remove_unused_private_fields=true +sp_cleanup.remove_unused_private_members=false +sp_cleanup.remove_unused_private_methods=true +sp_cleanup.remove_unused_private_types=true +sp_cleanup.sort_members=false +sp_cleanup.sort_members_all=false +sp_cleanup.use_blocks=false +sp_cleanup.use_blocks_only_for_return_and_throw=false +sp_cleanup.use_parentheses_in_expressions=false +sp_cleanup.use_this_for_non_static_field_access=false +sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true +sp_cleanup.use_this_for_non_static_method_access=false +sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true diff --git a/core/src/processing/core/PApplet.java b/core/src/processing/core/PApplet.java index 62afe6dc7..06a20bf17 100644 --- a/core/src/processing/core/PApplet.java +++ b/core/src/processing/core/PApplet.java @@ -813,6 +813,7 @@ public class PApplet extends Applet * Applet initialization. This can do GUI work because the components have * not been 'realized' yet: things aren't visible, displayed, etc. */ + @Override public void init() { // println("init() called " + Integer.toHexString(hashCode())); // using a local version here since the class variable is deprecated @@ -882,6 +883,7 @@ public class PApplet extends Applet // addListeners(); // 2.0a6 // moved out of addListeners() in 2.0a6 addComponentListener(new ComponentAdapter() { + @Override public void componentResized(ComponentEvent e) { Component c = e.getComponent(); //System.out.println("componentResized() " + c); @@ -947,6 +949,7 @@ public class PApplet extends Applet * Called explicitly via the first call to PApplet.paint(), because * PAppletGL needs to have a usable screen before getting things rolling. */ + @Override public void start() { debug("start() called"); // new Exception().printStackTrace(System.out); @@ -976,6 +979,7 @@ public class PApplet extends Applet * when or if stop() will be called (i.e. on browser quit, * or when moving between web pages), and it's not always called. */ + @Override public void stop() { // this used to shut down the sketch, but that code has // been moved to destroy/dispose() @@ -1036,6 +1040,7 @@ public class PApplet extends Applet * no guarantees on when they're run (on browser quit, or * when moving between pages), though. */ + @Override public void destroy() { this.dispose(); } @@ -1710,11 +1715,13 @@ public class PApplet extends Applet // . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + @Override public void update(Graphics screen) { paint(screen); } + @Override public void paint(Graphics screen) { // int r = (int) random(10000); // System.out.println("into paint " + r); @@ -3349,6 +3356,7 @@ public class PApplet extends Applet */ public void thread(final String name) { Thread later = new Thread() { + @Override public void run() { method(name); } @@ -5015,6 +5023,7 @@ public class PApplet extends Applet this.vessel = vessel; } + @Override public void run() { while (requestImageCount == requestImageMax) { try { @@ -9013,6 +9022,7 @@ public class PApplet extends Applet public void setupExternalMessages() { frame.addComponentListener(new ComponentAdapter() { + @Override public void componentMoved(ComponentEvent e) { Point where = ((Frame) e.getSource()).getLocation(); System.err.println(PApplet.EXTERNAL_MOVE + " " + @@ -9022,6 +9032,7 @@ public class PApplet extends Applet }); frame.addWindowListener(new WindowAdapter() { + @Override public void windowClosing(WindowEvent e) { // System.err.println(PApplet.EXTERNAL_QUIT); // System.err.flush(); // important @@ -9039,6 +9050,7 @@ public class PApplet extends Applet public void setupFrameResizeListener() { frame.addComponentListener(new ComponentAdapter() { + @Override public void componentResized(ComponentEvent e) { // Ignore bad resize events fired during setup to fix // http://dev.processing.org/bugs/show_bug.cgi?id=341 @@ -9497,6 +9509,7 @@ public class PApplet extends Applet Label label = new Label("stop"); label.setForeground(stopColor); label.addMouseListener(new MouseAdapter() { + @Override public void mousePressed(MouseEvent e) { System.exit(0); } @@ -9588,6 +9601,7 @@ public class PApplet extends Applet } else { // !external frame.addWindowListener(new WindowAdapter() { + @Override public void windowClosing(WindowEvent e) { System.exit(0); } @@ -13992,7 +14006,7 @@ public class PApplet extends Applet * PGraphicsJava2D, or resized image data and OpenGL texture indices for * PGraphicsOpenGL. * @param renderer The PGraphics renderer associated to the image - * @param storage The metadata required by the renderer + * @param storage The metadata required by the renderer */ public void setCache(PGraphics renderer, Object storage) { if (recorder != null) recorder.setCache(renderer, storage); @@ -14027,7 +14041,7 @@ public class PApplet extends Applet * Store parameters for a renderer that requires extra metadata of * some kind. * @param renderer The PGraphics renderer associated to the image - * @param storage The parameters required by the renderer + * @param storage The parameters required by the renderer */ public void setParams(PGraphics renderer, Object params) { if (recorder != null) recorder.setParams(renderer, params); @@ -14057,26 +14071,26 @@ public class PApplet extends Applet /** * ( begin auto-generated from PImage_get.xml ) - * - * Reads the color of any pixel or grabs a section of an image. If no - * parameters are specified, the entire image is returned. Use the x - * and y parameters to get the value of one pixel. Get a section of - * the display window by specifying an additional width and - * height parameter. When getting an image, the x and - * y parameters define the coordinates for the upper-left corner of + * + * Reads the color of any pixel or grabs a section of an image. If no + * parameters are specified, the entire image is returned. Use the x + * and y parameters to get the value of one pixel. Get a section of + * the display window by specifying an additional width and + * height parameter. When getting an image, the x and + * y parameters define the coordinates for the upper-left corner of * the image, regardless of the current imageMode().
*
- * If the pixel requested is outside of the image window, black is - * returned. The numbers returned are scaled according to the current color - * ranges, but only RGB values are returned by this function. For example, - * even though you may have drawn a shape with colorMode(HSB), the + * If the pixel requested is outside of the image window, black is + * returned. The numbers returned are scaled according to the current color + * ranges, but only RGB values are returned by this function. For example, + * even though you may have drawn a shape with colorMode(HSB), the * numbers returned will be in RGB format.
*
- * Getting the color of a single pixel with get(x, y) is easy, but - * not as fast as grabbing the data directly from pixels[]. The - * equivalent statement to get(x, y) using pixels[] is + * Getting the color of a single pixel with get(x, y) is easy, but + * not as fast as grabbing the data directly from pixels[]. The + * equivalent statement to get(x, y) using pixels[] is * pixels[y*width+x]. See the reference for pixels[] for more information. - * + * * ( end auto-generated ) * *

Advanced

@@ -14096,7 +14110,7 @@ public class PApplet extends Applet * is inside the bounds, and then has to check to see what image * type it is. If you want things to be more efficient, access the * pixels[] array directly. - * + * * @webref image:pixels * @brief Reads the color of any pixel or grabs a rectangle of pixels * @usage web_application @@ -14130,25 +14144,25 @@ public class PApplet extends Applet /** * ( begin auto-generated from PImage_set.xml ) - * - * Changes the color of any pixel or writes an image directly into the + * + * Changes the color of any pixel or writes an image directly into the * display window.
*
- * The x and y parameters specify the pixel to change and the - * color parameter specifies the color value. The color parameter is - * affected by the current color mode (the default is RGB values from 0 to - * 255). When setting an image, the x and y parameters define - * the coordinates for the upper-left corner of the image, regardless of + * The x and y parameters specify the pixel to change and the + * color parameter specifies the color value. The color parameter is + * affected by the current color mode (the default is RGB values from 0 to + * 255). When setting an image, the x and y parameters define + * the coordinates for the upper-left corner of the image, regardless of * the current imageMode(). *

- * Setting the color of a single pixel with set(x, y) is easy, but - * not as fast as putting the data directly into pixels[]. The - * equivalent statement to set(x, y, #000000) using pixels[] - * is pixels[y*width+x] = #000000. See the reference for + * Setting the color of a single pixel with set(x, y) is easy, but + * not as fast as putting the data directly into pixels[]. The + * equivalent statement to set(x, y, #000000) using pixels[] + * is pixels[y*width+x] = #000000. See the reference for * pixels[] for more information. - * + * * ( end auto-generated ) - * + * * @webref image:pixels * @brief writes a color to any pixel or writes an image into another * @usage web_application @@ -14181,18 +14195,18 @@ public class PApplet extends Applet /** * ( begin auto-generated from PImage_mask.xml ) - * - * Masks part of an image from displaying by loading another image and - * using it as an alpha channel. This mask image should only contain - * grayscale data, but only the blue color channel is used. The mask image + * + * Masks part of an image from displaying by loading another image and + * using it as an alpha channel. This mask image should only contain + * grayscale data, but only the blue color channel is used. The mask image * needs to be the same size as the image to which it is applied.
*
- * In addition to using a mask image, an integer array containing the alpha - * channel data can be specified directly. This method is useful for - * creating dynamically generated alpha masks. This array must be of the - * same length as the target image's pixels array and should contain only + * In addition to using a mask image, an integer array containing the alpha + * channel data can be specified directly. This method is useful for + * creating dynamically generated alpha masks. This array must be of the + * same length as the target image's pixels array and should contain only * grayscale data of values between 0-255. - * + * * ( end auto-generated ) * *

Advanced

@@ -14237,31 +14251,31 @@ public class PApplet extends Applet /** * ( begin auto-generated from PImage_filter.xml ) - * - * Filters an image as defined by one of the following modes:

THRESHOLD - converts the image to black and white pixels depending if - * they are above or below the threshold defined by the level parameter. - * The level must be between 0.0 (black) and 1.0(white). If no level is + * + * Filters an image as defined by one of the following modes:

THRESHOLD - converts the image to black and white pixels depending if + * they are above or below the threshold defined by the level parameter. + * The level must be between 0.0 (black) and 1.0(white). If no level is * specified, 0.5 is used.
*
* GRAY - converts any colors in the image to grayscale equivalents
*
* INVERT - sets each pixel to its inverse value
*
- * POSTERIZE - limits each channel of the image to the number of colors + * POSTERIZE - limits each channel of the image to the number of colors * specified as the level parameter
*
- * BLUR - executes a Guassian blur with the level parameter specifying the - * extent of the blurring. If no level parameter is used, the blur is + * BLUR - executes a Guassian blur with the level parameter specifying the + * extent of the blurring. If no level parameter is used, the blur is * equivalent to Guassian blur of radius 1
*
* OPAQUE - sets the alpha channel to entirely opaque
*
- * ERODE - reduces the light areas with the amount defined by the level + * ERODE - reduces the light areas with the amount defined by the level * parameter
*
* DILATE - increases the light areas with the amount defined by the level parameter - * + * * ( end auto-generated ) * *

Advanced

@@ -14296,17 +14310,17 @@ public class PApplet extends Applet /** * ( begin auto-generated from PImage_copy.xml ) - * - * Copies a region of pixels from one image into another. If the source and - * destination regions aren't the same size, it will automatically resize - * source pixels to fit the specified target region. No alpha information - * is used in the process, however if the source image has an alpha channel + * + * Copies a region of pixels from one image into another. If the source and + * destination regions aren't the same size, it will automatically resize + * source pixels to fit the specified target region. No alpha information + * is used in the process, however if the source image has an alpha channel * set, it will be copied as well. *

* As of release 0149, this function ignores imageMode(). - * + * * ( end auto-generated ) - * + * * @webref image:pixels * @brief Copies the entire image * @usage web_application @@ -14341,11 +14355,11 @@ public class PApplet extends Applet /** * ( begin auto-generated from blendColor.xml ) - * - * Blends two color values together based on the blending mode given as the - * MODE parameter. The possible modes are described in the reference + * + * Blends two color values together based on the blending mode given as the + * MODE parameter. The possible modes are described in the reference * for the blend() function. - * + * * ( end auto-generated ) *

Advanced

*