RxGWT Parent

RxGWT parent POM.

License

License

Categories

Categories

GWT (Google Web Toolkit) User Interface Web Frameworks
GroupId

GroupId

com.intendia.gwt.rxgwt
ArtifactId

ArtifactId

rxgwt-parent
Last Version

Last Version

0.4
Release Date

Release Date

Type

Type

pom
Description

Description

RxGWT Parent
RxGWT parent POM.
Project URL

Project URL

https://github.com/intendia-oss/rxgwt
Source Code Management

Source Code Management

https://github.com/intendia-oss/rxgwt

Download rxgwt-parent

Filename Size
rxgwt-parent-0.4.pom 8 KB
Browse

How to add to project

<!-- https://jarcasting.com/artifacts/com.intendia.gwt.rxgwt/rxgwt-parent/ -->
<dependency>
    <groupId>com.intendia.gwt.rxgwt</groupId>
    <artifactId>rxgwt-parent</artifactId>
    <version>0.4</version>
    <type>pom</type>
</dependency>
// https://jarcasting.com/artifacts/com.intendia.gwt.rxgwt/rxgwt-parent/
implementation 'com.intendia.gwt.rxgwt:rxgwt-parent:0.4'
// https://jarcasting.com/artifacts/com.intendia.gwt.rxgwt/rxgwt-parent/
implementation ("com.intendia.gwt.rxgwt:rxgwt-parent:0.4")
'com.intendia.gwt.rxgwt:rxgwt-parent:pom:0.4'
<dependency org="com.intendia.gwt.rxgwt" name="rxgwt-parent" rev="0.4">
  <artifact name="rxgwt-parent" type="pom" />
</dependency>
@Grapes(
@Grab(group='com.intendia.gwt.rxgwt', module='rxgwt-parent', version='0.4')
)
libraryDependencies += "com.intendia.gwt.rxgwt" % "rxgwt-parent" % "0.4"
[com.intendia.gwt.rxgwt/rxgwt-parent "0.4"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

  • generator
  • core
  • examples

RxGWT: Reactive Extensions for GWT

Maven Central Build Status Join the chat at https://gitter.im/intendia-oss/rxgwt

GWT specific bindings for RxJava (requires RxJava GWT).

This module adds the minimum classes to RxJava that make writing reactive components in GWT applications easy and hassle-free. More specifically, it provides adapters for all available events and various operators like bufferedFinally, debounceFinally, etc.

GWT module system requires all classes used by a module to be included as dependant modules. So to not to force to load all optional modules various independent small modules are exposed by RxGWT.

  • RxGWT.gwt.xml - includes common utils, usually not included explicit as it is included by all other modules
  • RxUser.gwt.xml - includes GWT user dependant utils like RxHandlers and RxEvents
  • RxElemental.gwt.xml - legacy GWT elemental utils
  • RxElemental2.gwt.xml - new generation GWT elemental2 utils
  • RxElemento.gwt.xml - elemento typed events on top of new generation GWT elemental2 utils

Download

Releases are deployed to the Central Repository.

Snapshots of the development version are available in Sonatype's snapshots repository.

Example

Observable<List<double[]>> mouseDiff$ = mouseMove(canvas)
        .map(e -> canvasPosition(canvas, e))
        .buffer(3, 1);

Observable<List<double[]>> mouseDrag$ = mouseDown(canvas).compose(log("mouse down"))
        .flatMap(e -> mouseDiff$.takeUntil(mouseUp(canvas).compose(log("mouse up"))));

Observable<List<double[]>> touchDiff$ = touchMove(canvas)
        .map(e -> e.getTouches().get(0))
        .map(e -> canvasPosition(canvas, e))
        .buffer(2, 1);

Observable<List<double[]>> touchDrag$ = touchStart(canvas).compose(log("touch down"))
        .flatMap(e -> touchDiff$.takeUntil(touchEnd(canvas).compose(log("touch up"))));

Observable<Object> down$ = merge(mouseDown(canvas), touchStart(canvas));
Observable<List<double[]>> drag$ = merge(mouseDrag$, touchDrag$);

Observable<String> paint$ = keyPress(canvas, '1').map(e -> "paint").startWith("default");
Observable<String> erase$ = keyPress(canvas, '2').map(e -> "erase");

All the mouseMove, mouseDown, touchMove, touchStart, touchEnd and keyPress static methods are exposed by the RxGWT API. To find all of them just explore RxGwt, or RxHandlers and RxEvents. RxEvents and RxHandlers are auto-generated using all classes in gwt-user extending from Events and HasValue respectively.

You can see this complete code example here RxCanvas, or other interesting one in RxSnake.

com.intendia.gwt.rxgwt

Intendia OSS

Intendia open source software

Versions

Version
0.4
0.3
0.2
0.1