
NestedSwinger 
Version 1

From:
  Killer Game Programming in Java
  Web Site: http://fivedots.coe.psu.ac.th/~ad/jg


Contact Address:
  Dr. Andrew Davison
  Dept. of Computer Engineering
  Prince of Songkla University
  Hat Yai, Songkhla 90112, Thailand
  E-mail: ad@fivedots.coe.psu.ac.th
  http://fivedots.coe.psu.ac.th/~ad/jg


If you use this code, please mention my name, and include a link to the Web site.

Thanks,
  Andrew

---------------------------------
Contents of this directory:

* NestedSwinger application files:
     - NestedSwinger.jar     // NestedSwinger JAR, compiled from code in source/
     - TemplateForGUI.txt    // template file used during code generation
     - CanvasPanel.java      // a support file, used by the 'canvas' widget 
                               (see the manual for details)

* source/                    // source code for NestedSwinger

* batch files
     - swinger.bat          // for converting, compling and running NestedSwinger examples
     - cleanup.bat          // for deleting translated and compiled code

* NestedSwinger examples
     - printer.txt
     - test1.txt, test2.txt ... test11.txt
     - duke.png, cat.png      // image files used by some of the examples



---------------------------------
Using NestedSwinger

1) the long way:

> java -jar NestedSwinger.jar <NestedSwinger file>
             // this wil generate a Java file called NestedSwingerApp.java
e.g.

> java -jar NestedSwinger.jar printer.txt
             // this will generate PrinterApp.java
> javac PrinterApp.java
> java PrinterApp


-----
2) the short way:

> swinger <NestedSwinger file without .txt extension>
         // this batch file will translate its input file to Java, 
         // then compile and run the Java
e.g.
> swinger printer
       // generates PrinterApp.java, compiles it, runs it

e.g.
> swinger test10
       // generates Test10App.java, compiles it, and runs it
       // requires CanvasPanel.java since the example uses a canvas widget

---------------------------------
Cleaning up

> cleanup
     // this batch file deletes all App.java files, and all
     // class files in the current directory

---------
Last updated: 14th May 2010