'''@Override
public void edit(MyModel model) {
panel = new LienzoPanel();
panel.setWidth("100%");
panel.setHeight("100%");
Line line1 = new Line(0, 0, 0, 0).setStrokeColor(ColorName.BLUE); // primary line
Line line2 = new Line(0, 0, 0, 0).setStrokeColor(ColorName.GREEN); // secondary line
line2.setDashArray(2, 2); // the secondary lines are dashed lines
// Use primary and secondary lines in both directions.
// Primary lines every 200 pixels, secondary lines every 50 pixels
GridLayer gridLayer = new GridLayer(200, line1, 50, line2);
panel.add(gridLayer);
Layer layer = new Layer();
layer.setListening(true);
final double x = width / 2 - 120;
final double y = height / 2 - 60;
final Rectangle rectangle = new Rectangle(240, 120);
rectangle.setX(x).setY(y).setStrokeColor(ColorName.BLACK.getValue()).setStrokeWidth(1).setFillColor(Color.getRandomHexColor())
.setShadow(new Shadow(ColorName.BLACK.getValue(), 20, 5, 5))
.setAlpha(0.4);
rectangle.setDraggable(true);
// rectangle.setDragConstraint(DragConstraint.HORIZONTAL);
rectangle.setListening(true);
layer.add(rectangle);
panel.add(layer);
rectangle.draw();
HTMLElement htmlElement = Widgets.element(panel);
card.appendChild(htmlElement);
panel.onAttach();
}
'''
public void setFocus(final boolean focused)
{
if (focused)
{
nativeFocus(getElement());
}
else
{
super.setFocus(false);
}
}
// IE11/Ege specific check - The "setActive" method does not cause scrolling on parent element, as setFocus does, and
// it results in the same behavior.
public static native void nativeFocus(final Element element)
/*-{
if (element.setActive)
{
element.setActive();
}
else
{
element.focus();
}
}-*/;
@/all There's an issue in Elemento with Widgets.asElement()
: hal/elemento#82
Before trying to fix this, I'd like to get feedback from you. Please read and comment on hal/elemento#82
@/all
Just released Elemento 1.0.1 which updates Elemental2 to 1.1.0 and sets the minimal Java version back to 1.8.
For all details see: https://github.com/hal/elemento/releases/tag/1.0.1
The new version should be available in Maven Central in a few hours.
Hi Elemento experts, I'm trying to upgrade my GWT Boot stuffs to GWT 2.9 and also to use Elemento 1.0.0 but I got wyrd error on elemento-template-api?
Failed to collect dependencies at org.jboss.elemento:elemento-template-api:jar:1.0.0: Failed to read artifact descriptor for org.jboss.elemento:elemento-template-api:jar:1.0.0: Could not transfer artifact org.jboss.elemento:elemento-template-api:pom:1.0.0 from/to vertispan-snapshots (https://repo.vertispan.com/gwt-snapshot/): Failed to transfer https://repo.vertispan.com/gwt-snapshot/org/jboss/elemento/elemento-template-api/1.0.0/elemento-template-api-1.0.0.pom. Error code 409, Conflict -> [Help 1]
I'm using additionally following repos:
<repository>
<id>rxjava-gwt-repo</id>
<name>RX Java GWT</name>
<url>https://raw.githubusercontent.com/intendia-oss/rxjava-gwt/mvn-repo/</url>
</repository>
<repository>
<id>vertispan-snapshots</id>
<name>Vertispan Snapshots</name>
<url>https://repo.vertispan.com/gwt-snapshot/</url>
</repository>
<repository>
<id>sonatype-snapshots</id>
<name>Sonatype Snapshots</name>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
<snapshots>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
<checksumPolicy>fail</checksumPolicy>
</snapshots>
</repository>
Any ideas? Thanks a lot
Hmm now I got following error:
[ERROR] Failed to execute goal on project gwt-boot-starter-elemento-template: Could not resolve dependencies for project com.github.gwtboot:gwt-boot-starter-elemento-template:jar:1.0.0-SNAPSHOT: Failed to collect dependencies at org.jboss.elemento:elemento-template-api:jar:0.9.6: Failed to read artifact descriptor for org.jboss.elemento:elemento-template-api:jar:0.9.6: Could not transfer artifact org.jboss.elemento:elemento-template-api:pom:0.9.6 from/to vertispan-snapshots (https://repo.vertispan.com/gwt-snapshot/): Failed to transfer https://repo.vertispan.com/gwt-snapshot/org/jboss/elemento/elemento-template-api/0.9.6/elemento-template-api-0.9.6.pom. Error code 409, Conflict -> [Help 1]
OK, so org.jboss.elemento for elemento-core 1.0.0
and
org.jboss.gwt.elemento for elemento-template-api and elemento-template-processor 0.9.6....
At least now my build is green for the modules... now I will try to compile the examples...