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
<project xmlns="http://maven.apache.org/POM/4.0.0" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<parent> | |
<!-- Using gwt-boot-starter-parent --> | |
<groupId>com.github.gwtboot</groupId> | |
<artifactId>gwt-boot-starter-parent</artifactId> | |
<version>1.0.0-SNAPSHOT</version> | |
<relativePath /> |
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
... | |
... | |
Button button = new Button(); | |
button.setType(..); | |
... | |
Element th1 = DOM.createTH(); | |
th1.appendChild(button.getElement()); | |
// NOT WORKING: add click event to Button | |
button.addClickHandler(event -> { |
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
<!-- Apple class --> | |
<script language="javascript" type="text/javascript"> | |
Apple = function () { | |
this.x = 40; | |
this.y = 2; | |
}; | |
Apple.prototype.sum = function () { | |
return this.x + this.y; | |
}; |
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
/** | |
* A composite of a TextBox and a CheckBox that optionally enables it. | |
*/ | |
public class OptionalTextBox extends Composite implements | |
ClickHandler { | |
private TextBox textBox = new TextBox(); | |
private CheckBox checkBox = new CheckBox(); | |
/** |
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 hello.client; | |
import com.google.gwt.core.client.*; | |
import com.google.gwt.user.client.ui.*; | |
@GwtModule(renameTo="basic") | |
public class YourEntryPoint implements EntryPoint { | |
@Override | |
public void onModuleLoad() { | |
Button button = new Button("Click me"); |
NewerOlder