Directory

← Back

Randomizer

Want to throw some dice or toss a coin in your application?

Author

Rating

Popularity

<100

Randomizer is a simple way to create lottery-like components in your application. The distribution package includes two examples, Die and CoinToss components which are also demonstrated in the online demo (see the links).

Sample code

 final Die die = new Die();
 die.setCaption("MyDie");
 die.setValue(1);

 die.addListener(new Randomizer.ClickListener() {
     public void randomizerClick(
             org.vaadin.teemu.randomizer.Randomizer.ClickEvent event) {
         // throw the Die when clicked
         die.randomize();
     }
 });

 die.addListener(new Property.ValueChangeListener() {
     public void valueChange(ValueChangeEvent event) {
         // show the value as a notification
         mainWindow.showNotification("Value: "
                 + event.getProperty().getValue());
     }
 });

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

Released
2010-02-21
Maturity
BETA
License
Apache License 2.0

Compatibility

Framework
Vaadin 6.2+
Browser
Internet Explorer
Internet Explorer
Internet Explorer
Firefox
Opera
Safari

Randomizer - Vaadin Add-on Directory

Want to throw some dice or toss a coin in your application? Randomizer - Vaadin Add-on Directory
Randomizer is a simple way to create lottery-like components in your application. The distribution package includes two examples, Die and CoinToss components which are also demonstrated in the online demo (see the links).
Online Demo
Source Code
Discussion Forum

Randomizer version 0.9
null

Online