updated archetype to use new SPI canvas
authortoni.epple@eppleton.de
Wed, 22 May 2013 07:44:23 +0200
branchcanvas
changeset 1126338d80e0344f
parent 1125 a3d504d7e588
child 1127 39b095abcc68
updated archetype to use new SPI
rt/archetype/src/main/resources/archetype-resources/src/main/java/App.java
     1.1 --- a/rt/archetype/src/main/resources/archetype-resources/src/main/java/App.java	Tue May 21 16:10:52 2013 +0200
     1.2 +++ b/rt/archetype/src/main/resources/archetype-resources/src/main/java/App.java	Wed May 22 07:44:23 2013 +0200
     1.3 @@ -1,6 +1,7 @@
     1.4  package ${package};
     1.5  
     1.6  import java.util.List;
     1.7 +import net.java.html.canvas.IGraphicsContext;
     1.8  import org.apidesign.bck2brwsr.htmlpage.api.*;
     1.9  import static org.apidesign.bck2brwsr.htmlpage.api.OnEvent.*;
    1.10  import org.apidesign.bck2brwsr.htmlpage.api.Page;
    1.11 @@ -39,7 +40,7 @@
    1.12       */
    1.13      @On(event = MOUSE_MOVE, id="canvas")
    1.14      static void clearPoint(Index m, int x, int y) {
    1.15 -        GraphicsContext g = m.canvas.getContext();
    1.16 +        IGraphicsContext g = m.canvas.getContext();
    1.17          boolean even = (x + y) % 2 == 0;
    1.18          if (even) {
    1.19              g.setFillStyle("blue");
    1.20 @@ -59,7 +60,7 @@
    1.21       */
    1.22      @OnFunction
    1.23      static void display(String data, Index m) {
    1.24 -        GraphicsContext g = m.canvas.getContext();
    1.25 +        IGraphicsContext g = m.canvas.getContext();
    1.26          g.clearRect(0, 0, 1000, 1000);
    1.27          g.setFillStyle("black");
    1.28          g.setFont("italic 40px Calibri");