Gwt (graphics) widget integration

Hi,
I play with Vaadin for some monthes, but this is my first client side development attempt.

I try to write a Vaadin Component for the (deprecated?) Gwt Widget gwt-graphics (
https://vaadin.com/directory#!addon/gwt-graphics
), which seems dead since 2011 (but it would be useful to me)

Sources for this gwt widget can be found here :
https://github.com/henrikerola/gwt-graphics

My Vaadin version is 7.5.10

Here is my Widgetset.gwt.xml:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module PUBLIC "-//Vaadin//DTD Vaadin 7//EN" "https://raw.github.com/vaadin/gwt/master/distro-source/core/src/gwt-module.dtd">
<module>
<inherits name="com.vaadin.terminal.gwt.DefaultWidgetSet" />
<inherits name="org.vaadin.gwtgraphics.GWTGraphics" />
<source path="client" />
<source path="shared" />
</module>

Some pieces of my client code involves gwtgraphics widgets eg :

@Connect(SvgRectangle.class) public class SvgRectangleConnector extends AbstractComponentConnector { @Override protected Rectangle createWidget() { return GWT.create(Rectangle.class); } @Override public Rectangle getWidget() { return (Rectangle) super.getWidget(); } @Override public SvgRectangleState getState() { return (SvgRectangleState) super.getState(); } @Override public void onStateChanged(StateChangeEvent stateChangeEvent) { super.onStateChanged(stateChangeEvent); getWidget().setX(getState().x); getWidget().setY(getState().y); getWidget().setWidth(getState().width); getWidget().setHeight(getState().height); } } My first problem is I can’t compile widgetSet (using gradle plugin)

Compiler simply ignores code in org.vaadin.gwtgraphics.client package and I fall on a “gwt class not found”

No source code is available for type org.vaadin.gwtgraphics.client.shape.Rectangle; did you forget to inherit a required module? Here is the gwt.xml of the gwt-graphics module :

<?xml version="1.0" encoding="UTF-8"?>
<module>
<inherits name='com.google.gwt.core.Core'/>
<inherits name='com.google.gwt.user.UserAgent'/>
<replace-with class='org.vaadin.gwtgraphics.client.impl.VMLImpl'>
<when-type-is class='org.vaadin.gwtgraphics.client.impl.SVGImpl'/>
<any>
<when-property-is name='user.agent' value='ie6'/>
<when-property-is name='user.agent' value='ie8'/>
</any>
</replace-with>
<replace-with class='org.vaadin.gwtgraphics.client.impl.SVGImpl'>
<when-type-is class='org.vaadin.gwtgraphics.client.impl.SVGImpl'/>
<any>
<when-property-is name='user.agent' value='ie9'/>
</any>
</replace-with>
<replace-with class='org.vaadin.gwtgraphics.client.impl.SafariSVGImpl'>
<when-type-is class='org.vaadin.gwtgraphics.client.impl.SVGImpl'/>
<when-property-is name='user.agent' value='safari'/>
</replace-with>
</module>

Am I wrong in my approach ?

Thanks
Franck

As a workaround, in vaadin gradle plugin :

vaadin {
    useClassPathJar false
    ....
}

some explains here :
https://devsoap.com/what-is-new-with-gradle-vaadin-plugin-0-10

Franck