Class SimpleElementBindingStrategy

  • All Implemented Interfaces:
    BindingStrategy<elemental.dom.Element>

    public class SimpleElementBindingStrategy
    extends Object
    implements BindingStrategy<elemental.dom.Element>
    Binding strategy for a simple (not template) Element node.
    Since:
    1.0
    Author:
    Vaadin Ltd
    • Constructor Detail

      • SimpleElementBindingStrategy

        public SimpleElementBindingStrategy()
    • Method Detail

      • create

        public elemental.dom.Element create​(StateNode node)
        Description copied from interface: BindingStrategy
        Creates a DOM node for the node.
        Specified by:
        create in interface BindingStrategy<elemental.dom.Element>
        Parameters:
        node - the state node for which to create a DOM node, not null
        Returns:
        the DOM node, not null
      • isApplicable

        public boolean isApplicable​(StateNode node)
        Description copied from interface: BindingStrategy
        Returns true is the strategy is applicable to the node.
        Specified by:
        isApplicable in interface BindingStrategy<elemental.dom.Element>
        Parameters:
        node - the state node to check against of
        Returns:
        true if the strategy is applicable to the node
      • bind

        public void bind​(StateNode stateNode,
                         elemental.dom.Element htmlNode,
                         BinderContext nodeFactory)
        Description copied from interface: BindingStrategy
        Binds a DOM node to the stateNode using context to create and bind nodes of other types.
        Specified by:
        bind in interface BindingStrategy<elemental.dom.Element>
        Parameters:
        stateNode - the state node to bind, not null
        htmlNode - the DOM node, not null
        nodeFactory - binder context to create and construct HTML nodes of other types
      • needsRebind

        public static boolean needsRebind​(StateNode node)
        Checks whether the node needs re-bind.

        The node needs re-bind if it was initially invisible. As a consequence such node has not be bound. It has been bound in respect to visibility feature only (partially bound). Such node needs re-bind once it becomes visible.

        Parameters:
        node - the node to check
        Returns:
        true if the node is not entirely bound and needs re-bind later on