com.vaadin.ui.
Class Component.Event
java.lang.Object
java.util.EventObject
com.vaadin.ui.Component.Event
All Implemented Interfaces:
Direct Known Subclasses:
AbstractField.ReadOnlyStatusChangeEvent, Button.ClickEvent, Component.ErrorEvent, ComponentContainer.ComponentAttachEvent, ComponentContainer.ComponentDetachEvent, Field.ValueChangeEvent, FieldEvents.BlurEvent, FieldEvents.FocusEvent, FieldEvents.TextChangeEvent, Label.ValueChangeEvent, LoginForm.LoginEvent, MouseEvents.ClickEvent, MouseEvents.DoubleClickEvent, PopupView.PopupVisibilityEvent, Table.ColumnReorderEvent, Table.ColumnResizeEvent, TabSheet.SelectedTabChangeEvent, Tree.CollapseEvent, Tree.ExpandEvent, Upload.FinishedEvent, Upload.StartedEvent, UriFragmentUtility.FragmentChangedEvent, Window.CloseEvent, Window.ResizeEvent
Enclosing interface:
- extends EventObject
public static class Component.Event
Superclass of all component originated events.
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.
See Also:
Field Summary |
---|
Fields inherited from class java.util.EventObject |
---|
source |
Constructor Summary | |
---|---|
Component.Event(Component source)
Constructs a new event with the specified source component. |
Method Summary | |
---|---|
Component |
getComponent()
Gets the component where the event occurred. |
Methods inherited from class java.util.EventObject |
---|
getSource, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
Component.Event
public Component.Event(Component source)
- Parameters:
source
- the source component of the event
Constructs a new event with the specified source component.
Method Detail |
---|
getComponent
public Component getComponent()
- Returns:
- the source component of the event
Gets the component where the event occurred.