Moving modules around so the runtime is under one master pom and can be built without building other modules that are in the repository
3 import org.apidesign.bck2brwsr.htmlpage.api.*;
4 import static org.apidesign.bck2brwsr.htmlpage.api.OnEvent.*;
5 import org.apidesign.bck2brwsr.htmlpage.api.Page;
6 import org.apidesign.bck2brwsr.htmlpage.api.Property;
7 import org.apidesign.bck2brwsr.htmlpage.api.ComputedProperty;
9 /** Edit the index.xhtml file. Use 'id' to name certain HTML elements.
10 * Use this class to define behavior of the elements.
12 @Page(xhtml="index.html", className="Index", properties={
13 @Property(name="name", type=String.class)
17 Index model = new Index();
18 model.setName("World");
19 model.applyBindings();
22 @On(event = CLICK, id="hello")
23 static void hello(Index m) {
24 GraphicsContext g = m.CANVAS.getContext();
25 g.clearRect(0, 0, 1000, 1000);
26 g.setFont("italic 40px Calibri");
27 g.fillText(m.getHelloMessage(), 10, 40);
31 static String helloMessage(String name) {
32 return "Hello " + name + "!";