Package com.vaadin.ui
Class Component.Event
- java.lang.Object
-
- java.util.EventObject
-
- com.vaadin.event.ConnectorEvent
-
- com.vaadin.ui.Component.Event
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
AbstractSplitPanel.SplitPositionChangeEvent,Button.ClickEvent,CollapseEvent,Component.ErrorEvent,DragEndEvent,DragStartEvent,DropEvent,ExpandEvent,FieldEvents.BlurEvent,FieldEvents.FocusEvent,FileDropEvent,Grid.ColumnReorderEvent,Grid.ColumnResizeEvent,Grid.ColumnVisibilityChangeEvent,HasComponents.ComponentAttachEvent,HasComponents.ComponentDetachEvent,LoginForm.LoginEvent,MouseEvents.ClickEvent,MouseEvents.DoubleClickEvent,PopupView.PopupVisibilityEvent,SortEvent,TabSheet.SelectedTabChangeEvent,UI.WindowOrderUpdateEvent,UIEvents.PollEvent,Upload.ChangeEvent,Upload.FinishedEvent,Upload.StartedEvent,Window.CloseEvent,Window.ResizeEvent,Window.WindowModeChangeEvent,Window.WindowOrderChangeEvent
- Enclosing interface:
- Component
public static class Component.Event extends ConnectorEvent
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.Listenerinterface.- See Also:
Component.Listener, Serialized Form
-
-
Field Summary
-
Fields inherited from class java.util.EventObject
source
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ComponentgetComponent()Gets the component where the event occurred.-
Methods inherited from class com.vaadin.event.ConnectorEvent
getConnector
-
Methods inherited from class java.util.EventObject
getSource, toString
-
-
-
-
Constructor Detail
-
Event
public Event(Component source)
Constructs a new event with the specified source component.- Parameters:
source- the source component of the event
-
-
Method Detail
-
getComponent
public Component getComponent()
Gets the component where the event occurred.- Returns:
- the source component of the event
-
-