svn: r2728
This commit is contained in:
Matthias Felleisen 2006-04-21 01:04:33 +00:00
parent 3ac9ac813c
commit 489519f5ed
3 changed files with 8 additions and 15 deletions

View File

@ -22,7 +22,9 @@
[(_ body) [(_ body)
#'(with-handlers #'(with-handlers
((exn:fail? ((exn:fail?
(lambda (e) (raise-error "The method start(int,int) must be called on the canvas before using any drawing methods")))) (lambda (e)
(raise-error
"The method start(int,int) must be called on the canvas before using any drawing methods"))))
body)])) body)]))
(define-syntax (define/provide stx) (define-syntax (define/provide stx)

View File

@ -1,22 +1,13 @@
package draw; package draw;
public abstract class World { public abstract class World {
public Canvas theCanvas = new Canvas();
protected Canvas theCanvas = new Canvas();
public native boolean bigBang(int width, int height, double s); public native boolean bigBang(int width, int height, double s);
public native boolean endOfTime(); public native boolean endOfTime();
public native World endOfWorld(); public native World endOfWorld();
public native World lastWorld(); public native World lastWorld();
public abstract World onTick(); public abstract World onTick();
public abstract World onKeyEvent(String ke); public abstract World onKeyEvent(String ke);
public abstract boolean draw(); public abstract boolean draw();
public abstract boolean erase(); public abstract boolean erase();
} }

View File

@ -172,12 +172,12 @@
;; identifiers ending in f are format strings, and require ~n for newline ;; identifiers ending in f are format strings, and require ~n for newline
;; Abstract Class ;; Abstract Class
(define abstractF "abstract class ~a {\n") (define abstractF "interface ~a {\n")
;; Abstract Template ;; Abstract Template
(define purpos " // purpose statement \n") (define purpos " // purpose statement \n")
(define absteg " abstract ??? mmm();\n") (define absteg " abstract ??? mmm();\n")
;; Class ;; Class
(define classf "class ~a ~a{~n") (define extendsf "extends ~a ") (define classf "class ~a ~a{~n") (define extendsf "implements ~a ")
;; Fields ;; Fields
(define declaf " ~a ~a;~n") (define declaf " ~a ~a;~n")
;; Constructor ;; Constructor