Directory

← Back

Revolution

Allows revolutions

Author

Rating

Popularity

<100

This revolutionary component really turns the tables for Vaadin. It lets you make the world go around.

The Revolver component displays an image resource and allows you to rotate it by dragging it around with mouse. The rotation change can be listened for and you can also set the rotation programmatically.

Tested on Firefox and Chrome. Possibly doesn't work on IE.

Sample code

// 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)));
    }
});

Compatibility

(Loading compatibility data...)

Was this helpful? Need more help?
Leave a comment or a question below. You can also join the chat on Discord or ask questions on StackOverflow.

Version

Initial release.

Known issue: The component theme doesn't work properly, so set the component as "overflow: hidden" in your theme to avoid scrollbars from appearing.

Released
2013-02-04
Maturity
EXPERIMENTAL
License
Apache License 2.0

Compatibility

Framework
Vaadin 7.0+
Browser
Firefox
Google Chrome

Revolution - Vaadin Add-on Directory

Allows revolutions Revolution - Vaadin Add-on Directory
This revolutionary component really turns the tables for Vaadin. It lets you make the world go around. The Revolver component displays an image resource and allows you to rotate it by dragging it around with mouse. The rotation change can be listened for and you can also set the rotation programmatically. Tested on Firefox and Chrome. Possibly doesn't work on IE.
Online Demo
Discussion Forum

Revolution version 0.1.0
Initial release. Known issue: The component theme doesn't work properly, so set the component as "overflow: hidden" in your theme to avoid scrollbars from appearing.

Online