Skip to content

Commit b384fc0

Browse files
committed
Spice it up
1 parent 007cc94 commit b384fc0

File tree

3 files changed

+39
-7
lines changed

3 files changed

+39
-7
lines changed

pom.xml

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,41 @@
1818
<maven.compiler.target>11</maven.compiler.target>
1919
</properties>
2020

21+
<dependencyManagement>
22+
<dependencies>
23+
<dependency>
24+
<groupId>com.google.gwt</groupId>
25+
<artifactId>gwt</artifactId>
26+
<version>2.9.0</version>
27+
<type>pom</type>
28+
<scope>import</scope>
29+
</dependency>
30+
</dependencies>
31+
</dependencyManagement>
32+
2133
<dependencies>
2234
<dependency>
2335
<groupId>com.google.gwt</groupId>
2436
<artifactId>gwt-user</artifactId>
25-
<version>2.9.0</version>
2637
</dependency>
2738
<dependency>
2839
<groupId>com.google.gwt</groupId>
2940
<artifactId>gwt-dev</artifactId>
30-
<version>2.9.0</version>
41+
</dependency>
42+
<dependency>
43+
<groupId>org.jboss.elemento</groupId>
44+
<artifactId>elemento-core</artifactId>
45+
<version>1.0.0-rc3</version>
46+
</dependency>
47+
<dependency>
48+
<groupId>com.intendia.gwt.rxgwt2</groupId>
49+
<artifactId>rxgwt</artifactId>
50+
<version>2.3</version>
51+
</dependency>
52+
<dependency>
53+
<groupId>com.intendia.gwt</groupId>
54+
<artifactId>rxjava2-gwt</artifactId>
55+
<version>2.2.20-gwt1</version>
3156
</dependency>
3257
<dependency>
3358
<groupId>junit</groupId>

src/main/java/me/App.gwt.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 2.8.2//EN" "http://www.gwtproject.org/doctype/2.8.2/gwt-module.dtd">
22
<module>
33
<inherits name="com.google.gwt.user.User"/>
4+
<inherits name="com.intendia.rxgwt2.RxElemento"/>
5+
<inherits name="org.jboss.elemento.Core"/>
46
<entry-point class="me.client.App"/>
57
<!--<source path="client"/>-->
68
<!--<public path="public"/>-->

src/main/java/me/client/App.java

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,20 @@
11
package me.client;
22

3+
import static elemental2.dom.DomGlobal.document;
4+
import static org.jboss.elemento.EventType.mousemove;
5+
36
import com.google.gwt.core.client.EntryPoint;
4-
import com.google.gwt.dom.client.Document;
5-
import com.google.gwt.dom.client.Text;
6-
import com.google.gwt.user.client.ui.RootPanel;
7+
import com.intendia.rxgwt2.elemento.RxElemento;
8+
import elemental2.dom.HTMLElement;
9+
import org.jboss.elemento.Elements;
710

811
public class App implements EntryPoint {
912

1013
@Override
1114
public void onModuleLoad() {
12-
Text textNode = Document.get().createTextNode("Hello World!");
13-
RootPanel.getBodyElement().appendChild(textNode);
15+
HTMLElement el = Elements.span().style("font-weight: bold;").element();
16+
Elements.body().add("mouse position: ").add(el);
17+
RxElemento.fromEvent(document, mousemove)
18+
.subscribe(ev -> el.textContent = ev.clientX + ", " + ev.clientY);
1419
}
1520
}

0 commit comments

Comments
 (0)