|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ProcessingInterface
This interface defines all the methods required to write a standalone Mobile Processing implementation which can be integrated with J2ME Polish. The methods defined within include the Mobile Processing methods as defined by the specs, extension methods specific to J2ME Polish and a set of system methods to be used for integrating J2ME Polish and the Mobile Processing implementation.
| Field Summary | |
|---|---|
static int |
CENTER
|
static int |
CENTER_RADIUS
|
static int |
CORNER
|
static int |
CORNERS
|
static int |
DOWN
|
static int |
FACE_MONOSPACE
|
static int |
FACE_PROPORTIONAL
|
static int |
FACE_SYSTEM
|
static int |
FIRE
|
static int |
GAME_A
|
static int |
GAME_B
|
static int |
GAME_C
|
static int |
GAME_D
|
static int |
HSB
|
static int |
LEFT
|
static int |
LINE_LOOP
|
static int |
LINE_STRIP
|
static int |
LINES
|
static int |
POINTS
|
static int |
POLYGON
|
static Vector |
processingContextObjects
A vector that keeps track of all objects that implement ProcessingInterface. |
static int |
QUAD_STRIP
|
static int |
QUADS
|
static int |
RGB
|
static int |
RIGHT
|
static int |
SEND
|
static int |
SIZE_LARGE
|
static int |
SIZE_MEDIUM
|
static int |
SIZE_SMALL
|
static int |
SOFTKEY1
|
static int |
SOFTKEY2
|
static int |
STYLE_BOLD
|
static int |
STYLE_ITALIC
|
static int |
STYLE_PLAIN
|
static int |
STYLE_UNDERLINED
|
static int |
TRIANGLE_STRIP
|
static int |
TRIANGLES
|
static int |
UP
|
| Method Summary | |
|---|---|
int |
abs(int value)
Calculates the absolute value (magnitude) of a number. |
boolean[] |
append(boolean[] array,
boolean element)
Expands an array by one element and adds data to the new position. |
byte[] |
append(byte[] array,
byte element)
Expands an array by one element and adds data to the new position. |
char[] |
append(char[] array,
char element)
Expands an array by one element and adds data to the new position. |
double[] |
append(double[] array,
double element)
Expands an array by one element and adds data to the new position. |
float[] |
append(float[] array,
float element)
Expands an array by one element and adds data to the new position. |
int[] |
append(int[] array,
int element)
Expands an array by one element and adds data to the new position. |
String[] |
append(String[] array,
String element)
Expands an array by one element and adds data to the new position. |
boolean |
areKeypressesCaptured()
Checks if keypress events should be captured and handled solely by the Mobile Processing implementation, or if they should also be bubbled up to the parent container and above. |
boolean |
arePointerEventsCaptured()
Checks if pointer events should be captured and handled solely by the Mobile Processing implementation, or if they should also be bubbled up to the parent container and above. |
boolean |
areSoftkeysCaptured()
Checks if softkey presses should be captured and handled solely by the Mobile Processing implementation, or if they should also be bubbled up to the parent container and above. |
double |
atan(double value1)
Returns the arc tangent of a value. |
int |
atan(int value1)
Returns the arc tangent of a value. |
int |
atan2(int x,
int y)
Calculates the angle (in radians) from a specified point to the coordinate origin as measured from the positive x-axis. |
double |
atan2d(int x,
int y)
Calculates the angle (in radians) from a specified point to the coordinate origin as measured from the positive x-axis. |
void |
background(color color)
Sets the color to use as a background color. |
void |
background(int gray)
Sets the shade of gray to be used as a background color. |
void |
background(int value1,
int value2,
int value3)
Sets the color to use as a background color. |
void |
background(PImage img)
Sets the image to be used as a background. |
void |
beginShape(int mode)
Using the beginShape() and endShape() functions allow creating more complex forms. |
void |
bezier(int x1,
int y1,
int x2,
int y2,
int x3,
int y3,
int x4,
int y4)
Draws a Bezier curve on the screen. |
void |
bezierVertex(int x1,
int y1,
int x2,
int y2,
int x3,
int y3)
Specifies vertex coordinates for Bezier curves. |
void |
captureKeyPresses()
Signals that keypress events should be captured (such events should not be bubbled to the parent container and above anymore). |
void |
capturePointerEvents()
Signals that pointer events should be captured (such events should not be bubbled to the parent container and above anymore). |
void |
captureSoftkeys()
Signals that softkey presses should be captured (such events should not be bubbled to the parent container and above anymore). |
int |
ceil(int value1)
Calculates the closest int fixed point value that is greater than or equal to the fixed point value of the parameter. |
boolean |
checkForRefresh()
Checks if a refresh is needed since the last time the function was called. |
color |
color(int gray)
Creates colors for storing in variables of the color datatype. |
color |
color(int gray,
int alpha)
Creates colors for storing in variables of the color datatype. |
color |
color(int value1,
int value2,
int value3,
int alpha)
Creates colors for storing in variables of the color datatype. |
void |
colorMode(int mode)
Changes the way Processing interprets color data (by using either the RGB or the HSB color spaces). |
void |
colorMode(int mode,
int range)
Changes the way Processing interprets color data (by using either the RGB or the HSB color spaces). |
void |
colorMode(int mode,
int range1,
int range2,
int range3)
Changes the way Processing interprets color data (by using either the RGB or the HSB color spaces). |
boolean[] |
concat(boolean[] array1,
boolean[] array2)
Concatenates two arrays. |
byte[] |
concat(byte[] array1,
byte[] array2)
Concatenates two arrays. |
char[] |
concat(char[] array1,
char[] array2)
Concatenates two arrays. |
int[] |
concat(int[] array1,
int[] array2)
Concatenates two arrays. |
String[] |
concat(String[] array1,
String[] array2)
Concatenates two arrays. |
int |
constrain(int value,
int min,
int max)
Constrains a value to not exceed a maximum and minimum value. |
boolean[] |
contract(boolean[] array,
int newSize)
Decreases the size of an array |
byte[] |
contract(byte[] array,
int newSize)
Decreases the size of an array |
char[] |
contract(char[] array,
int newSize)
Decreases the size of an array |
int[] |
contract(int[] array,
int newSize)
Decreases the size of an array |
String[] |
contract(String[] array,
int newSize)
Decreases the size of an array |
int |
cos(int rad)
Calculates the cosine of an angle. |
double |
cosd(double rad)
Calculates the cosine of an angle. |
int |
currentMemory()
Returns an estimate of the current amount of free memory in the system, in bytes. |
void |
curve(int x1,
int y1,
int x2,
int y2,
int x3,
int y3,
int x4,
int y4)
Draws a curved line on the screen. |
void |
curveVertex(int x,
int y)
Specifies vertex coordinates for curves. |
int |
day()
The day() function returns the current day as a value from 1 - 31. |
void |
destroy()
Event handler that is called once when the sketch is about to be ended. |
void |
disableFastDrawing()
Disable fast drawing. |
int |
dist_fp(int x1,
int y1,
int x2,
int y2)
Calculates the distance between two points, with coordinates specified as fixed-point numbers. |
int |
dist(int x1,
int y1,
int x2,
int y2)
Calculates the distance between two points, with coordinates specified as integer numbers. |
int |
div(int dividend,
int divisor)
Divides the value of the second fixed point parameter by the value of the first fixed point parameter. |
void |
dontRepaintBackground()
Stops repainting the background between frames. |
void |
draw()
Called directly after setup() and continuously executes the lines of code contained inside its block until the program is stopped or noLoop() is called. |
void |
ellipse(int x,
int y,
int width,
int height)
Draws an ellipse (oval) in the display window. |
void |
ellipseMode(int mode)
The origin of the ellipse is modified by the ellipseMode() function. |
void |
enableFastDrawing()
Enables fast drawing. |
void |
endShape()
The endShape() function is the companion to beginShape() and may only be called after the later. |
void |
executeInitializationSequence()
Starts the initialization sequence ( calls setup() and other initialization-related tasks ) |
void |
executeRefresh(boolean alsoUpdateLastFrameTime)
Executes a forced refresh by calling draw(). |
void |
exit()
Call this function to stop running your sketch. |
boolean[] |
expand(boolean[] array)
Doubles the size of an array. |
boolean[] |
expand(boolean[] array,
int newSize)
Increases the size of an array to the specified size |
byte[] |
expand(byte[] array)
Doubles the size of an array. |
byte[] |
expand(byte[] array,
int newSize)
Increases the size of an array to the specified size |
char[] |
expand(char[] array)
Doubles the size of an array. |
char[] |
expand(char[] array,
int newSize)
Increases the size of an array to the specified size |
int[] |
expand(int[] array)
Doubles the size of an array. |
int[] |
expand(int[] array,
int newSize)
Increases the size of an array to the specified size |
String[] |
expand(String[] array)
Doubles the size of an array. |
String[] |
expand(String[] array,
int newSize)
Increases the size of an array to the specified size |
void |
fill(color color)
Sets the color used to fill shapes. |
void |
fill(int gray)
Sets the shade of gray to be used to fill shapes. |
void |
fill(int value1,
int value2,
int value3)
Sets the color used to fill shapes. |
int |
floor(int value1)
Calculates the closest int fixed point value that is less than or equal to the fixed point value of the parameter. |
void |
focus()
Event handler for the "has focus" event. |
int |
fptoi(int value1)
Returns the largest integer less than or equal to the specified fixed point value. |
void |
framerate(int framerate)
Specifies the number of frames to be displayed every second. |
Image |
getBuffer()
Returns the image buffer of the Mobile Processing implementation |
long |
getIntervalBetweenFrames()
Returns the time (in milliseconds) between two consecutive frames. |
long |
getLastFrameTime()
Returns the system time at which the last frame was drawn |
String |
getSoftkeyLabel()
Returns the label of the softkey set via softkey(), if any, or null for none. |
int |
getTransparentColor()
Returns the current transparent color (pixels of this color will be replaced with transparent ones when calling getTransparentRgbImage()). |
RgbImage |
getTransparentRgbImage()
Returns the image buffer as an RgbImage, with transparency applied to it. |
int |
hour()
The hour() function returns the current hour as a value from 0 - 23. |
void |
image(PImage img,
int x,
int y)
Draws images to the screen. |
void |
image(PImage img,
int sx,
int sy,
int swidth,
int sheight,
int dx,
int dy)
Diplays images to the screen. |
void |
imageMode(int mode)
The mode to use when displaying images |
boolean |
isDrawingTransparent()
Checks if transparent drawing is active or not |
boolean |
isLooping()
Checks if the Processing draw() routine is called in a loop or not. |
int |
itofp(int value1)
Returns the fixed point representation of the specified integer value. |
String |
join(int[] anyArray,
String separator)
Combines an array of elements into one String. |
String |
join(int[] intArray,
String separator,
int digits)
Combines an array of elements into one String and pads each number with zeroes until it has the specified number of digits. |
String |
join(String[] anyArray,
String separator)
Combines an array of elements into one String. |
void |
keyPressed()
Event handler for when a regular key is pressed. |
void |
keyReleased()
Event handler for when a regular key is released. |
int |
length(boolean[] array)
Returns the length, or size, of an array. |
int |
length(byte[] array)
Returns the length, or size, of an array. |
int |
length(char[] array)
Returns the length, or size, of an array. |
int |
length(int[] array)
Returns the length, or size, of an array. |
int |
length(Object[] array)
Returns the length, or size, of an array. |
void |
line(int x1,
int y1,
int x2,
int y2)
Draws a line (a direct path between two points) to the screen. |
byte[] |
loadBytes(String filename)
Reads the contents of a file and places it in a byte array. |
PFont |
loadFont()
Loads the default font as a PFont object. |
PFont |
loadFont(int face,
int style,
int size)
Load the system font which best corresponds to the specified parameters |
PFont |
loadFont(String fontname)
Loads a J2ME Polish bitmap font into a variable of type PFont. |
PFont |
loadFont(String fontname,
color fgColor)
Loads a J2ME Polish bitmap font into a variable of type PFont. |
PFont |
loadFont(String fontname,
color fgColor,
color bgColor)
Loads a J2ME Polish bitmap font into a variable of type PFont. |
PImage |
loadImage(byte[] data)
Loads an image into a variable of type PImage. |
PImage |
loadImage(String filename)
Loads an image into a variable of type PImage. |
String[] |
loadStrings(String filename)
Reads the contents of a file and creates a String array of its individual lines. |
void |
loop()
Causes Processing to continuously execute the code within draw(). |
void |
lostFocus()
Event handler for the "lost focus" event. |
int |
max(int value1,
int value2)
Returns the maximum of two numbers |
int |
millis()
Returns the number of milliseconds (thousandths of a second) since starting an applet. |
int |
min(int value1,
int value2)
Returns the minimum of two numbers |
int |
minute()
The minute() function returns the current minute as a value from 0 - 59. |
int |
month()
The month() function returns the current month as a value from 1 - 12. |
int |
mul(int value1,
int value2)
Multiplies two fixed point values and returns a fixed point value. |
void |
multitap()
The multitap function will turn on multitap text input. |
void |
multitapClear()
The multitapClear function will clear the multitap input buffer. |
void |
multitapDeleteChar()
The multitapDeleteChar function will delete one character from the multitap buffer at the current index. |
String |
nf(int intValue,
int digits)
Utility function for formatting numbers into strings (with padding). |
String |
nfp(int intValue,
int digits)
Utility function for formatting numbers into strings. |
void |
noFill()
Disables filling geometry. |
void |
noLoop()
Stops Processing from continuously executing the code within draw(). |
void |
noMultitap()
The noMultitap function will turn off multitap text input. |
void |
noStroke()
Disables drawing the stroke (outline). |
void |
opaqueDrawing()
Deactivates transparent drawing. |
InputStream |
openStream(String fileName)
Simplified method to open a Java InputStream. |
void |
point(int x,
int y)
Draws a point on the screen |
void |
pointerDragged()
Event handler for when the pointer is dragged across the screen. |
void |
pointerPressed()
Event handler for when the pointer is pressed. |
void |
pointerReleased()
Event handler for when the pointer has been released (after a press). |
void |
popMatrix()
Pops the current transformation matrix off the matrix stack. |
int |
pow(int base,
int exponent)
Raises a number to a given power. |
void |
print(boolean data)
Outputs the given data to the console. |
void |
print(byte data)
Outputs the given data to the console. |
void |
print(char data)
Outputs the given data to the console. |
void |
print(int data)
Outputs the given data to the console. |
void |
print(Object data)
Outputs the given data to the console. |
void |
print(String data)
Outputs the given data to the console. |
void |
println(boolean data)
Outputs the given data to the console, creating a new line of text. |
void |
println(byte data)
Outputs the given data to the console, creating a new line of text. |
void |
println(char data)
Outputs the given data to the console, creating a new line of text. |
void |
println(int data)
Outputs the given data to the console, creating a new line of text. |
void |
println(Object data)
Outputs the given data to the console, creating a new line of text. |
void |
println(String data)
Outputs the given data to the console, creating a new line of text. |
void |
pushMatrix()
Pushes the current transformation matrix onto the matrix stack. |
void |
quad(int x1,
int y1,
int x2,
int y2,
int x3,
int y3,
int x4,
int y4)
A quad is a quadrilateral, a four sided polygon. |
int |
radians(int angle)
Converts a degree fixed point value measurement to its corresponding fixed point value in radians. |
double |
random(double value)
Generates a random number between 0 and the specified maximum number, excluding the specified number. |
int |
random(int value)
Generates a random number between 0 and the specified maximum number, excluding the specified number. |
int |
random(int value1,
int value2)
Generates a random number in the specified interval. |
void |
rect(int x,
int y,
int width,
int height)
Draws a rectangle to the screen. |
void |
rectMode(int mode)
Modifies the location from which rectangles draw. |
void |
redraw()
Executes the code within draw() one time. |
void |
releaseKeyPresses()
Releases keypress events (resumes bubbling of such events to the parent container and above). |
void |
releasePointerEvents()
Releases pointer events (resumes bubbling of such events to the parent container and above). |
void |
releaseSoftkeys()
Releases softkey events (resumes bubbling of such events to the parent container and above). |
void |
repaintBackground()
Starts/resumes repainting the background between frames. |
int |
reportedMemory()
Returns the reported total amount of memory available. |
void |
resetMatrix()
Replaces the current matrix with the identity matrix. |
void |
resume()
Event handler that is called once when the application has resumed. |
boolean[] |
reverse(boolean[] array)
Reverses an array |
byte[] |
reverse(byte[] array)
Reverses an array |
char[] |
reverse(char[] array)
Reverses an array |
int[] |
reverse(int[] array)
Reverses an array |
String[] |
reverse(String[] array)
Reverses an array |
int |
round(int value1)
Calculates the integer fixed point value closest to the fixed point value parameter. |
void |
saveBytes(String filename,
byte[] data)
Opposite of loadBytes(), will write an entire array of bytes to a file. |
void |
saveStrings(String filename,
String[] strings)
Writes an array of strings to a file, one line per string. |
int |
second()
The second() function returns the current second as a value from 0 - 59. |
void |
setKeyAndKeyCode(char key,
int keyCode)
Sets the key and keyCode variables (which correspond to the last active key) to the given values. |
void |
setParent(ProcessingContextContainerInterface parent)
Sets the parent container of the Mobile Processing implementation |
void |
setPointerCoordinates(int x,
int y)
Sets the pointer coordinates to the given values. |
void |
setTransparentColor(color color)
Sets the transparent color to be used with getTransparentRgbImage(). |
void |
setTransparentColor(int gray)
Sets the transparent color to be used with getTransparentRgbImage(). |
void |
setTransparentColor(int value1,
int value2,
int value3)
Sets the transparent color to be used with getTransparentRgbImage(). |
void |
setup()
Called once when the program is started and every time the size of the sketch changes (eg: when the phone is switched from portrait to landscape). |
boolean[] |
shorten(boolean[] array)
Decreases an array by one element and returns the shortened array. |
byte[] |
shorten(byte[] array)
Decreases an array by one element and returns the shortened array. |
char[] |
shorten(char[] array)
Decreases an array by one element and returns the shortened array. |
int[] |
shorten(int[] array)
Decreases an array by one element and returns the shortened array. |
String[] |
shorten(String[] array)
Decreases an array by one element and returns the shortened array. |
void |
signalApplicationResume()
Signals to the Mobile Processing implementation that the application has been resumed. |
void |
signalApplicationSuspend()
Signals to the Mobile Processing implementation that the application is about to be suspended. |
void |
signalDestroy()
Signals to the Mobile Processing implementation that it is about to be destroyed. |
void |
signalHasFocus()
Signals to the Mobile Processing implementation that it has focus. |
void |
signalInitialization()
Signals to the Mobile Processing implementation that it must initialize itself. |
void |
signalKeyPressed(int keyCode)
Signals to the Mobile Processing implementation that a key has been pressed |
void |
signalKeyReleased(int keyCode)
Signals to the Mobile Processing implementation that a key has been released |
void |
signalLostFocus()
Signals to the Mobile Processing implementation that it lost focus |
void |
signalPointerDragged(int x,
int y)
Signals a pointer dragged event to the Mobile Processing implementation. |
void |
signalPointerPressed(int x,
int y)
Signals a pointer pressed event to the Mobile Processing implementation. |
void |
signalPointerReleased(int x,
int y)
Signals a pointer released event to the Mobile Processing implementation. |
void |
signalSizeChange(int width,
int height)
Signals a size change to the Mobile Processing implementation |
void |
signalSoftkeyPressed(String label)
Signals to the Mobile Processing implementation that a softkey has been pressed. |
int |
sin(int rad)
Calculates the sine of an angle. |
double |
sind(double rad)
Calculates the sine of an angle. |
void |
softkey(String label)
The softkey() function sets up a custom labelled softkey. |
void |
softkeyPressed(String label)
Event handler for sofkey presses. |
boolean[] |
splice(boolean[] array,
boolean[] array2,
int index)
Inserts an array into antoher array. |
boolean[] |
splice(boolean[] array,
boolean value,
int index)
Insert a value into an existing array |
byte[] |
splice(byte[] array,
byte[] array2,
int index)
Inserts an array into antoher array. |
byte[] |
splice(byte[] array,
byte value,
int index)
Insert a value into an existing array |
char[] |
splice(char[] array,
char[] array2,
int index)
Inserts an array into antoher array. |
char[] |
splice(char[] array,
char value,
int index)
Insert a value into an existing array |
int[] |
splice(int[] array,
int[] array2,
int index)
Inserts an array into antoher array. |
int[] |
splice(int[] array,
int value,
int index)
Insert a value into an existing array |
String[] |
splice(String[] array,
String[] array2,
int index)
Inserts an array into antoher array. |
String[] |
splice(String[] array,
String value,
int index)
Insert a value into an existing array |
String[] |
split(String str,
char delim)
Splits a given string into an array of strings, according to the specified delimiter |
String[] |
split(String str,
String delim)
Splits a given string into an array of strings, according to the specified delimiter |
int |
sq(int number)
Squares a number (multiplies a number by itself). |
int |
sqrt(int value_fp)
Calculates the square root of a fixed point value and returns a fixed point value. |
String |
str(boolean val)
Returns a string representation of its parameter. |
String[] |
str(boolean[] val)
Returns a string representation of its parameter. |
String |
str(byte val)
Returns a string representation of its parameter. |
String[] |
str(byte[] val)
Returns a string representation of its parameter. |
String |
str(char val)
Returns a string representation of its parameter. |
String[] |
str(char[] val)
Returns a string representation of its parameter. |
String |
str(int val)
Returns a string representation of its parameter. |
String[] |
str(int[] val)
Returns a string representation of its parameter. |
void |
stroke(color color)
Sets the color used to draw lines and borders around shapes. |
void |
stroke(int gray)
Sets a shade of gray to be used used to draw lines and borders around shapes. |
void |
stroke(int param1,
int param2,
int param3)
Sets the color used to draw lines and borders around shapes. |
void |
strokeWeight(int width)
Sets the width of the stroke used for lines, points, and the border around shapes. |
boolean[] |
subset(boolean[] array,
int offset)
Extracts a sub-array of elements from an existing array. |
boolean[] |
subset(boolean[] array,
int offset,
int length)
Extracts a sub-array of elements from an existing array. |
byte[] |
subset(byte[] array,
int offset)
Extracts a sub-array of elements from an existing array. |
byte[] |
subset(byte[] array,
int offset,
int length)
Extracts a sub-array of elements from an existing array. |
char[] |
subset(char[] array,
int offset)
Extracts a sub-array of elements from an existing array. |
char[] |
subset(char[] array,
int offset,
int length)
Extracts a sub-array of elements from an existing array. |
int[] |
subset(int[] array,
int offset)
Extracts a sub-array of elements from an existing array. |
int[] |
subset(int[] array,
int offset,
int length)
Extracts a sub-array of elements from an existing array. |
String[] |
subset(String[] array,
int offset)
Extracts a sub-array of elements from an existing array. |
String[] |
subset(String[] array,
int offset,
int length)
Extracts a sub-array of elements from an existing array. |
void |
suspend()
Event handler that is called once when the application is about to be suspended. |
void |
text(String text,
int x,
int y)
Draws text to the screen. |
void |
text(String text,
int x,
int y,
int width,
int height)
Draws text to the screen. |
void |
textAlign(int mode)
Sets the current alignment for drawing text. |
void |
textFont(PFont font)
Sets the current font. |
String |
textInput()
The textInput function will open a new screen in which the user can input text using the native text input methods of the mobile phone (i.e. |
String |
textInput(String title,
String text,
int max)
The textInput function will open a new screen in which the user can input text using the native text input methods of the mobile phone (i.e. |
int |
textWidth(String data)
Calculates and returns the width of any character or text string. |
String[] |
textWrap(String data,
int width)
This function takes text in a String object and returns an array of String objects containing the text split into lines that will fit in the specified width when rendered with the current font. |
String[] |
textWrap(String data,
int width,
int height)
This function takes text in a String object and returns an array of String objects containing the text split into lines that will fit in the box specified by the given width and height when rendered with the current font. |
void |
translate(int x,
int y)
Specifies an amount to displace objects within the display window. |
void |
transparentDrawing()
Activates transparent drawing. |
void |
triangle(int x1,
int y1,
int x2,
int y2,
int x3,
int y3)
A triangle is a plane created by connecting three points. |
void |
triggerRepaint()
Triggers a repaint of the Mobile Processing context and/or of its parent container. |
String |
trim(String str)
Removes whitespace characters from the beginning and end of a String. |
void |
vertex(int x,
int y)
All shapes are constructed by connecting a series of vertices. |
int |
year()
The year() function returns the current year as an integer (2003, 2004, 2005, etc). |
| Field Detail |
|---|
static final Vector processingContextObjects
static final int RGB
static final int HSB
static final int POINTS
static final int LINES
static final int LINE_STRIP
static final int LINE_LOOP
static final int TRIANGLES
static final int TRIANGLE_STRIP
static final int QUADS
static final int QUAD_STRIP
static final int POLYGON
static final int CENTER
static final int CENTER_RADIUS
static final int CORNER
static final int CORNERS
static final int UP
static final int DOWN
static final int LEFT
static final int RIGHT
static final int FIRE
static final int GAME_A
static final int GAME_B
static final int GAME_C
static final int GAME_D
static final int SOFTKEY1
static final int SOFTKEY2
static final int SEND
static final int FACE_SYSTEM
static final int FACE_MONOSPACE
static final int FACE_PROPORTIONAL
static final int STYLE_PLAIN
static final int STYLE_BOLD
static final int STYLE_ITALIC
static final int STYLE_UNDERLINED
static final int SIZE_SMALL
static final int SIZE_MEDIUM
static final int SIZE_LARGE
| Method Detail |
|---|
void signalSizeChange(int width,
int height)
width - the new widthheight - the new height
void signalPointerDragged(int x,
int y)
x - the x-coordinate of the poinery - the y-coordinate of the pointer
void signalPointerReleased(int x,
int y)
x - the x-coordinate of the pointery - the y-coordinate of the pointer
void signalPointerPressed(int x,
int y)
x - the x-coordinate of the pointery - the y-coordinate of the pointervoid signalSoftkeyPressed(String label)
label - the label of the softkeyvoid signalKeyPressed(int keyCode)
keyCode - the keycode of the key, as reported by the JVMvoid signalKeyReleased(int keyCode)
keyCode - the keycode of the key, as reported by the JVMvoid signalApplicationSuspend()
void signalApplicationResume()
void signalDestroy()
void signalInitialization()
void signalHasFocus()
void signalLostFocus()
Image getBuffer()
String getSoftkeyLabel()
long getLastFrameTime()
long getIntervalBetweenFrames()
boolean checkForRefresh()
boolean isLooping()
void setParent(ProcessingContextContainerInterface parent)
parent - the parent container
void setPointerCoordinates(int x,
int y)
x - the x-coordinate of the pointery - the y-coordinate of the pointer
void setKeyAndKeyCode(char key,
int keyCode)
key - the key's corresponding characterkeyCode - the keycode of keyvoid executeRefresh(boolean alsoUpdateLastFrameTime)
alsoUpdateLastFrameTime - should the last frame time be updated also?void triggerRepaint()
boolean areKeypressesCaptured()
boolean areSoftkeysCaptured()
boolean arePointerEventsCaptured()
boolean isDrawingTransparent()
RgbImage getTransparentRgbImage()
int getTransparentColor()
getTransparentRgbImage()void executeInitializationSequence()
void focus()
void lostFocus()
void captureKeyPresses()
void releaseKeyPresses()
void captureSoftkeys()
void releaseSoftkeys()
void capturePointerEvents()
void releasePointerEvents()
void repaintBackground()
void dontRepaintBackground()
void transparentDrawing()
void opaqueDrawing()
void setTransparentColor(color color)
color - the transparent color to usegetTransparentRgbImage()void setTransparentColor(int gray)
gray - the level of gray to use as a transparent colorgetTransparentRgbImage()
void setTransparentColor(int value1,
int value2,
int value3)
value1 - red or hue values relative to the current color rangevalue2 - green or saturation values relative to the current color rangevalue3 - blue or brightness values relative to the current color rangevoid enableFastDrawing()
void disableFastDrawing()
int currentMemory()
int reportedMemory()
void framerate(int framerate)
framerate - void draw()
void redraw()
void loop()
void noLoop()
void destroy()
void suspend()
void resume()
void setup()
void exit()
void colorMode(int mode)
mode - Either RGB or HSB, corresponding to Red/Green/Blue and Hue/Saturation/Brightness
void colorMode(int mode,
int range)
mode - Either RGB or HSB, corresponding to Red/Green/Blue and Hue/Saturation/Brightnessrange - range for all color elements
void colorMode(int mode,
int range1,
int range2,
int range3)
mode - Either RGB or HSB, corresponding to Red/Green/Blue and Hue/Saturation/Brightnessrange1 - range for the red or hue depending on the current color moderange2 - range for the green or saturation depending on the current color moderange3 - range for the blue or brightness depending on the current color modecolor color(int gray)
gray - shade of gray, between 0 and 255
color color(int gray,
int alpha)
gray - shade of gray, between 0 and 255alpha - alpha level (NOTE: on current MIDP 2.1 devices and below this is ignored)
color color(int value1,
int value2,
int value3,
int alpha)
value1 - red or hue values relative to the current color rangevalue2 - green or saturation values relative to the current color rangevalue3 - blue or brightness values relative to the current color rangealpha - alpha level (NOTE: on current MIDP 2.1 devices and below this is ignored)
void stroke(color color)
color - the color to usevoid stroke(int gray)
gray - the shade of gray to use, between 0 and 255
void stroke(int param1,
int param2,
int param3)
param1 - red or hue values relative to the current color rangeparam2 - green or saturation values relative to the current color rangeparam3 - blue or brightness values relative to the current color rangevoid strokeWeight(int width)
width - the stroke widthvoid noStroke()
void fill(int gray)
gray - the shade of gray to use, between 0 and 255void fill(color color)
color - the fill color for shapes
void fill(int value1,
int value2,
int value3)
value1 - red or hue values relative to the current color rangevalue2 - green or saturation values relative to the current color rangevalue3 - blue or brightness values relative to the current color rangevoid noFill()
void background(int gray)
gray - the shade of gray to use, between 0 and 255void background(color color)
color - color the color to use as a background color
void background(int value1,
int value2,
int value3)
value1 - red or hue values relative to the current color rangevalue2 - green or saturation values relative to the current color rangevalue3 - blue or brightness values relative to the current color rangevoid background(PImage img)
img - the image to use.
void line(int x1,
int y1,
int x2,
int y2)
x1 - x-coordinate of the first pointy1 - y-coordinate of the first pointx2 - x-coordinate of the second pointy2 - y-coordinate of the second point
void bezier(int x1,
int y1,
int x2,
int y2,
int x3,
int y3,
int x4,
int y4)
x1 - x-coordinate of the first anchor pointy1 - y-coordinate of the first anchor pointx2 - x-coordinate of the first control pointy2 - y-coordinate of the first control pointx3 - x-coordinate of the second control pointy3 - y-coordinate of the second control pointx4 - x-coordinate of the second anchor pointy4 - y-coordinate of the second anchor point
void point(int x,
int y)
x - the x coordinate of the pointy - the y coordinate of the point
void triangle(int x1,
int y1,
int x2,
int y2,
int x3,
int y3)
x1 - x-coordinate of the first pointy1 - y-coordinate of the first pointx2 - x-coordinate of the second pointy2 - y-coordinate of the second pointx3 - x-coordinate of the third pointy3 - y-coordinate of the third point
void quad(int x1,
int y1,
int x2,
int y2,
int x3,
int y3,
int x4,
int y4)
x1 - x-coordinate of the first cornery1 - y-coordinate of the first cornerx2 - x-coordinate of the second cornery2 - y-coordinate of the second cornerx3 - x-coordinate of the third cornery3 - y-coordinate of the third cornerx4 - x-coordinate of the fourth cornery4 - y-coordinate of the fourth corner
void rect(int x,
int y,
int width,
int height)
x - x-coordinate of the rectangley - y-coordinate of the rectanglewidth - width of the rectangleheight - height of the rectanglerectMode(int)void rectMode(int mode)
mode - Either CORNER, CORNERS, CENTER
void ellipse(int x,
int y,
int width,
int height)
x - x-coordinate of the ellipsey - y-coordinate of the ellipsewidth - width of the ellipseheight - height of the ellipseellipseMode(int)
void curve(int x1,
int y1,
int x2,
int y2,
int x3,
int y3,
int x4,
int y4)
x1 - x-coordinate of the first anchor pointy1 - y-coordinate of the first anchor pointx2 - x-coordinate of the first control pointy2 - y-coordinate of the first control pointx3 - x-coordinate of the second control pointy3 - y-coordinate of the second control pointx4 - x-coordinate of the second anchor pointy4 - y-coordinate of the second anchor pointvoid ellipseMode(int mode)
mode - Either CENTER, CENTER_RADIUS, CORNER, CORNERS.void beginShape(int mode)
mode - Either LINES, LINE_STRIP, LINE_LOOP, TRIANGLES, TRIANGLE_STRIP, QUADS, QUAD_STRIP, POLYGONendShape()
void curveVertex(int x,
int y)
x - the x coordinate of the next vertexy - the y coordinate of the next vertex
void bezierVertex(int x1,
int y1,
int x2,
int y2,
int x3,
int y3)
x1 - x-coordinate of the first control pointy1 - y-coordinate of the first control pointx2 - x-coordinate of the second control pointy2 - y-coordinate of the second control pointx3 - x-coordinate of the anchor pointy3 - y-coordinate of the anchor pointvertex(int, int)
void vertex(int x,
int y)
x - the x coordinate of the next vertexy - the y coordinate of the next vertexvoid endShape()
;PImage loadImage(String filename)
filename - the name of the image file to load
PImage loadImage(byte[] data)
data - array of bytes of image data in .png format
void image(PImage img,
int x,
int y)
img - the image to usex - the x-coordinate of where to draw the imagey - the y coordinate of where to draw the image
void image(PImage img,
int sx,
int sy,
int swidth,
int sheight,
int dx,
int dy)
img - img the image to displaysx - x-coordinate of the sub-area in the imagesy - y-coordinate of the sub-area in the imageswidth - width of the sub-area in the imagesheight - height of the sub-area in the imagedx - destination x-coordinate of the imagedy - destination y-coordinate of the imageimageMode(int)void imageMode(int mode)
mode - the image modeimage(de.enough.polish.processing.PImage, int, int, int, int, int, int)void softkey(String label)
label - the custom label on the softkeyvoid softkeyPressed(String label)
label - the label on the softkeyvoid keyPressed()
void keyReleased()
void multitap()
noMultitap()void noMultitap()
multitap()void multitapClear()
multitap()void multitapDeleteChar()
multitap()String textInput()
String textInput(String title,
String text,
int max)
title - title of the text input formtext - default text of the formmax - maximum length of the user entered text
void pointerDragged()
void pointerPressed()
void pointerReleased()
int millis()
int second()
int minute()
int hour()
int day()
int month()
int year()
void print(boolean data)
data - the data to outputvoid print(byte data)
data - the data to outputvoid print(char data)
data - the data to outputvoid print(int data)
data - the data to outputvoid print(Object data)
data - the data to outputvoid print(String data)
data - the data to outputvoid println(boolean data)
data - the data to outputvoid println(byte data)
data - the data to outputvoid println(char data)
data - the data to outputvoid println(int data)
data - the data to outputvoid println(Object data)
data - the data to outputvoid println(String data)
data - the data to outputint length(boolean[] array)
array - the array in question
int length(byte[] array)
array - the array in question
int length(char[] array)
array - the array in question
int length(int[] array)
array - the array in question
int length(Object[] array)
array - the array in question
String join(String[] anyArray,
String separator)
anyArray - the source arrayseparator - the separator string
String join(int[] anyArray,
String separator)
anyArray - the source arrayseparator - the separator string
String join(int[] intArray,
String separator,
int digits)
intArray - the source arrayseparator - the separator stringdigits - desired number of digits for each number
String nf(int intValue,
int digits)
intValue - the number to formatdigits - the number of digits
nfp(int, int)
String nfp(int intValue,
int digits)
intValue - the number to formatdigits - the number of digits
nf(int, int)
String[] split(String str,
char delim)
str - the source stringdelim - delimiter
String[] split(String str,
String delim)
str - the source stringdelim - delimiter
String trim(String str)
str - original string
String[] append(String[] array,
String element)
array - the original arrayelement - element to append
boolean[] append(boolean[] array,
boolean element)
array - the original arrayelement - element to append
float[] append(float[] array,
float element)
array - the original arrayelement - element to append
double[] append(double[] array,
double element)
array - the original arrayelement - element to append
byte[] append(byte[] array,
byte element)
array - the original arrayelement - element to append
char[] append(char[] array,
char element)
array - the original arrayelement - element to append
int[] append(int[] array,
int element)
array - the original arrayelement - element to append
String[] concat(String[] array1,
String[] array2)
array1 - the first arrayarray2 - the second array
boolean[] concat(boolean[] array1,
boolean[] array2)
array1 - the first arrayarray2 - the second array
byte[] concat(byte[] array1,
byte[] array2)
array1 - the first arrayarray2 - the second array
char[] concat(char[] array1,
char[] array2)
array1 - the first arrayarray2 - the second array
int[] concat(int[] array1,
int[] array2)
array1 - the first arrayarray2 - the second array
boolean[] contract(boolean[] array,
int newSize)
array - the array in questionnewSize - new size
byte[] contract(byte[] array,
int newSize)
array - the array in questionnewSize - new size
char[] contract(char[] array,
int newSize)
array - the array in questionnewSize - new size
int[] contract(int[] array,
int newSize)
array - the array in questionnewSize - new size
String[] contract(String[] array,
int newSize)
array - the array in questionnewSize - new size
boolean[] expand(boolean[] array)
array - the array in question
boolean[] expand(boolean[] array,
int newSize)
array - the array in questionnewSize - new size
byte[] expand(byte[] array)
array - the array in question
byte[] expand(byte[] array,
int newSize)
array - the array in questionnewSize - new size
char[] expand(char[] array)
array - the array in question
char[] expand(char[] array,
int newSize)
array - the array in questionnewSize - new size
int[] expand(int[] array)
array - the array in question
int[] expand(int[] array,
int newSize)
array - the array in questionnewSize - new size
String[] expand(String[] array)
array - the array in question
String[] expand(String[] array,
int newSize)
array - the array in questionnewSize - new size
boolean[] reverse(boolean[] array)
array - the array in question
byte[] reverse(byte[] array)
array - the array in question
char[] reverse(char[] array)
array - the array in question
int[] reverse(int[] array)
array - the array in question
String[] reverse(String[] array)
array - the array in question
boolean[] shorten(boolean[] array)
array - the array in question
byte[] shorten(byte[] array)
array - the array in question
char[] shorten(char[] array)
array - the array in question
int[] shorten(int[] array)
array - the array in question
String[] shorten(String[] array)
array - the array in question
boolean[] subset(boolean[] array,
int offset)
array - the array in questionoffset - position to begin at
boolean[] subset(boolean[] array,
int offset,
int length)
array - the array in questionoffset - position to begin atlength - length of the sub-array
byte[] subset(byte[] array,
int offset)
array - the array in questionoffset - position to begin at
byte[] subset(byte[] array,
int offset,
int length)
array - the array in questionoffset - position to begin atlength - length of the sub-array
char[] subset(char[] array,
int offset)
array - the array in questionoffset - position to begin at
char[] subset(char[] array,
int offset,
int length)
array - the array in questionoffset - position to begin atlength - length of the sub-array
int[] subset(int[] array,
int offset)
array - the array in questionoffset - position to begin at
int[] subset(int[] array,
int offset,
int length)
array - the array in questionoffset - position to begin atlength - length of the sub-array
String[] subset(String[] array,
int offset)
array - the array in questionoffset - position to begin at
String[] subset(String[] array,
int offset,
int length)
array - the array in questionoffset - position to begin atlength - length of the sub-array
boolean[] splice(boolean[] array,
boolean value,
int index)
array - the array in questionvalue - the value to insertindex - the index at which to insert
boolean[] splice(boolean[] array,
boolean[] array2,
int index)
array - source arrayarray2 - array to insertindex - index at which to insert
byte[] splice(byte[] array,
byte value,
int index)
array - the array in questionvalue - the value to insertindex - the index at which to insert
byte[] splice(byte[] array,
byte[] array2,
int index)
array - source arrayarray2 - array to insertindex - index at which to insert
char[] splice(char[] array,
char value,
int index)
array - the array in questionvalue - the value to insertindex - the index at which to insert
char[] splice(char[] array,
char[] array2,
int index)
array - source arrayarray2 - array to insertindex - index at which to insert
int[] splice(int[] array,
int value,
int index)
array - the array in questionvalue - the value to insertindex - the index at which to insert
int[] splice(int[] array,
int[] array2,
int index)
array - source arrayarray2 - array to insertindex - index at which to insert
String[] splice(String[] array,
String value,
int index)
array - the array in questionvalue - the value to insertindex - the index at which to insert
String[] splice(String[] array,
String[] array2,
int index)
array - source arrayarray2 - array to insertindex - index at which to insert
String str(boolean val)
val - the value to represent as a string
String str(byte val)
val - the value to represent as a string
String str(char val)
val - the value to represent as a string
String str(int val)
val - the value to represent as a string
String[] str(boolean[] val)
val - the value to represent as a string
String[] str(byte[] val)
val - the value to represent as a string
String[] str(char[] val)
val - the value to represent as a string
String[] str(int[] val)
val - the value to represent as a string
void pushMatrix()
void popMatrix()
void resetMatrix()
void translate(int x,
int y)
x - horizontal translation amounty - vertical translation amountint abs(int value)
value - the number to process
int max(int value1,
int value2)
value1 - first numbervalue2 - second number
int min(int value1,
int value2)
value1 - first numbervalue2 - second number
int sq(int number)
number - the number to process
int pow(int base,
int exponent)
base - baseexponent - exponent
int constrain(int value,
int min,
int max)
value - the value in questionmin - minimum valuemax - maximum value
int random(int value)
value - maximum number
double random(double value)
value - maximum number
int random(int value1,
int value2)
value1 - the minimum number to generate (left end of the interval)value2 - the maximum number to generate (right end of the interval)
int mul(int value1,
int value2)
value1 - the first numbervalue2 - the second number
int div(int dividend,
int divisor)
dividend - dividenddivisor - divisiorint itofp(int value1)
value1 - the integer in question
int fptoi(int value1)
value1 - the fixed point value in questionint sqrt(int value_fp)
value_fp - fixed-point value
int dist(int x1,
int y1,
int x2,
int y2)
x1 - the x-coordinate of the first pointy1 - the y-coordinate of the first pointx2 - the x-coordinate of the second pointy2 - the y-coordinate of the second point
int dist_fp(int x1,
int y1,
int x2,
int y2)
x1 - the x-coordinate of the first pointy1 - the y-coordinate of the first pointx2 - the x-coordinate of the second pointy2 - the y-coordinate of the second point
int floor(int value1)
value1 - the fixed point value in questionint ceil(int value1)
value1 - the fixed point value in questionint round(int value1)
value1 - the fixed point value in questionint radians(int angle)
angle - the angle in question
int sin(int rad)
rad - angle in radians (fixed-point number)
double sind(double rad)
rad - angle in radians
int cos(int rad)
rad - angle in radians (fixed-point number)
double cosd(double rad)
rad - angle in radians
int atan(int value1)
value1 - fixed-point value to calculate the arctangent of
int atan2(int x,
int y)
x - the x-coordinate of the pointy - the y-coordinate of the point
double atan(double value1)
value1 - value to calculate the arctangent of
double atan2d(int x,
int y)
x - the x-coordinate of the pointy - the y-coordinate of the point
byte[] loadBytes(String filename)
filename - the filename to load data from
String[] loadStrings(String filename)
filename - the filename to load data from
void saveBytes(String filename,
byte[] data)
filename - the filename to write data todata - the data to write
void saveStrings(String filename,
String[] strings)
filename - the filename to write data tostrings - the strings to writeInputStream openStream(String fileName)
fileName - file name
PFont loadFont(String fontname,
color fgColor,
color bgColor)
fontname - the J2ME polish font namefgColor - color of the fontbgColor - background color
PFont loadFont(String fontname,
color fgColor)
fontname - the J2ME polish font namefgColor - color of the font
PFont loadFont(String fontname)
fontname - the J2ME polish font name
PFont loadFont()
PFont loadFont(int face,
int style,
int size)
face - the font facestyle - the font stylesize - the font size
void textFont(PFont font)
font - the font to use
String[] textWrap(String data,
int width)
data - string to wrapwidth - the maximum line width
String[] textWrap(String data,
int width,
int height)
data - string to wrapwidth - the maximum line widthheight - the maximum box height
int textWidth(String data)
data - the string in question
void textAlign(int mode)
mode - Either LEFT, CENTER, or RIGHT
void text(String text,
int x,
int y)
text - the text to drawx - on-sceen x-coordinate of the texty - on-sceen y-coordinate of the text
void text(String text,
int x,
int y,
int width,
int height)
text - the text to drawx - on-sceen x-coordinate of the texty - on-sceen y-coordinate of the textwidth - the width of the areaheight - the height of the area
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||