Events are the basis of all user interaction handling in Vaadin. To handle events, you provide a listener object that receives the events of the particular event type.
Button button = new Button("Click Me!"); button.addListener(new Button.ClickListener() { public void buttonClick(ClickEvent event) { getWindow().showNotification("Thank You!"); } }); layout.addComponent(button);
Notice that while each of the event types have their corresponding listener types; the listener interfaces are not required to inherit the {@code Component.Listener} interface.
@see Component.Listener
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|