function MaterialLayoutTab(tab, tabs, panels, layout) {

    /**
     * Auxiliary method to programmatically select a tab in the UI.
     */
    function selectTab() {
      layout.resetTabState_(tabs);
      tab.classList.add(layout.CssClasses_.IS_ACTIVE);
    }

    if (layout.tabBar_.classList.contains(
        layout.CssClasses_.JS_RIPPLE_EFFECT)) {
      var rippleContainer = document.createElement('span');
      rippleContainer.classList.add(layout.CssClasses_.RIPPLE_CONTAINER);
      rippleContainer.classList.add(layout.CssClasses_.JS_RIPPLE_EFFECT);
      var ripple = document.createElement('span');
      ripple.classList.add(layout.CssClasses_.RIPPLE);
      rippleContainer.appendChild(ripple);
      tab.appendChild(rippleContainer);
    }

    tab.addEventListener('click', function(e) {
      e.preventDefault();
      selectTab();
    });

    tab.show = selectTab;
  }
Constructor for an individual tab.

@constructor
@param {HTMLElement} tab The HTML element for the tab.
@param {!Array<HTMLElement>} tabs Array with HTML elements for all tabs.
@param {!Array<HTMLElement>} panels Array with HTML elements for all panels.
@param {MaterialLayout} layout The MaterialLayout object that owns the tab.