public static class Component.Event extends ConnectorEvent
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
Component.Listener interface.
Component.Listener,
Serialized Formsource| Constructor and Description |
|---|
Event(Component source)
Constructs a new event with the specified source component.
|
| Modifier and Type | Method and Description |
|---|---|
Component |
getComponent()
Gets the component where the event occurred.
|
getConnectorgetSource, toStringpublic Event(Component source)
source - the source component of the eventpublic Component getComponent()
Copyright © 2023 Vaadin Ltd. All rights reserved.