Package com.vaadin.classic.v8.ui
Class Event
- java.lang.Object
-
- java.util.EventObject
-
- com.vaadin.flow.component.ComponentEvent<com.vaadin.flow.component.Component>
-
- com.vaadin.classic.v8.ui.Event
-
- All Implemented Interfaces:
java.io.Serializable
- Direct Known Subclasses:
HasComponents.ComponentAttachEvent,HasComponents.ComponentDetachEvent,MouseEvents.ClickEvent
public class Event extends com.vaadin.flow.component.ComponentEvent<com.vaadin.flow.component.Component>Legacy version of Event class that resembles Vaadin 7/8'sComponent.EventAPI as closely as possible in order to facilitate migration to newer versions of Vaadin. 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
com.vaadin.legacy.ui.Listenerinterface.- See Also:
Listener, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Event(com.vaadin.flow.component.Component source)Constructs a new event with the specified source component.Event(com.vaadin.flow.component.Component source, boolean fromClient)Creates a new event using the given source and indicator whether the event originated from the client side or the server side.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.vaadin.flow.component.ComponentgetComponent()Gets the component where the event occurred.
-
-
-
Constructor Detail
-
Event
public Event(com.vaadin.flow.component.Component source)
Constructs a new event with the specified source component.- Parameters:
source- the source component of the event
-
Event
public Event(com.vaadin.flow.component.Component source, boolean fromClient)Creates a new event using the given source and indicator whether the event originated from the client side or the server side.- Parameters:
source- the source componentfromClient-trueif the event originated from the client side,falseotherwise
-
-