world.test
Class MousePointsWorld

java.lang.Object
  extended by world.World
      extended by world.test.MousePointsWorld

public class MousePointsWorld
extends World


Field Summary
 
Fields inherited from class world.World
DEFAULT_TICK_RATE, KEY_ARROW_DOWN, KEY_ARROW_LEFT, KEY_ARROW_RIGHT, KEY_ARROW_UP, MOUSE_DOWN, MOUSE_DRAG, MOUSE_ENTER, MOUSE_LEAVE, MOUSE_MOVE, MOUSE_UP
 
Method Summary
static void main(java.lang.String[] s)
           
 Scene onDraw()
          Return a visualization of this World as a Scene.
 World onMouse(int x, int y, java.lang.String me)
          Produce a (possibly) new World when a mouse event is triggered.
 
Methods inherited from class world.World
bigBang, display, lastScene, onKey, onRelease, onTick, stopWhen, tickRate
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

main

public static void main(java.lang.String[] s)

onDraw

public Scene onDraw()
Description copied from class: World
Return a visualization of this World as a Scene. See EmptyScene, Scene.placeImage(Image, int, int), and Scene.addLine(int, int, int, int, String) for documentation on constructing Scenes

Specified by:
onDraw in class World

onMouse

public World onMouse(int x,
                     int y,
                     java.lang.String me)
Description copied from class: World
Produce a (possibly) new World when a mouse event is triggered. x and y are the location of the event in the window, and event is a String that describes what kind of event occurred.

Possible Mouse Events

"button-down" : The user presses a mouse button in the World window
"button-up" : The user releases a mouse button in the World window
"move" : The user moves the mouse in the World window
"drag" : The user holds a mouse button and moves the mouse in the World window
"enter" : The user moves the mouse in-to the World window
"leave" : The user moves the mouse out-of the World window

Overrides:
onMouse in class World