Method which is called when the tab is switched.<p>

@param toTab the tab to which the user is switching
770720
protected void handleSwitchTab(int toTab) {

        switch (toTab) {
            case 0:
                rebuildSimpleTab();
                break;
            case 1:
                rebuildIndividualTab();
                break;
            case 2:
                rebuildSharedTab();
                break;
            default:
                break;
        }
        if (m_disabledReason != null) {
            disableInput(m_disabledReason);
        } else {
            m_form.validateAllFields();
        }
    }
750819
public static synchronized void setToggling (AbstractButton b)
    {
        if (_toggler == null) {
            _toggler = new ActionListener () {
                public void actionPerformed (ActionEvent event)
                {
                    AbstractButton but = (AbstractButton) event.getSource();
                    but.setSelected(!but.isSelected());
                }
            };
        }

        b.addActionListener(_toggler);
    }
1084078
public TabShowingAction show(final Tab tabToShow, final LmlTabbedPaneListener listener) {
        this.tabToShow = tabToShow;
        this.listener = listener;
        shown = false;
        return this;
    }
665500
protected void calculateTabPosition()
	{
		boolean isHorizontal = tabPosition == ComponentPosition.TOP || tabPosition == ComponentPosition.BOTTOM;
		UITab lastTab = null;

		for (UITab tab : listTabs.keySet())
		{
			if (isHorizontal)
			{
				IPosition p = lastTab != null ? Position.rightOf(this, lastTab, spacing) : Position.of(offset, 0);
				tab.setPosition(p);
			}
			else
			{
				IPosition p = lastTab != null ? Position.below(this, lastTab, spacing) : Position.of(0, offset);
				tab.setPosition(p);
			}
			lastTab = tab;
		}
	}
1127723
function () {
            this.changeProperty("selectedTab", this._cfg.tabId);
            if (this._cfg.waiAria) {
                // Focusing the Tab before focusing the TabPanel is not enough to make the screen reader read the tab's title first
                // A sufficient timeout would be necessary, but we can't program that way safely
                // this._focus();
                var controlledTabPanelId = this._getControlledTabPanelId();
                if (controlledTabPanelId != null) {
                    var tabPanelElement = ariaUtilsDom.getElementById(controlledTabPanelId);
                    ariaTemplatesNavigationManager.focusFirst(tabPanelElement);
                }
            }
        }
722279
public void setShowTabNames(boolean showTabNames) {
        for (int i = 0; i < getTabCount(); i++) {
            String title = showTabNames ? getComponentAt(i).getName() : "";
            setTitleAt(i, title);
        }
    }
1332267
function tabView_openTab(aSpec) {
    var spec = aSpec || {};
    var group = spec.group;

    if (!group) {
      throw new Error(arguments.callee.name + ": Group not specified.");
    }

    var button = this.getElement({
      type: "group_newTabButton",
      value: group
    });

    this._controller.click(button);
    this.waitForClosed();
  }
394525
void toggleTable(Button toggleButton) {

        I_CmsToggleTable table = (I_CmsToggleTable)m_table;
        table.toggle(!CmsVaadinUtils.isButtonPressed(toggleButton));
        CmsVaadinUtils.toggleButton(toggleButton);
        if (!CmsStringUtil.isEmptyOrWhitespaceOnly(m_filterTable.getValue())) {
            filterTable(m_filterTable.getValue());
        }
        updateInfoButton();
    }
998172
public void createTabs(ILaunchConfigurationDialog dialog, String mode) {
    setTabs(new ILaunchConfigurationTab[] { new JavaArgumentsTab(),
        new JavaJRETab(), new JavaClasspathTab(), new CommonTab() });
  }
442794
def swapTabType(self, action):
        
        # for a new tab, use the add tab slot
        if not self._currentPanel.count():
            self.addView(action)
            return
        
        # make sure we're not trying to switch to the same type
        viewType = self._viewWidget.viewType(action.text())
        view = self._currentPanel.currentView()
        if type(view) == viewType:
            return
        
        # create a new view and close the old one
        self._viewWidget.setUpdatesEnabled(False)
        self._currentPanel.blockSignals(True)
        
        # create the new view
        view.close()
        
        index       = self._currentPanel.currentIndex()
        new_view    = viewType.createInstance(self._viewWidget,
                                              self._viewWidget)
        
        # add the new view
        self._currentPanel.insertTab(index,
                                     new_view, 
                                     new_view.windowTitle())
        
        self._currentPanel.blockSignals(False)
        self._currentPanel.setCurrentIndex(index)
        self._viewWidget.setUpdatesEnabled(True)
965406
@UiHandler("m_button")
    protected void onClick(ClickEvent event) {

        m_tab.removeParam(m_paramKey);
        m_tab = null;
        removeFromParent();
    }
1013886
public void setActiveTab(UITab tab)
	{
		if (attachedContainer == null)
		{
			activeTab = tab;
			return;
		}

		if (activeTab == tab)
			return;

		if (activeTab != null)
			activeTab.setActive(false);

		activeTab = tab;
		if (tab == null)
			return;

		tab.setActive(true);
	}
606185
function didTabOrderChange($currTabLis, updatedTabs, propNames) {
      var isTabOrderChanged = false;
  
      $currTabLis.each(function (currDomIdx) {
        var newIdx = getTabIndexByPaneId(updatedTabs, propNames.paneId, $(this).data('tab')[propNames.paneId]);
  
        if ((newIdx > -1) && (newIdx !== currDomIdx)) { // tab moved
          isTabOrderChanged = true;
          return false; // exit .each() loop
        }
      });
  
      return isTabOrderChanged;
    }
122999
public void setTabindex(java.lang.String tabindex) {
        getStateHelper().put(PropertyKeys.tabindex, tabindex);
        handleAttribute("tabindex", tabindex);
    }
833349
function( contentItem ) {
		var i, j, isActive, activeTab;

		if (this.activeContentItem === contentItem) return;
		
		for( i = 0; i < this.tabs.length; i++ ) {
			isActive = this.tabs[ i ].contentItem === contentItem;
			this.tabs[ i ].setActive( isActive );
			if( isActive === true ) {
				this.activeContentItem = contentItem;
				this.parent.config.activeItemIndex = i;
			}
		}

		if (this.layoutManager.config.settings.reorderOnTabMenuClick) {
			/**
			 * If the tab selected was in the dropdown, move everything down one to make way for this one to be the first.
			 * This will make sure the most used tabs stay visible.
			 */
			if (this._lastVisibleTabIndex !== -1 && this.parent.config.activeItemIndex > this._lastVisibleTabIndex) {
				activeTab = this.tabs[this.parent.config.activeItemIndex];
				for ( j = this.parent.config.activeItemIndex; j > 0; j-- ) {
					this.tabs[j] = this.tabs[j - 1];
				}
				this.tabs[0]                       = activeTab;
				this.parent.config.activeItemIndex = 0;
			}
		}

		this._updateTabSizes();
		this.parent.emitBubblingEvent( 'stateChanged' );
	}
470477
private void rebuildSharedTab() {

        m_form.removeGroup(CmsPropertyPanel.TAB_SHARED);
        CmsPropertyPanel panel = ((CmsPropertyPanel)m_form.getWidget());
        panel.clearTab(CmsPropertyPanel.TAB_SHARED);
        internalBuildFields(Mode.resource);
        m_form.renderGroup(CmsPropertyPanel.TAB_SHARED);
    }
929332
public A_CmsTab getTab(GalleryTabId tabId) {

        for (A_CmsTab tab : m_tabbedPanel) {
            if (tabId == GalleryTabId.valueOf(tab.getTabId())) {
                return tab;
            }
        }
        return null;
    }