public static class Design.DefaultComponentMapper extends Object implements Design.ComponentMapper
Design.ComponentMapper
.Constructor and Description |
---|
DefaultComponentMapper() |
Modifier and Type | Method and Description |
---|---|
String |
componentToTag(Component component,
DesignContext context)
Resolves a tag name from a component.
|
Component |
tagToComponent(String tagName,
Design.ComponentFactory componentFactory,
DesignContext context)
Resolves and creates a component using the provided component factory
based on a tag name.
|
public Component tagToComponent(String tagName, Design.ComponentFactory componentFactory, DesignContext context)
Design.ComponentMapper
This method should be in sync with
Design.ComponentMapper.componentToTag(Component, DesignContext)
so that the
resolved tag for a created component is the same as the tag for which
the component was created.
tagToComponent
in interface Design.ComponentMapper
tagName
- the tag name to create a component forcomponentFactory
- the component factory that actually creates a component
based on a fully qualified class namecontext
- the design context for which the component is createdpublic String componentToTag(Component component, DesignContext context)
Design.ComponentMapper
componentToTag
in interface Design.ComponentMapper
component
- the component to get a tag name forcontext
- the design context for which the tag name is neededCopyright © 2021 Vaadin Ltd. All rights reserved.