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 objects 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 the object 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.
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.
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.
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 given location (relative to this object's location).
getObjectsInRange(int, Class)
- Method in class greenfoot.
Actor
Return all objects within range 'r' 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 the object.
getTransparency()
- Method in class greenfoot.
GreenfootImage
Return the current transparency of the image.
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 object lives in.
getX()
- Method in class greenfoot.
Actor
Return the x-coordinate of the object'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.
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.
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.
N
numberOfObjects()
- Method in class greenfoot.
World
Get the number of actors currently in the world.
P
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 object from an image file.
setImage(GreenfootImage)
- Method in class greenfoot.
Actor
Set the image for this object to the specified image.
setLocation(int, int)
- Method in class greenfoot.
Actor
Assign a new location for this object.
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 the object.
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.
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.
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.
MouseInfo
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.
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