Package
Class
Tree
Deprecated
Index
Help
PREV NEXT
FRAMES
NO FRAMES
All Classes
A
C
D
F
G
I
M
N
P
R
S
T
W
A
act()
- Method in class greenfoot.
Actor
The act method is called by the greenfoot framework to give actors a chance to perform some action.
act()
- Method in class greenfoot.
World
Act method for world.
Actor
- Class in
greenfoot
An Actor is an object that exists in the Greenfoot world.
Actor()
- Constructor for class greenfoot.
Actor
Construct an Actor.
addedToWorld(World)
- Method in class greenfoot.
Actor
This method is called by the Greenfoot system when this actor has been inserted into the world.
addObject(Actor, int, int)
- Method in class greenfoot.
World
Add an Actor to the world.
C
clear()
- Method in class greenfoot.
GreenfootImage
Clears the image.
D
delay(int)
- Static method in class greenfoot.
Greenfoot
Delay the current execution by a number of time steps.
drawImage(GreenfootImage, int, int)
- Method in class greenfoot.
GreenfootImage
Draws the given Image onto this image
drawLine(int, int, int, int)
- Method in class greenfoot.
GreenfootImage
Draw a line, using the current drawing color, between the points
(x1, y1)
and
(x2, y2)
.
drawOval(int, int, int, int)
- Method in class greenfoot.
GreenfootImage
Draw an oval bounded by the specified rectangle with the current drawing color.
drawPolygon(int[], int[], int)
- Method in class greenfoot.
GreenfootImage
Draws a closed polygon defined by arrays of
x
and
y
coordinates.
drawRect(int, int, int, int)
- Method in class greenfoot.
GreenfootImage
Draw the outline of the specified rectangle.
drawShape(Shape)
- Method in class greenfoot.
GreenfootImage
Draw a shape directly on the image.
drawString(String, int, int)
- Method in class greenfoot.
GreenfootImage
Draw the text given by the specified string, using the current font and color.
F
fill()
- Method in class greenfoot.
GreenfootImage
Fill the entire image with the current drawing dcolor.
fillOval(int, int, int, int)
- Method in class greenfoot.
GreenfootImage
Fill an oval bounded by the specified rectangle with the current drawing color.
fillPolygon(int[], int[], int)
- Method in class greenfoot.
GreenfootImage
Fill a closed polygon defined by arrays of
x
and
y
coordinates.
fillRect(int, int, int, int)
- Method in class greenfoot.
GreenfootImage
Fill the specified rectangle.
fillShape(Shape)
- Method in class greenfoot.
GreenfootImage
Draw a filled shape directly on the image.
G
getActor()
- Method in class greenfoot.
MouseInfo
Return the actor (if any) that the current mouse behaviour is related to.
getAwtImage()
- Method in class greenfoot.
GreenfootImage
Returns the java.awt.image.BufferedImage that backs this GreenfootImage.
getBackground()
- Method in class greenfoot.
World
Return the world's background image.
getButton()
- Method in class greenfoot.
MouseInfo
The number of the pressed or clicked button (if any).
getCellSize()
- Method in class greenfoot.
World
Return the size of a cell (in pixels).
getClickCount()
- Method in class greenfoot.
MouseInfo
Return the number of mouse clicks associated with this mouse event.
getColor()
- Method in class greenfoot.
GreenfootImage
Return the current drawing color.
getColorAt(int, int)
- Method in class greenfoot.
GreenfootImage
Return the color at the given pixel.
getColorAt(int, int)
- Method in class greenfoot.
World
Return the color at the centre of the cell.
getFont()
- Method in class greenfoot.
GreenfootImage
Get the current font.
getHeight()
- Method in class greenfoot.
GreenfootImage
Return the height of the image.
getHeight()
- Method in class greenfoot.
World
Return the height of the world (in number of cells).
getImage()
- Method in class greenfoot.
Actor
Returns the image used to represent this actor.
getIntersectingObjects(Class)
- Method in class greenfoot.
Actor
Return all the objects that intersect this object.
getKey()
- Static method in class greenfoot.
Greenfoot
Get the most recently pressed key, since the last time this method was called.
getMicLevel()
- Static method in class greenfoot.
Greenfoot
Get the microphone input level.
getMouseInfo()
- Static method in class greenfoot.
Greenfoot
Return a mouse info object with information about the state of the mouse.
getNeighbours(int, boolean, Class)
- Method in class greenfoot.
Actor
Return the neighbours to this object within a given distance.
getObjects(Class)
- Method in class greenfoot.
World
Get all the objects in the world, or all the objects of a particular class.
getObjectsAt(int, int, Class)
- Method in class greenfoot.
World
Return all objects at a given cell.
getObjectsAtOffset(int, int, Class)
- Method in class greenfoot.
Actor
Return all objects that intersect the center of the given location (relative to this object's location).
getObjectsInRange(int, Class)
- Method in class greenfoot.
Actor
Return all objects within range 'radius' around this object.
getOneIntersectingObject(Class)
- Method in class greenfoot.
Actor
Return an object that intersects this object.
getOneObjectAtOffset(int, int, Class)
- Method in class greenfoot.
Actor
Return one object that is located at the specified cell (relative to this objects location).
getRandomNumber(int)
- Static method in class greenfoot.
Greenfoot
Return a random number between 0 (inclusive) and limit (exclusive).
getRotation()
- Method in class greenfoot.
Actor
Return the current rotation of this actor.
getTransparency()
- Method in class greenfoot.
GreenfootImage
Return the current transparency of the image.
getVolume()
- Method in class greenfoot.
GreenfootSound
Get the current volume of the sound, between 0 (off) and 100 (loudest.)
getWidth()
- Method in class greenfoot.
GreenfootImage
Return the width of the image.
getWidth()
- Method in class greenfoot.
World
Return the width of the world (in number of cells).
getWorld()
- Method in class greenfoot.
Actor
Return the world that this actor lives in.
getX()
- Method in class greenfoot.
Actor
Return the x-coordinate of the actor's current location.
getX()
- Method in class greenfoot.
MouseInfo
Return the current x position of the mouse cursor.
getY()
- Method in class greenfoot.
Actor
Return the y-coordinate of the object's current location.
getY()
- Method in class greenfoot.
MouseInfo
Return the current y position of the mouse cursor.
greenfoot
- package greenfoot
Greenfoot
- Class in
greenfoot
This utility class provides methods to control the simulation and interact with the system.
Greenfoot()
- Constructor for class greenfoot.
Greenfoot
GreenfootImage
- Class in
greenfoot
An image to be shown on screen.
GreenfootImage(String)
- Constructor for class greenfoot.
GreenfootImage
Create an image from an image file.
GreenfootImage(int, int)
- Constructor for class greenfoot.
GreenfootImage
Create an empty (transparent) image with the specified size.
GreenfootImage(GreenfootImage)
- Constructor for class greenfoot.
GreenfootImage
Create a GreenfootImage from another GreenfootImage.
GreenfootImage(String, int, Color, Color)
- Constructor for class greenfoot.
GreenfootImage
Creates an image with the given string drawn as text using the given font size, with the given foreground color on the given background color.
GreenfootSound
- Class in
greenfoot
Represents audio that can be played in Greenfoot.
GreenfootSound(String)
- Constructor for class greenfoot.
GreenfootSound
Creates a new sound from the given file.
I
intersects(Actor)
- Method in class greenfoot.
Actor
Check whether this object intersects with another given object.
isKeyDown(String)
- Static method in class greenfoot.
Greenfoot
Check whether a given key is currently pressed down.
isPlaying()
- Method in class greenfoot.
GreenfootSound
True if the sound is currently playing.
M
mirrorHorizontally()
- Method in class greenfoot.
GreenfootImage
Mirrors the image horizontally (flip around the x-axis).
mirrorVertically()
- Method in class greenfoot.
GreenfootImage
Mirrors the image vertically (flip around the y-axis).
mouseClicked(Object)
- Static method in class greenfoot.
Greenfoot
True if the mouse has been clicked (pressed and released) on the given object.
mouseDragEnded(Object)
- Static method in class greenfoot.
Greenfoot
True if a mouse drag has ended.
mouseDragged(Object)
- Static method in class greenfoot.
Greenfoot
True if the mouse has been dragged on the given object.
MouseInfo
- Class in
greenfoot
This class contains information about the current status of the mouse.
mouseMoved(Object)
- Static method in class greenfoot.
Greenfoot
True if the mouse has been moved on the given object.
mousePressed(Object)
- Static method in class greenfoot.
Greenfoot
True if the mouse has been pressed (changed from a non-pressed state to being pressed) on the given object.
move(int)
- Method in class greenfoot.
Actor
Move this actor the specified distance in the direction it is currently facing.
N
numberOfObjects()
- Method in class greenfoot.
World
Get the number of actors currently in the world.
P
pause()
- Method in class greenfoot.
GreenfootSound
Pauses the current sound if it is currently playing.
play()
- Method in class greenfoot.
GreenfootSound
Start playing this sound.
playLoop()
- Method in class greenfoot.
GreenfootSound
Play this sound repeatedly in a loop.
playSound(String)
- Static method in class greenfoot.
Greenfoot
Play sound from a file.
R
removeObject(Actor)
- Method in class greenfoot.
World
Remove an object from the world.
removeObjects(Collection)
- Method in class greenfoot.
World
Remove a list of objects from the world.
repaint()
- Method in class greenfoot.
World
Repaints the world.
rotate(int)
- Method in class greenfoot.
GreenfootImage
Rotates this image around the center.
S
scale(int, int)
- Method in class greenfoot.
GreenfootImage
Scales this image to a new size.
setActOrder(Class...)
- Method in class greenfoot.
World
Set the act order of objects in the world.
setBackground(GreenfootImage)
- Method in class greenfoot.
World
Set a background image for the world.
setBackground(String)
- Method in class greenfoot.
World
Set a background image for the world from an image file.
setColor(Color)
- Method in class greenfoot.
GreenfootImage
Set the current drawing color.
setColorAt(int, int, Color)
- Method in class greenfoot.
GreenfootImage
Sets the color at the given pixel to the given color.
setFont(Font)
- Method in class greenfoot.
GreenfootImage
Set the current font.
setImage(String)
- Method in class greenfoot.
Actor
Set an image for this actor from an image file.
setImage(GreenfootImage)
- Method in class greenfoot.
Actor
Set the image for this actor to the specified image.
setLocation(int, int)
- Method in class greenfoot.
Actor
Assign a new location for this actor.
setPaintOrder(Class...)
- Method in class greenfoot.
World
Set the paint order of objects in the world.
setRotation(int)
- Method in class greenfoot.
Actor
Set the rotation of this actor.
setSpeed(int)
- Static method in class greenfoot.
Greenfoot
Set the speed of the execution.
setTransparency(int)
- Method in class greenfoot.
GreenfootImage
Set the transparency of the image.
setVolume(int)
- Method in class greenfoot.
GreenfootSound
Set the current volume of the sound between 0 (off) and 100 (loudest.)
setWorld(World)
- Static method in class greenfoot.
Greenfoot
Sets the World to run to the one given.
start()
- Static method in class greenfoot.
Greenfoot
Run (or resume) the execution.
started()
- Method in class greenfoot.
World
This method is called by the Greenfoot system when the execution has started.
stop()
- Static method in class greenfoot.
Greenfoot
Pause the execution.
stop()
- Method in class greenfoot.
GreenfootSound
Stop playing this sound if it is currently playing.
stopped()
- Method in class greenfoot.
World
This method is called by the Greenfoot system when the execution has stopped.
T
toString()
- Method in class greenfoot.
GreenfootImage
Return a text representation of the image.
toString()
- Method in class greenfoot.
GreenfootSound
Returns a string representation of this sound containing the name of the file and whether it is currently playing or not.
toString()
- Method in class greenfoot.
MouseInfo
turn(int)
- Method in class greenfoot.
Actor
Turn this actor by the specified amount (in degrees).
W
World
- Class in
greenfoot
World is the world that Actors live in.
World(int, int, int)
- Constructor for class greenfoot.
World
Construct a new world.
World(int, int, int, boolean)
- Constructor for class greenfoot.
World
Construct a new world.
A
C
D
F
G
I
M
N
P
R
S
T
W
Package
Class
Tree
Deprecated
Index
Help
PREV NEXT
FRAMES
NO FRAMES
All Classes
Greenfoot homepage