This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package dew.demo.duke2brwsr; | |
import net.java.html.json.*; | |
@Model(className = "Data", properties = { | |
@Property(name = "image", type = String.class), | |
@Property(name = "buttonText", type =String.class), | |
@Property(name = "on", type = boolean.class) | |
}) | |
class Duke2Brwsr { | |
static { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package dew.demo.ko4j; | |
import net.java.html.json.*; | |
@Model(className="Hello", properties={ | |
@Property(name="say", type=String.class) | |
}) | |
class HelloViaKO { | |
static { | |
Hello model = new Hello("Hello World!"); | |
model.applyBindings(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package dew.demo.exception; | |
class ThrowException { | |
static { | |
if (true) throw new IllegalStateException("Hello World!"); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package dew.demo.gists; | |
import java.util.Arrays; | |
import net.java.html.json.*; | |
@Model(className="UI", properties={ | |
@Property(name="user",type=String.class), | |
@Property(name="current",type=String.class), | |
@Property(name="names", type=String.class, array = true), | |
@Property(name="gists",type=Gist.class, array = true) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package dew.demo.lowlevel; | |
import net.java.html.js.JavaScriptBody; | |
final class Java2JsAndBack implements Runnable { | |
private int cnt = 0; | |
@Override public void run() { | |
String msg = "I was pressed"; | |
if (++cnt > 1) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package dew.demo.favorite; | |
import net.java.html.json.*; | |
/** Generates class Projects with getter and setter for | |
* string property "name" and another for an array/a list | |
* of strings. | |
*/ | |
@Model(className="Projects", properties={ | |
@Property(name="name",type=String.class), |
NewerOlder