Class LDefaultComponentManagementRegistry
java.lang.Object
com.vaadin.flow.component.Component
com.vaadin.flow.component.Composite<com.vaadin.flow.component.html.Div>
software.xdev.vaadin.maps.leaflet.registry.LDefaultComponentManagementRegistry
- All Implemented Interfaces:
com.vaadin.flow.component.AttachNotifier,com.vaadin.flow.component.DetachNotifier,com.vaadin.flow.component.HasElement,com.vaadin.flow.component.HasStyle,Serializable,LComponentManagementRegistry
public class LDefaultComponentManagementRegistry
extends com.vaadin.flow.component.Composite<com.vaadin.flow.component.html.Div>
implements LComponentManagementRegistry
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static class -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected AtomicIntegerprotected Map<LComponent<?>, Integer> protected static final AtomicLongprotected AtomicIntegerprotected final tools.jackson.databind.ObjectWriter -
Constructor Summary
ConstructorsConstructorDescriptionLDefaultComponentManagementRegistry(com.vaadin.flow.component.HasComponents parent) LDefaultComponentManagementRegistry(com.vaadin.flow.component.HasComponents parent, tools.jackson.databind.ObjectWriter optionsWriter) -
Method Summary
Modifier and TypeMethodDescription<C extends LComponent<C>>
CCreates the component on the client side and tracks it.voidclearAll()Clears all tracked elements.clientComponentJsAccessor(LComponent<?> component) Returns an expression to access the component on the client with JavaScriptprotected Stringcom.vaadin.flow.component.page.PendingJavaScriptResultWrapper forElement.executeJs(String, Object...).voidTries to free up unused components on the client.protected static tools.jackson.databind.ObjectWriter<C extends LComponent<C>>
voidremove(C component, boolean freeUpClientWhenNoMatch) Removes the tracked component from the client.protected StringwriteOptions(Object options, String nullDefault) writeOptions(LComponentOptions<?> options) writeOptionsOptionalNextParameter(LComponentOptions<?> options) writeOptionsOrEmptyObject(LComponentOptions<?> options) Methods inherited from class com.vaadin.flow.component.Composite
getChildren, getContent, getElement, initContentMethods inherited from class com.vaadin.flow.component.Component
addListener, bindVisible, findAncestor, fireEvent, from, get, getEventBus, getId, getListeners, getLocale, getParent, getTestId, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getUI, hasListener, isAttached, isTemplateMapped, isVisible, onAttach, onDetach, onEnabledStateChanged, removeFromParent, scrollIntoView, scrollIntoView, set, setElement, setId, setTestId, setVisibleMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.vaadin.flow.component.AttachNotifier
addAttachListenerMethods inherited from interface com.vaadin.flow.component.DetachNotifier
addDetachListenerMethods inherited from interface com.vaadin.flow.component.HasStyle
addClassName, addClassNames, bindClassName, bindClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassNameMethods inherited from interface software.xdev.vaadin.maps.leaflet.registry.LComponentManagementRegistry
remove
-
Field Details
-
NEXT_ID
-
componentIndices
-
nextComponentId
-
clientMapSize
-
optionsWriter
protected final tools.jackson.databind.ObjectWriter optionsWriter
-
-
Constructor Details
-
LDefaultComponentManagementRegistry
public LDefaultComponentManagementRegistry(com.vaadin.flow.component.HasComponents parent) -
LDefaultComponentManagementRegistry
public LDefaultComponentManagementRegistry(com.vaadin.flow.component.HasComponents parent, tools.jackson.databind.ObjectWriter optionsWriter)
-
-
Method Details
-
writeOptionsOptionalNextParameter
- Specified by:
writeOptionsOptionalNextParameterin interfaceLComponentManagementRegistry
-
writeOptions
- Specified by:
writeOptionsin interfaceLComponentManagementRegistry
-
writeOptionsOrEmptyObject
- Specified by:
writeOptionsOrEmptyObjectin interfaceLComponentManagementRegistry
-
writeOptions
-
clientComponents
-
add
public <C extends LComponent<C>> C add(C component, String jsConstructorCallExpression, Object... parameters) Description copied from interface:LComponentManagementRegistryCreates the component on the client side and tracks it.- Specified by:
addin interfaceLComponentManagementRegistry
-
clientComponentJsAccessor
Description copied from interface:LComponentManagementRegistryReturns an expression to access the component on the client with JavaScript- Specified by:
clientComponentJsAccessorin interfaceLComponentManagementRegistry
-
execJs
Description copied from interface:LComponentManagementRegistryWrapper forElement.executeJs(String, Object...). Usage is normally not recommended however there are some corner cases where it's required.- Specified by:
execJsin interfaceLComponentManagementRegistry
-
remove
Description copied from interface:LComponentManagementRegistryRemoves the tracked component from the client. If the component can't be foundLComponentManagementRegistry.freeUpClient()is called when specified.- Specified by:
removein interfaceLComponentManagementRegistry
-
freeUpClient
public void freeUpClient()Description copied from interface:LComponentManagementRegistryTries to free up unused components on the client.- Specified by:
freeUpClientin interfaceLComponentManagementRegistry
-
clearAll
public void clearAll()Description copied from interface:LComponentManagementRegistryClears all tracked elements.- Specified by:
clearAllin interfaceLComponentManagementRegistry
-
getDefaultWriterForOptions
protected static tools.jackson.databind.ObjectWriter getDefaultWriterForOptions()
-