Want to start a revolution? First, you need a Revolver. You also need to build up the image for your revolution a bit. Then, start rollin’.
[list]
[]
Go on and
turn the World around
!
[]
Get it from
Vaadin Directory
[/list]Tested only on Firefox and Chrome. Uses CSS transformations, which do not work in all browsers and are anyhow browser-specific.
Basic use:
// Create the revolutionary image
final Revolver image = new Revolver(
new ClassResource("/org/vaadin/revolution/demo/earth.jpg"));
image.setSizeUndefined();
layout.addComponent(image);
// Set rotation in degrees
image.setRotation(20);
// Handle rotation by user
image.addRotationListener(new RotationListener() {
public void rotate(double rotation) {
// Do something with the value - display it in label
label.setValue(Double.toString(Math.round(rotation)));
}
});