M - public abstract class JavascriptTemplate<M extends com.vaadin.flow.templatemodel.TemplateModel>
extends com.vaadin.flow.component.polymertemplate.PolymerTemplate<M>
| Modifier | Constructor and Description |
|---|---|
protected |
JavascriptTemplate() |
protected |
JavascriptTemplate(com.vaadin.flow.component.HasElement parent) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
clearConsumers()
Clear the consumers map.
|
protected <T extends Serializable> |
notifyConsumers(Class<T> type,
T object)
Notify all the consumers of the given class type to consume the given value.
|
protected <T extends Serializable> |
registerConsumer(Class<T> type,
com.vaadin.flow.function.SerializableConsumer<T> consumer)
Add a new consumer to the set of consumers for the specified type.
|
protected <T extends Serializable> |
registerConsumer(Class<T> type,
com.vaadin.flow.function.SerializableConsumer<T> consumer,
Runnable firstAddedCallback,
Runnable lastRemovedCallback)
Add a new consumer to the set of consumers for the specified type.
|
protected <T extends Serializable> |
unregisterAllConsumers(Class<T> type) |
protected <T extends Serializable> |
unregisterAllConsumers(Class<T> type,
Runnable unregisterCallback) |
getModel, getModelType, getModelType, getStateNode, initModel, isSupportedClassaddListener, fireEvent, from, get, getElement, getEventBus, getId, getLocale, getParent, getTranslation, getTranslation, getUI, hasListener, isTemplateMapped, isVisible, onAttach, onDetach, onEnabledStateChanged, set, setElement, setId, setVisibleprotected JavascriptTemplate()
protected JavascriptTemplate(com.vaadin.flow.component.HasElement parent)
protected <T extends Serializable> com.vaadin.flow.shared.Registration registerConsumer(Class<T> type, com.vaadin.flow.function.SerializableConsumer<T> consumer)
type - Class type of the consumed value.consumer - The consumer that should be added to the consumer set.protected <T extends Serializable> com.vaadin.flow.shared.Registration registerConsumer(Class<T> type, com.vaadin.flow.function.SerializableConsumer<T> consumer, Runnable firstAddedCallback, Runnable lastRemovedCallback)
type - Class type of the consumed value.firstAddedCallback - called before the first consumer for the type is registeredlastRemovedCallback - called after the last consumer for the type was removedconsumer - The consumer that should be added to the consumer set.protected <T extends Serializable> void unregisterAllConsumers(Class<T> type)
protected <T extends Serializable> void unregisterAllConsumers(Class<T> type, Runnable unregisterCallback)
protected <T extends Serializable> void notifyConsumers(Class<T> type, T object)
type - The class type of the consumers that should be notified.object - The object that should be consumed by the consumers.protected void clearConsumers()
Copyright © 2020 XDEV Software Corp.. All rights reserved.