Package com.vaadin.mpr.core
Class AbstractLegacyWrapper
java.lang.Object
com.vaadin.flow.component.Component
com.vaadin.mpr.core.AbstractLegacyWrapper
- All Implemented Interfaces:
com.vaadin.flow.component.AttachNotifier,com.vaadin.flow.component.DetachNotifier,com.vaadin.flow.component.HasElement,com.vaadin.flow.component.HasSize,com.vaadin.flow.component.HasStyle,Serializable
@Tag("div")
public abstract class AbstractLegacyWrapper
extends com.vaadin.flow.component.Component
implements com.vaadin.flow.component.HasSize, com.vaadin.flow.component.HasStyle
A wrapper that allows adding legacy components into Flow layouts.
By default the wrapper creates a div on the client side, where the
legacy component is added. The wrapper div inherits the width and
height of its parent. This behavior can be changed by setting a specific size
to it.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringprotected static Map<com.vaadin.ui.Component,WeakReference<AbstractLegacyWrapper>> static final Stringstatic final String -
Constructor Summary
ConstructorsConstructorDescriptionAbstractLegacyWrapper(com.vaadin.ui.Component legacyComponent) LegacyWrapper constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract AbstractMprUIContentGet a new MprUIContent object instance.com.vaadin.ui.ComponentGets the legacy component set in this wrapper in the constructor.protected abstract AbstractLegacyEmbedgetLegacyEmbed(com.vaadin.flow.component.UI ui) Get a LegacyEmbed object instance for given Flow UI.voidonEnabledStateChanged(boolean enabled) voidvoidMethods inherited from class com.vaadin.flow.component.Component
addListener, findAncestor, fireEvent, from, get, getChildren, getElement, getEventBus, getId, getListeners, getLocale, getParent, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getUI, hasListener, isAttached, isTemplateMapped, isVisible, onAttach, onDetach, removeFromParent, scrollIntoView, scrollIntoView, set, setElement, setId, 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.HasElement
getElementMethods inherited from interface com.vaadin.flow.component.HasSize
getHeight, getHeightUnit, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getWidth, getWidthUnit, setHeight, setHeight, setMaxHeight, setMaxHeight, setMaxWidth, setMaxWidth, setMinHeight, setMinHeight, setMinWidth, setMinWidth, setSizeUndefined, setWidth, setWidth, setWidthFullMethods inherited from interface com.vaadin.flow.component.HasStyle
addClassName, addClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassName
-
Field Details
-
THEME_KEY
- See Also:
-
WIDGETSET_KEY
- See Also:
-
CONTEXT_RELATIVE_PATH
- See Also:
-
legacyMap
-
-
Constructor Details
-
AbstractLegacyWrapper
public AbstractLegacyWrapper(com.vaadin.ui.Component legacyComponent) LegacyWrapper constructor.If this is the first legacy component then the Legacy client will be configured on attach of component.
- Parameters:
legacyComponent- Legacy component to wrap
-
-
Method Details
-
getLegacyComponent
public com.vaadin.ui.Component getLegacyComponent()Gets the legacy component set in this wrapper in the constructor.- Returns:
- the legacy component, not
null
-
onEnabledStateChanged
public void onEnabledStateChanged(boolean enabled) - Overrides:
onEnabledStateChangedin classcom.vaadin.flow.component.Component
-
setSizeFull
public void setSizeFull()- Specified by:
setSizeFullin interfacecom.vaadin.flow.component.HasSize
-
setHeightFull
public void setHeightFull()- Specified by:
setHeightFullin interfacecom.vaadin.flow.component.HasSize
-
getLegacyEmbed
Get a LegacyEmbed object instance for given Flow UI.- Parameters:
ui- Flow UI- Returns:
- LegacyEmbed instance
-
createMprUIContent
Get a new MprUIContent object instance.- Returns:
- MprUIContent instance
-