com.vaadin.ui.declarative
Class Design.DefaultComponentMapper

java.lang.Object
  extended by com.vaadin.ui.declarative.Design.DefaultComponentMapper
All Implemented Interfaces:
Design.ComponentMapper, java.io.Serializable
Enclosing class:
Design

public static class Design.DefaultComponentMapper
extends java.lang.Object
implements Design.ComponentMapper

Default implementation of Design.ComponentMapper,

Since:
7.5.0
See Also:
Serialized Form

Constructor Summary
Design.DefaultComponentMapper()
           
 
Method Summary
 java.lang.String componentToTag(Component component, DesignContext context)
          Resolves a tag name from a component.
 Component tagToComponent(java.lang.String tagName, Design.ComponentFactory componentFactory, DesignContext context)
          Resolves and creates a component using the provided component factory based on a tag name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Design.DefaultComponentMapper

public Design.DefaultComponentMapper()
Method Detail

tagToComponent

public Component tagToComponent(java.lang.String tagName,
                                Design.ComponentFactory componentFactory,
                                DesignContext context)
Description copied from interface: Design.ComponentMapper
Resolves and creates a component using the provided component factory based on a tag name.

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.

Specified by:
tagToComponent in interface Design.ComponentMapper
Parameters:
tagName - the tag name to create a component for
componentFactory - the component factory that actually creates a component based on a fully qualified class name
context - the design context for which the component is created
Returns:
a newly created component

componentToTag

public java.lang.String componentToTag(Component component,
                                       DesignContext context)
Description copied from interface: Design.ComponentMapper
Resolves a tag name from a component.

Specified by:
componentToTag in interface Design.ComponentMapper
Parameters:
component - the component to get a tag name for
context - the design context for which the tag name is needed
Returns:
the tag name corresponding to the component


Copyright © 2000-2014 Vaadin Ltd. All Rights Reserved.