Serialized Form


Package processing.core

Class processing.core.PApplet extends java.applet.Applet implements Serializable

Serialized Fields

g

PGraphics g
The PGraphics renderer associated with this PApplet


frame

java.awt.Frame frame
The frame containing this applet (if any)


screen

java.awt.Dimension screen
The screen size when the applet was started.

Access this via screen.width and screen.height. To make an applet run at full screen, use size(screen.width, screen.height).

If you have multiple displays, this will be the size of the main display. Running full screen across multiple displays isn't particularly supported, and requires more monkeying with the values. This probably can't/won't be fixed until/unless I get a dual head system.

Note that this won't update if you change the resolution of your screen once the the applet is running.

This variable is not static, because future releases need to be better at handling multiple displays.


recorder

PGraphics recorder
A leech graphics object that is echoing all events.


args

java.lang.String[] args
Command line options passed in from main().

This does not include the arguments passed in to PApplet itself.


sketchPath

java.lang.String sketchPath
Path to sketch folder


defaultSize

boolean defaultSize
true if no size() command has been executed. This is used to wait until a size has been set before placing in the window and showing it.


resizeRequest

boolean resizeRequest

resizeWidth

int resizeWidth

resizeHeight

int resizeHeight

pixels

int[] pixels
Pixel buffer from this applet's PGraphics.

When used with OpenGL or Java2D, this value will be null until loadPixels() has been called.


width

int width
width of this applet's associated PGraphics


height

int height
height of this applet's associated PGraphics


mouseX

int mouseX
current x position of the mouse


mouseY

int mouseY
current y position of the mouse


pmouseX

int pmouseX
Previous x/y position of the mouse. This will be a different value when inside a mouse handler (like the mouseMoved() method) versus when inside draw(). Inside draw(), pmouseX is updated once each frame, but inside mousePressed() and friends, it's updated each time an event comes through. Be sure to use only one or the other type of means for tracking pmouseX and pmouseY within your sketch, otherwise you're gonna run into trouble.


pmouseY

int pmouseY
Previous x/y position of the mouse. This will be a different value when inside a mouse handler (like the mouseMoved() method) versus when inside draw(). Inside draw(), pmouseX is updated once each frame, but inside mousePressed() and friends, it's updated each time an event comes through. Be sure to use only one or the other type of means for tracking pmouseX and pmouseY within your sketch, otherwise you're gonna run into trouble.


dmouseX

int dmouseX
previous mouseX/Y for the draw loop, separated out because this is separate from the pmouseX/Y when inside the mouse event handlers.


dmouseY

int dmouseY
previous mouseX/Y for the draw loop, separated out because this is separate from the pmouseX/Y when inside the mouse event handlers.


emouseX

int emouseX
pmouseX/Y for the event handlers (mousePressed(), mouseDragged() etc) these are different because mouse events are queued to the end of draw, so the previous position has to be updated on each event, as opposed to the pmouseX/Y that's used inside draw, which is expected to be updated once per trip through draw().


emouseY

int emouseY
pmouseX/Y for the event handlers (mousePressed(), mouseDragged() etc) these are different because mouse events are queued to the end of draw, so the previous position has to be updated on each event, as opposed to the pmouseX/Y that's used inside draw, which is expected to be updated once per trip through draw().


firstMouse

boolean firstMouse
Used to set pmouseX/Y to mouseX/Y the first time mouseX/Y are used, otherwise pmouseX/Y are always zero, causing a nasty jump.

Just using (frameCount == 0) won't work since mouseXxxxx() may not be called until a couple frames into things.


mouseButton

int mouseButton
Last mouse button pressed, one of LEFT, CENTER, or RIGHT.

If running on Mac OS, a ctrl-click will be interpreted as the righthand mouse button (unlike Java, which reports it as the left mouse).


mousePressed

boolean mousePressed

mouseEvent

java.awt.event.MouseEvent mouseEvent

key

char key
Last key pressed.

If it's a coded key, i.e. UP/DOWN/CTRL/SHIFT/ALT, this will be set to CODED (0xffff or 65535).


keyCode

int keyCode
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 can be obtained from java.awt.event.KeyEvent, from the VK_XXXX variables.


keyPressed

boolean keyPressed
true if the mouse is currently pressed.


keyEvent

java.awt.event.KeyEvent keyEvent
the last KeyEvent object passed into a mouse function.


focused

boolean focused
Gets set to true/false as the applet gains/loses focus.


online

boolean online
true if the applet is online.

This can be used to test how the applet should behave since online situations are different (no file writing, etc).


millisOffset

long millisOffset
Time in milliseconds when the applet was started.

Used by the millis() function.


frameRate

float frameRate
The current value of frames per second.

The initial value will be 10 fps, and will be updated with each frame thereafter. The value is not instantaneous (since that wouldn't be very useful since it would jump around so much), but is instead averaged (integrated) over several frames. As such, this value won't be valid until after 5-10 frames.


frameRateLastNanos

long frameRateLastNanos
Last time in nanoseconds that frameRate was checked


frameRateTarget

float frameRateTarget
As of release 0116, frameRate(60) is called as a default


frameRatePeriod

long frameRatePeriod

looping

boolean looping

redraw

boolean redraw
flag set to true when a redraw is asked for by the user


frameCount

int frameCount
How many frames have been displayed since the applet started.

This value is read-only do not attempt to set it, otherwise bad things will happen.

Inside setup(), frameCount is 0. For the first iteration of draw(), frameCount will equal 1.


finished

boolean finished
true if this applet has had it.


exitCalled

boolean exitCalled
true if exit() has been called so that things shut down once the main thread kicks off.


thread

java.lang.Thread thread

sizeMethods

PApplet.RegisteredMethods sizeMethods

preMethods

PApplet.RegisteredMethods preMethods

drawMethods

PApplet.RegisteredMethods drawMethods

postMethods

PApplet.RegisteredMethods postMethods

mouseEventMethods

PApplet.RegisteredMethods mouseEventMethods

keyEventMethods

PApplet.RegisteredMethods keyEventMethods

disposeMethods

PApplet.RegisteredMethods disposeMethods

external

boolean external
true if this sketch is being run by the PDE


mouseEventQueue

java.awt.event.MouseEvent[] mouseEventQueue

mouseEventCount

int mouseEventCount

keyEventQueue

java.awt.event.KeyEvent[] keyEventQueue

keyEventCount

int keyEventCount

cursorType

int cursorType

cursorVisible

boolean cursorVisible

invisibleCursor

PImage invisibleCursor

internalRandom

java.util.Random internalRandom

perlin_octaves

int perlin_octaves

perlin_amp_falloff

float perlin_amp_falloff

perlin_TWOPI

int perlin_TWOPI

perlin_PI

int perlin_PI

perlin_cosTable

float[] perlin_cosTable

perlin

float[] perlin

perlinRandom

java.util.Random perlinRandom

loadImageFormats

java.lang.String[] loadImageFormats

requestImageMax

int requestImageMax
By trial and error, four image loading threads seem to work best when loading images from online. This is consistent with the number of open connections that web browsers will maintain. The variable is made public (however no accessor has been added since it's esoteric) if you really want to have control over the value used. For instance, when loading local files, it might be better to only have a single thread (or two) loading images so that you're disk isn't simply jumping around.


requestImageCount

int requestImageCount

selectedFile

java.io.File selectedFile

parentFrame

java.awt.Frame parentFrame

Class processing.core.PApplet.RendererChangeException extends java.lang.RuntimeException implements Serializable


Package processing.xml

Class processing.xml.XMLElement extends java.lang.Object implements Serializable

Serialized Fields

parent

XMLElement parent
The parent element.


attributes

java.util.Vector<E> attributes
The attributes of the element.


children

java.util.Vector<E> children
The child elements.


name

java.lang.String name
The name of the element.


fullName

java.lang.String fullName
The full name of the element.


namespace

java.lang.String namespace
The namespace URI.


content

java.lang.String content
The content of the element.


systemID

java.lang.String systemID
The system ID of the source data where this element is located.


lineNr

int lineNr
The line in the source data where this element starts.

Class processing.xml.XMLException extends java.lang.Exception implements Serializable

Serialized Fields

msg

java.lang.String msg
The message of the exception.


systemID

java.lang.String systemID
The system ID of the XML data where the exception occurred.


lineNr

int lineNr
The line number in the XML data where the exception occurred.


encapsulatedException

java.lang.Exception encapsulatedException
Encapsulated exception.

Class processing.xml.XMLParseException extends XMLException implements Serializable

Class processing.xml.XMLValidationException extends XMLException implements Serializable

Serialized Fields

elementName

java.lang.String elementName
The name of the element where the exception occurred.


attributeName

java.lang.String attributeName
The name of the attribute where the exception occurred.


attributeValue

java.lang.String attributeValue
The value of the attribute where the exception occurred.