public class Debouncer extends Object
getOrCreate(Node, String, double)
to either create a new instance or get an existing instance that currently
tracks a sequence of similar events.| Modifier and Type | Method and Description |
|---|---|
static Debouncer |
getOrCreate(elemental.dom.Node element,
String identifier,
double debounce)
Gets an existing debouncer or creates a new one associated with the given
DOM node, identifier and debounce timeout.
|
boolean |
trigger(JsSet<String> phases,
Consumer<String> command)
Informs this debouncer that an event has occurred.
|
public boolean trigger(JsSet<String> phases, Consumer<String> command)
phases - a set of strings identifying the phases for which the
triggered event should be considered.command - a consumer that will may be asynchronously invoked with a
phase code if an associated phase is triggeredtrue if the event should be processed as-is without
delayingpublic static Debouncer getOrCreate(elemental.dom.Node element, String identifier, double debounce)
element - the DOM node to which this debouncer is boundidentifier - a unique identifier string in the scope of the provided
elementdebounce - the debounce timeoutCopyright © 2000–2018 Vaadin Ltd. All rights reserved.