Back to index

plt-scheme  4.2.1
Package Functions | Package Attributes
SW Class Reference

List of all members.

Package Functions

 SW (int y, int low, AColor c)
boolean go ()
World onTick ()
World onKeyEvent (String ke)
boolean draw ()
boolean erase ()
 SW (int v)
boolean go ()
World onTick ()
World onKeyEvent (String ke)
boolean draw ()
boolean erase ()

Package Attributes

int x = 50
int y
int low
AColor c
AColor white = new White()
AColor red = new Red()

Detailed Description

Definition at line 5 of file draw-multiple-worlds.java.


Constructor & Destructor Documentation

SW.SW ( int  y,
int  low,
AColor  c 
) [inline, package]

Definition at line 12 of file draw-multiple-worlds.java.

{ this.y = y; this.low = low; this.c = c; }

Here is the caller graph for this function:

SW.SW ( int  v) [inline, package]

Definition at line 16 of file draw-world-close-canvas.java.

{ y = v; }

Member Function Documentation

boolean SW.draw ( ) [inline, package]

Definition at line 25 of file draw-multiple-worlds.java.

{ return this.theCanvas.drawDisk(new Posn(this.x,this.y),3,c); }
boolean SW.draw ( ) [inline, package]

Definition at line 31 of file draw-world-close-canvas.java.

{ return this.theCanvas.drawDisk(new Posn(this.x,this.y),3,red); }
boolean SW.erase ( ) [inline, package]

Definition at line 27 of file draw-multiple-worlds.java.

{ return this.theCanvas.drawRect(new Posn(0,0),100,100,white); }
boolean SW.erase ( ) [inline, package]

Definition at line 33 of file draw-world-close-canvas.java.

{ return this.theCanvas.drawRect(new Posn(0,0),100,100,white); }
boolean SW.go ( ) [inline, package]

Definition at line 14 of file draw-multiple-worlds.java.

{ return this.bigBang(100,100,.1); }
boolean SW.go ( ) [inline, package]

Definition at line 18 of file draw-world-close-canvas.java.

{ return this.bigBang(100,100,.1); }
World SW.onKeyEvent ( String  ke) [inline, package]

Definition at line 22 of file draw-world-close-canvas.java.

                             { 
  if (ke.equals("s"))
   return this.endOfWorld("the end");
  else if (ke.equals("*"))
   return new SW(99);
  else 
   return this; 
 }

Here is the call graph for this function:

World SW.onKeyEvent ( String  ke) [inline, package]

Definition at line 23 of file draw-multiple-worlds.java.

{ return this; }
World SW.onTick ( ) [inline, package]

Definition at line 16 of file draw-multiple-worlds.java.

                { 
  if (y >= low)
    return endOfWorld("the end");
  else
   return new SW(this.y+1,this.low,this.c); 
 }

Here is the call graph for this function:

World SW.onTick ( ) [inline, package]

Definition at line 20 of file draw-world-close-canvas.java.

{ return new SW(this.y+1); }

Here is the call graph for this function:


Member Data Documentation

AColor SW.c [package]

Definition at line 9 of file draw-multiple-worlds.java.

int SW.low [package]

Definition at line 8 of file draw-multiple-worlds.java.

AColor SW.red = new Red() [package]

Definition at line 13 of file draw-world-close-canvas.java.

AColor SW.white = new White() [package]

Definition at line 10 of file draw-multiple-worlds.java.

int SW.x = 50 [package]

Definition at line 6 of file draw-multiple-worlds.java.

int SW.y [package]

Definition at line 7 of file draw-multiple-worlds.java.


The documentation for this class was generated from the following files: