Returns a specific tab from this tab group.

        If the tab is not allowed or not enabled this method returns ``None``.

        If the tab is disabled but you wish to return it anyway, you can pass
        ``True`` to the allow_disabled argument.
199309
def get_tab(self, tab_name, allow_disabled=False):
        
        tab = self._tabs.get(tab_name, None)
        if tab and tab._allowed and (tab._enabled or allow_disabled):
            return tab
        return None
1095750
def available(name):
    '''
    
    '''
    (enabled_services, disabled_services) = _get_service_list(include_enabled=True,
                                                              include_disabled=True)
    return name in enabled_services or name in disabled_services
639535
def load_tab_data(self):
        """"""
        for tab in self._tabs.values():
            if tab.load and not tab.data_loaded:
                try:
                    tab._data = tab.get_context_data(self.request)
                except Exception:
                    tab._data = False
                    exceptions.handle(self.request)
343942
def should_select_tab_try(vc)
      method_name = :should_select_tab
      return true unless can_send_method_to_delegate?(method_name)

      pm_tab_delegate.send(method_name, vc)
    end
740728
public String getActiveTabName() {

        if (m_activeTab < 0) {
            getActiveTab();
        }
        List<String> tabNames = getTabs();
        try {
            return tabNames.get(m_activeTab - 1);
        } catch (IndexOutOfBoundsException e) {
            // should usually never happen
            if (LOG.isInfoEnabled()) {
                LOG.info(e.getLocalizedMessage());
            }
            return null;
        }
    }
710693
function (item, disabled) {
            return {
                title: item.title,
                aClass: item.aClass,
                value: item.aClass ? '' : item.value,
                liClass: disabled ? scope.disabledClass : '',
                pgHref: disabled ? '' : scope.pgHref.replace(regex, item.page),
                action: function () {
                    if (!disabled) {
                        internalAction(scope, item.page);
                    }
                }
            };    
        }
88523
def active_pt_window(self):
        "  "
        if self.active_tab:
            w = self.active_tab.active_window
            if w:
                return w.pt_window
870442
def removeTab(self, tab):
        """"""
        if not isinstance(tab, int):
            tab = self.indexOf(tab)
        return super(FwTabWidget, self).removeTab(tab)
967824
def get_widget(self, index=None, path=None, tabs=None):
        
        if (index and tabs) or (path and tabs):
            return tabs.widget(index)
        elif self.plugin:
            return self.get_plugin_tabwidget(self.plugin).currentWidget()
        else:
            return self.plugins_tabs[0][0].currentWidget()
246350
def get_plugin_tabwidget(self, plugin):
        """"""
        # The tab widget is named "tabs" in the editor plugin while it is
        # named "tabwidget" in the notebook plugin.
        try:
            tabwidget = plugin.get_current_tab_manager().tabs
        except AttributeError:
            tabwidget = plugin.get_current_tab_manager().tabwidget

        return tabwidget
387927
def _tab(content):
    
    response = _data_frame(content).to_csv(index=False,sep='\t')
    return response
375018
def _get_tab(cls):
        """"""

        if not cls._tabs['dec_cobs']:
            # Compute the COBS table for decoding
            cls._tabs['dec_cobs']['\xff'] = (255, '')
            cls._tabs['dec_cobs'].update(dict((chr(l), (l, '\0'))
                                              for l in range(1, 255)))

            # Compute the COBS table for encoding
            cls._tabs['enc_cobs'] = [(255, '\xff'),
                                     dict((l, chr(l))
                                          for l in range(1, 255)),
                                     ]

        return cls._tabs['dec_cobs'], cls._tabs['enc_cobs']
520588
def go_to_previous_tab(self):
        
        self.active_tab_index = (self.active_tab_index - 1 +
                                 len(self.tab_pages)) % len(self.tab_pages)
1020664
def keep_only_sticked_and_selected_tabs(self):
        """"""
        # Only if the user didn't deactivate this behaviour
        if not global_gui_config.get_config_value('KEEP_ONLY_STICKY_STATES_OPEN', True):
            return

        page_id = self.view.notebook.get_current_page()
        # No tabs are open
        if page_id == -1:
            return

        page = self.view.notebook.get_nth_page(page_id)
        current_state_identifier = self.get_state_identifier_for_page(page)

        states_to_be_closed = []
        # Iterate over all tabs
        for state_identifier, tab_info in list(self.tabs.items()):
            # If the tab is currently open, keep it open
            if current_state_identifier == state_identifier:
                continue
            # If the tab is sticky, keep it open
            if tab_info['is_sticky']:
                continue
            # Otherwise close it
            states_to_be_closed.append(state_identifier)

        for state_identifier in states_to_be_closed:
            self.close_page(state_identifier, delete=False)
823363
def accel_rename_current_tab(self, *args):
        
        page_num = self.get_notebook().get_current_page()
        page = self.get_notebook().get_nth_page(page_num)
        self.get_notebook().get_tab_label(page).on_rename(None)
        return True
1303214
@Override
    public void selectTab(final String text) {
        for (int i = 0; i < tabs.size(); i++) {
            if (text.equals(tabs.get(i).getText())) {
                selectTab(i);
                return;
            }
        }

        // not found in visible tabs, should be in off-page
        for (OffPageText opt : offPageContainer.getTexts()) {
            if (text.equals(opt.getText())) {
                if (opt.getIndex() == 0) {
                    // the first off-page needs special treatment
                    offPageContainer.selectDeck(opt.getIndex());
                    if (getSelectedIndex() == PAGE_LIMIT - 1) {
                        SelectionEvent.fire(this, PAGE_LIMIT - 1);
                    }
                    tabs.lastTab().setText(opt.getText());
                    selectTab(PAGE_LIMIT - 1);
                } else {
                    selectTab(PAGE_LIMIT - 1 + opt.getIndex());
                }
            }
        }
    }
691326
def _next_tab_stop(self):
        

        for stop in sorted(self.tabstops):
            if self.x < stop:
                return stop
        return self.size[1] - 1