CropField add-on

Hi @all!

We’ve just added a new
that allows selecting a cropping area in an image.
In case you’ve got any questions or remarks, please let us know. :slight_smile:

Best greetings from Germany
The davengo team

EDIT: Just uploaded the
Demo Application
to AppEngine.

Hello, thanks for you addon, it’s pretty cool.
However, I have a few questions:

  1. How to get selected image in the cropfield? I don’t see any methods.
  2. Is it possible to let the user only move the constant selection area without giving him possibility to resize it?
    For the second point I’ve set both max and min width and height but still user have to click first in order to see the selection area. I want it to appear immediately, is it possible?

Thanks a lot

Just check the answer to your second post:

Best regards,
The davengo Team

Will you release a Vaadin 7 version any time soon?

I ported it to Vaadin 7.3.5 like described on

I unpacked the sources to my test project.
Then I created a new Connector:

package com.davengo.web.vaadin.crop.widgetset.client;

import com.davengo.web.vaadin.crop.CropField;
import com.davengo.web.vaadin.crop.widgetset.client.ui.VCropField;
import com.vaadin.client.ApplicationConnection;
import com.vaadin.client.UIDL;
import com.vaadin.client.ui.LegacyConnector;
import com.vaadin.shared.ui.Connect;

public class CropConnector extends LegacyConnector
    public VCropField getWidget() {
        return (VCropField) super.getWidget();
    public void updateFromUIDL(UIDL uidl, ApplicationConnection client) {
        getWidget().updateFromUIDL(uidl, client);

Imports like

import com.vaadin.terminal.gwt.client.XXX;

import com.vaadin.terminal.XXX;

have to be changed to

import com.vaadin.client.XXX;

import com.vaadin.server.XXX;

I removed the @ClientWidget annotation from VCropField and made it implement LegacyComponent

public class CropField extends AbstractField implements LegacyComponent {

I added this to AppWidgetSet.gwt.xml

    <inherits name="com.davengo.web.vaadin.crop.widgetset.CropWidgetset" />

Then I fixed remaining compile errors by commenting out super-calls.
I then rewrote CropDemoApplication to be a Vaadin 7 UI and opened it.

Not everything works, “Toggle Aspect” and “Toggle Readonly” are somehow defunct …

This does NOT work!

does NOT fire, I receive no
events on server.

What is missing here?

I tried to understand and follow the extended Vaadin 6 to 7 porting guide at

but stranded at chapter "
Basic widget add-on using Vaadin 7 APIs
". This seems to be for experts only, I do not know about client-side Vaadin component implementations.
Besides I would need to study the add-on source code entirely to understand what is going on there and needs to be rewritten.