davengo
(davengo GmbH)
September 29, 2011, 10:37am
1
Hi @all !
We’ve just added a new
add-on
that allows selecting a cropping area in an image.
In case you’ve got any questions or remarks, please let us know.
Best greetings from Germany
The davengo team
EDIT: Just uploaded the
Demo Application
to AppEngine.
The CropField component is a vaadin Field that shows a single image and overlays it with capabilities to select, transform and move a cropping area within it.
Basically, it is a jCrop clone for Vaadin/GWT.
Features include:
adding handlers to be notified when selection changes
setting min/max size of the selection
forcing an aspect ratio on the selection
selecting in the true size coordinate system of scaled images
Sergey58
(Sergey Kim)
August 1, 2012, 4:47am
2
Hello, thanks for you addon, it’s pretty cool.
However, I have a few questions:
How to get selected image in the cropfield? I don’t see any methods.
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
davengo
(davengo GmbH)
September 6, 2012, 10:06am
3
Just check the answer to your second post:
https://vaadin.com/forum/-/message_boards/view_message/1651203
Best regards,
The davengo Team
Gerrit5
(Gerrit Kahn)
January 9, 2014, 2:12pm
4
Will you release a Vaadin 7 version any time soon?
Fred16
(Fred Reedsalvor)
November 25, 2014, 11:43am
5
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;
@Connect(CropField.class)
public class CropConnector extends LegacyConnector
{
@Override
public VCropField getWidget() {
return (VCropField) super.getWidget();
}
@Override
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 …
Fred16
(Fred Reedsalvor)
November 26, 2014, 7:09am
6
This does NOT work!
The
ValueChangeListener
does NOT fire, I receive no
VCropSelection
events on server.
What is missing here?
Fred16
(Fred Reedsalvor)
November 26, 2014, 8:32am
7
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.