Package com.vaadin.flow.component
Class ComponentEvent<T extends Component>
java.lang.Object
java.util.EventObject
com.vaadin.flow.component.ComponentEvent<T>
- Type Parameters:
T- the event source type
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
AbstractAttachDetachEvent,AbstractField.ComponentValueChangeEvent,AbstractLogin.ForgotPasswordEvent,AbstractLogin.LoginEvent,Accordion.OpenedChangeEvent,AllFinishedEvent,BlurNotifier.BlurEvent,CellFocusEvent,ChartAddSeriesEvent,ChartAfterPrintEvent,ChartBeforePrintEvent,ChartClickEvent,ChartDrillupAllEvent,ChartDrillupEvent,ChartLoadEvent,ChartRedrawEvent,ChartSelectionEvent,ClickEvent,ClientItemToggleEvent,CollapseEvent,ColumnReorderEvent,ColumnResizeEvent,ComboBoxBase.CustomValueSetEvent,CompositionEvent,ConfirmDialog.CancelEvent,ConfirmDialog.ClosedEvent,ConfirmDialog.ConfirmEvent,ConfirmDialog.OpenedChangeEvent,ConfirmDialog.RejectEvent,ContextMenuBase.OpenedChangeEvent,Crud.CancelEvent,Crud.DeleteEvent,Crud.EditEvent,Crud.NewEvent,Crud.SaveEvent,CrudI18nUpdatedEvent,DashboardItemMovedEvent,DashboardItemMoveModeChangedEvent,DashboardItemRemovedEvent,DashboardItemResizedEvent,DashboardItemResizeModeChangedEvent,DashboardItemSelectedChangedEvent,DatePicker.InvalidChangeEvent,DatePicker.OpenedChangeEvent,Details.OpenedChangeEvent,Dialog.ClosedEvent,Dialog.DialogCloseActionEvent,Dialog.DialogDraggedEvent,Dialog.DialogResizeEvent,Dialog.OpenedChangeEvent,DragEndEvent,DragStartEvent,DrilldownEvent,DropEvent,ExpandEvent,FileRejectedEvent,FileRemovedEvent,FinishedEvent,FocusNotifier.FocusEvent,GridContextMenu.GridContextMenuItemClickEvent,GridDragEndEvent,GridDragStartEvent,GridDropEvent,GridPro.CellEditStartedEvent,GridPro.ItemPropertyChangedEvent,IdentifierProviderChangeEvent,InputEvent,ItemCountChangeEvent,KeyboardEvent,MapClickEvent,MapFeatureClickEvent,MapFeatureDropEvent,MapViewMoveEndEvent,MasterDetailLayout.BackdropClickEvent,MasterDetailLayout.DetailEscapePressEvent,MessageInput.SubmitEvent,NativeDetails.ToggleEvent,Notification.OpenedChangeEvent,PointClickEvent,PointDragEvent,PointDragStartEvent,PointDropEvent,PointLegendItemClickEvent,PointMouseOutEvent,PointMouseOverEvent,PointRemoveEvent,PointSelectEvent,PointUnselectEvent,PointUpdateEvent,PollEvent,Popover.OpenedChangeEvent,ProgressUpdateEvent,Select.InvalidChangeEvent,Select.OpenedChangeEvent,SeriesAfterAnimateEvent,SeriesCheckboxClickEvent,SeriesClickEvent,SeriesHideEvent,SeriesLegendItemClickEvent,SeriesMouseOutEvent,SeriesMouseOverEvent,SeriesShowEvent,SortEvent,SplitLayout.SplitterDragendEvent,StartedEvent,Tabs.SelectedChangeEvent,TabSheet.SelectedChangeEvent,TimePicker.InvalidChangeEvent,UI.BrowserLeaveNavigationEvent,UI.BrowserNavigateEvent,UI.BrowserRefreshEvent,UploadCompleteEvent,UploadStartEvent,WebComponentUI.WebComponentConnectEvent,XAxesExtremesSetEvent,YAxesExtremesSetEvent
An event whose source is a
Component.
Typically used together with ComponentEventBus.
- Since:
- 1.0
- Author:
- Vaadin Ltd
- See Also:
-
Field Summary
Fields inherited from class java.util.EventObject
source -
Constructor Summary
ConstructorsConstructorDescriptionComponentEvent(T 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
Modifier and TypeMethodDescriptionbooleanChecks if this event originated from the client side.voidUnregisters the event listener currently being invoked.Methods inherited from class java.util.EventObject
toString
-
Constructor Details
-
ComponentEvent
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
-
-
Method Details
-
getSource
- Overrides:
getSourcein classEventObject
-
isFromClient
public boolean isFromClient()Checks if this event originated from the client side.- Returns:
trueif the event originated from the client side,falseotherwise
-
unregisterListener
public void unregisterListener()Unregisters the event listener currently being invoked.This method can only be called from within an event listener. Calling it will remove the current event listener so no further events are passed to it.
-