Class EventUtil
java.lang.Object
com.vaadin.featurepack.desktop.events.EventUtil
Utility class to propagate UI events to relevant event handling methods.
- Author:
- Vaadin Ltd
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddComponentEventListener(com.vaadin.flow.component.Component c, com.vaadin.flow.component.ComponentEventListener cel) Registers a ComponentEventListener for the given Component.static voidaddKeyListener(com.vaadin.flow.component.Component c, KeyListener kl) Adds key listeners and propagates events to a combined event handling component,KeyListener.static voidinvokeAndWait(Runnable runnable) A Replacement for SwintUtilites.invokeAndWait()static voidinvokeLater(Runnable runnable) A Replacement for SwintUtilites.invokeLater()
-
Constructor Details
-
EventUtil
public EventUtil()
-
-
Method Details
-
addKeyListener
Adds key listeners and propagates events to a combined event handling component,KeyListener.- Parameters:
c- Componentkl- KeyListener
-
addComponentEventListener
public static void addComponentEventListener(com.vaadin.flow.component.Component c, com.vaadin.flow.component.ComponentEventListener cel) Registers a ComponentEventListener for the given Component.- Parameters:
c- Componentcel- ComponentEventListener
-
invokeLater
A Replacement for SwintUtilites.invokeLater()- Parameters:
runnable-
-
invokeAndWait
public static void invokeAndWait(Runnable runnable) throws InvocationTargetException, InterruptedException A Replacement for SwintUtilites.invokeAndWait()- Parameters:
runnable-- Throws:
InvocationTargetExceptionInterruptedException
-