Defaults to true if :should_select_tab tab is not implemented by the tab delegate.
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
831368
def shall_skip(module, opts):
    """"""
    # skip it if there is nothing (or just \n or \r\n) in the file
    if path.getsize(module) <= 2:
        return True
    # skip if it has a "private" name and this is selected
    filename = path.basename(module)
    if filename != '__init__.py' and filename.startswith('_') and \
       not opts.includeprivate:
        return True
    return False
883690
function tabChanged() {
    var url = getCanonicalUrl(tabs.activeTab.url);
    widget.port.emit('update', {
      'enabled': url.length ? isInjectionEnabledForUrl(url) : false
    });
  }
832546
function tab(e) {
        var parentRole = getParentRole();

        if (parentRole == "tablist") {
          var elm = getFocusElements(focusedControl.getEl('body'))[0];

          if (elm) {
            elm.focus();
          }
        } else {
          moveFocus(e.shiftKey ? -1 : 1);
        }
      }
578820
function removeTab (tabData) {
    if (destroyed) return;
    var selectedIndex = ctrl.selectedIndex,
        tab           = ctrl.tabs.splice(tabData.getIndex(), 1)[ 0 ];
    refreshIndex();
    // when removing a tab, if the selected index did not change, we have to manually trigger the
    //   tab select/deselect events
    if (ctrl.selectedIndex === selectedIndex) {
      tab.scope.deselect();
      ctrl.tabs[ ctrl.selectedIndex ] && ctrl.tabs[ ctrl.selectedIndex ].scope.select();
    }
    $mdUtil.nextTick(function () {
      updatePagination();
      ctrl.offsetLeft = fixOffset(ctrl.offsetLeft);
    });
  }
480245
def is_attr_selected(attr_name,     # type: str
                     include=None,  # type: Union[str, Tuple[str]]
                     exclude=None   # type: Union[str, Tuple[str]]
                     ):
    """"""

    if include is not None and exclude is not None:
        raise ValueError('Only one of \'include\' or \'exclude\' argument should be provided.')

    # win time by not doing this
    # check_var(include, var_name='include', var_types=[str, tuple], enforce_not_none=False)
    # check_var(exclude, var_name='exclude', var_types=[str, tuple], enforce_not_none=False)

    if attr_name is 'self':
        return False
    if exclude and attr_name in exclude:
        return False
    if not include or attr_name in include:
        return True
    else:
        return False
282692
def tab(self):
        
        soft_tabs = self.tabstop - ((self._cx // self._cw) % self.tabstop)
        for _ in range(soft_tabs):
            self.putch(" ")
27131
public boolean isTabVisible(Component c) {
		if (! this.fullTabList.contains(c)) {
			// Not a known tab
			return false;
		}
		return ! this.hiddenTabs.contains(c);
	}
277517
def auto_generate_missing_tabs(self):
        """"""
        for config in models_config.get_all_configs():
            model_alias = '{}.{}'.format(config.app_label, config.model_name)
            if model_alias not in self.tabs:
                @self.register(model_alias)
                def general_layout(obj):
                    return Layout(
                        Column12(
                            Panel(
                                'info',
                                DescriptionList(*[f.name for f in obj.get_fields()])
                            )
                        )
                    )
302936
function (skipChangeState) {
            var state = "normal";
            var cfg = this._cfg;

            if (cfg.disabled) {
                state = "disabled";
            } else if (cfg.tabId === cfg.selectedTab) {
                state = "selected";
            } else {
                if (this._mouseOver) {
                    state = "msover";
                }
            }

            if (this._hasFocus) {
                state += "Focused";
            }
            this._state = state;

            if (!skipChangeState) {
                // force widget - DOM mapping
                this.getDom();
                this._frame.changeState(this._state);
            }
        }
1014608
public void selectTab(GalleryTabId tabId, boolean fireEvent) {

        A_CmsTab tab = getTab(tabId);
        if (tab != null) {
            m_tabbedPanel.selectTab(tab, fireEvent);
        }
    }
34330
def install_tab_event_filter(self, value):
        
        dock_tabbar = None
        tabbars = self.main.findChildren(QTabBar)
        for tabbar in tabbars:
            for tab in range(tabbar.count()):
                title = tabbar.tabText(tab)
                if title == self.title:
                    dock_tabbar = tabbar
                    break
        if dock_tabbar is not None:
            self.dock_tabbar = dock_tabbar
            # Install filter only once per QTabBar
            if getattr(self.dock_tabbar, 'filter', None) is None:
                self.dock_tabbar.filter = TabFilter(self.dock_tabbar,
                                                    self.main)
                self.dock_tabbar.installEventFilter(self.dock_tabbar.filter)
845445
public boolean remove (final Tab tab, boolean ignoreTabDirty) {
		checkIfTabsBelongsToThisPane(tab);

		if (ignoreTabDirty) {
			return removeTab(tab);
		}

		if (tab.isDirty() && mainTable.getStage() != null) {
			Dialogs.showOptionDialog(mainTable.getStage(), Text.UNSAVED_DIALOG_TITLE.get(), Text.UNSAVED_DIALOG_TEXT.get(),
					OptionDialogType.YES_NO_CANCEL, new OptionDialogAdapter() {
						@Override
						public void yes () {
							tab.save();
							removeTab(tab);
						}

						@Override
						public void no () {
							removeTab(tab);
						}
					});
		} else {
			return removeTab(tab);
		}

		return false;
	}
1126916
function (cfg) {
            if (cfg == null) {
                cfg = this._cfg;
            }

            var bind = cfg.bind;

            if (bind == null) {
                return null;
            }

            return bind.selectedTab;
        }
870442
def removeTab(self, tab):
        """"""
        if not isinstance(tab, int):
            tab = self.indexOf(tab)
        return super(FwTabWidget, self).removeTab(tab)
1058290
function(){
    if (this.spreadsheet.tabs) {
      var selection, range, doc, win, node = this.spreadsheet.constructDataGrid();

      this.spreadsheet.showTab('data');
      
      // deferred to be able to select the table
      setTimeout(function () {
        if ((doc = node.ownerDocument) && (win = doc.defaultView) && 
            win.getSelection && doc.createRange && 
            (selection = window.getSelection()) && 
            selection.removeAllRanges) {
            range = doc.createRange();
            range.selectNode(node);
            selection.removeAllRanges();
            selection.addRange(range);
        }
        else if (document.body && document.body.createTextRange && 
                (range = document.body.createTextRange())) {
            range.moveToElementText(node);
            range.select();
        }
      }, 0);
      return true;
    }
    else return false;
  }
1059062
private void defineTabbedPanes(UIDefaults d) {
        
        // copied from nimbus
        
        d.put("TabbedPane.contentMargins", new InsetsUIResource(0, 0, 0, 0));
        d.put("TabbedPane.tabAreaStatesMatchSelectedTab", Boolean.TRUE);
        d.put("TabbedPane.nudgeSelectedLabel", Boolean.FALSE);
        d.put("TabbedPane.tabRunOverlay", new Integer(2));
        d.put("TabbedPane.tabOverlap", new Integer(-1));
        d.put("TabbedPane.extendTabsToBase", Boolean.TRUE);
        d.put("TabbedPane.useBasicArrows", Boolean.TRUE);
        addColor(d, "TabbedPane.shadow", "seaGlassDisabledText", 0.0f, 0.0f, 0.0f, 0);
        addColor(d, "TabbedPane.darkShadow", "text", 0.0f, 0.0f, 0.0f, 0);
        addColor(d, "TabbedPane.highlight", "seaGlassLightBackground", 0.0f, 0.0f, 0.0f, 0);
        d.put("TabbedPane:TabbedPaneTab.contentMargins", new InsetsUIResource(2, 8, 3, 8));
        addColor(d, "TabbedPane:TabbedPaneTab[Disabled].textForeground", "seaGlassDisabledText", 0.0f, 0.0f, 0.0f, 0);
        addColor(d, "TabbedPane:TabbedPaneTab[Pressed+Selected].textForeground", 255, 255, 255, 255);
        addColor(d, "TabbedPane:TabbedPaneTab[Focused+Pressed+Selected].textForeground", 255, 255, 255, 255);
        d.put("TabbedPane:TabbedPaneTabArea.contentMargins", new InsetsUIResource(3, 10, 4, 10));
        d.put("TabbedPane:TabbedPaneContent.contentMargins", new InsetsUIResource(0, 0, 0, 0));
        
        // Below starts seaglass
        d.put("tabbedPaneTabAreaBackLineEnabled", new Color(0x647595));
        d.put("tabbedPaneTabAreaLightShadow", new Color(0x55eeeeee, true));
        d.put("tabbedPaneTabAreaDarkShadow", new Color(0x55aaaaaa, true));

        d.put("seaGlassTabbedPaneTabCloseGraphicInnerShadowBase", new Color(0x2a509b));
        d.put("seaGlassTabbedPaneTabCloseGraphicBase", Color.WHITE);
        d.put("seaGlassTabbedPaneTabCloseGraphicDropShadowBase", Color.BLACK);
        d.put("seaGlassTabbedPaneTabCloseBorderBase", new Color(0x20448e));

        String p = "TabbedPane";

        d.put(p + ".contentMargins", new InsetsUIResource(0, 0, 0, 0));
        d.put(p + ".tabRunOverlay", new Integer(0));
        d.put(p + ".useBasicArrows", Boolean.FALSE);
        d.put(p + ".closeButtonMargins", new Rectangle(2, 2, 2, 2));
        d.put(p + ".closeButtonSize", new Integer(11));

        String c = PAINTER_PREFIX + "TabbedPaneTabPainter";

        p = "TabbedPane:TabbedPaneTab";
        d.put(p + ".States", "Enabled,Pressed,Disabled,MouseOver,Focused,Selected,Default");
        d.put(p + "[Enabled].backgroundPainter", new LazyPainter(c, TabbedPaneTabPainter.Which.BACKGROUND_ENABLED));
        d.put(p + "[Enabled+Pressed].backgroundPainter", new LazyPainter(c, TabbedPaneTabPainter.Which.BACKGROUND_PRESSED));
        d.put(p + "[Disabled].backgroundPainter", new LazyPainter(c, TabbedPaneTabPainter.Which.BACKGROUND_DISABLED));
        d.put(p + "[Disabled+Selected].backgroundPainter", new LazyPainter(c, TabbedPaneTabPainter.Which.BACKGROUND_DISABLED_SELECTED));
        d.put(p + "[Selected].backgroundPainter", new LazyPainter(c, TabbedPaneTabPainter.Which.BACKGROUND_SELECTED));
        d.put(p + "[Selected+MouseOver].backgroundPainter", new LazyPainter(c, TabbedPaneTabPainter.Which.BACKGROUND_SELECTED));
        d.put(p + "[Pressed+Selected].backgroundPainter", new LazyPainter(c, TabbedPaneTabPainter.Which.BACKGROUND_PRESSED_SELECTED));
        d.put(p + "[Focused+Selected].backgroundPainter", new LazyPainter(c, TabbedPaneTabPainter.Which.BACKGROUND_SELECTED_FOCUSED));
        d.put(p + "[Focused+Pressed+Selected].backgroundPainter", new LazyPainter(c, TabbedPaneTabPainter.Which.BACKGROUND_PRESSED_SELECTED_FOCUSED));
        d.put(p + "[Disabled].textForeground", d.get("seaGlassDisabledText"));
        d.put(p + "[Pressed+Selected].textForeground", Color.BLACK);
        d.put(p + "[Focused+Pressed+Selected].textForeground", Color.BLACK);

        // Initialize tabbed pane "close" button.
        // Note that we co-opt MouseOver to mean mousing over the tab,
        // whereas Focused means mousing over the actual close button.
        p = "TabbedPane:TabbedPaneTab:TabbedPaneTabClaseButton";
        c = PAINTER_PREFIX + "TabbedPaneTabCloseButtonPainter";
        d.put(p + ".States", "Enabled,Pressed,Disabled,MouseOver,Focused");
        d.put(p + ".contentMargins", new InsetsUIResource(0, 0, 0, 0));
        d.put(p + "[Disabled].foregroundPainter", new LazyPainter(c, TabbedPaneTabCloseButtonPainter.Which.DISABLED));
        d.put(p + "[Enabled].foregroundPainter", new LazyPainter(c, TabbedPaneTabCloseButtonPainter.Which.ENABLED));
        d.put(p + "[MouseOver].foregroundPainter", new LazyPainter(c, TabbedPaneTabCloseButtonPainter.Which.MOUSEOVER));
        d.put(p + "[Focused].foregroundPainter", new LazyPainter(c, TabbedPaneTabCloseButtonPainter.Which.FOCUSED));
        d.put(p + "[Pressed].foregroundPainter", new LazyPainter(c, TabbedPaneTabCloseButtonPainter.Which.PRESSED));

        p = "TabbedPane:TabbedPaneTabArea";
        c = PAINTER_PREFIX + "TabbedPaneTabAreaPainter";
        d.put(p + ".contentMargins", new InsetsUIResource(3, 10, 3, 10));
        d.put(p + ".States", "Enabled,Disabled,Top,Left,Bottom,Right");
        d.put(p + ".Top", new TabbedPaneTopTabState());
        d.put(p + ".Left", new TabbedPaneLeftTabState());
        d.put(p + ".Bottom", new TabbedPaneBottomTabState());
        d.put(p + ".Right", new TabbedPaneRightTabState());
        d.put(p + "[Enabled+Top].backgroundPainter", new LazyPainter(c, TabbedPaneTabAreaPainter.Which.BACKGROUND_ENABLED_TOP));
        d.put(p + "[Disabled+Top].backgroundPainter", new LazyPainter(c, TabbedPaneTabAreaPainter.Which.BACKGROUND_DISABLED_TOP));
        d.put(p + "[Enabled+Left].backgroundPainter", new LazyPainter(c, TabbedPaneTabAreaPainter.Which.BACKGROUND_ENABLED_LEFT));
        d.put(p + "[Disabled+Left].backgroundPainter", new LazyPainter(c, TabbedPaneTabAreaPainter.Which.BACKGROUND_DISABLED_LEFT));
        d.put(p + "[Enabled+Bottom].backgroundPainter", new LazyPainter(c, TabbedPaneTabAreaPainter.Which.BACKGROUND_ENABLED_BOTTOM));
        d.put(p + "[Disabled+Bottom].backgroundPainter", new LazyPainter(c, TabbedPaneTabAreaPainter.Which.BACKGROUND_DISABLED_BOTTOM));
        d.put(p + "[Enabled+Right].backgroundPainter", new LazyPainter(c, TabbedPaneTabAreaPainter.Which.BACKGROUND_ENABLED_RIGHT));
        d.put(p + "[Disabled+Right].backgroundPainter", new LazyPainter(c, TabbedPaneTabAreaPainter.Which.BACKGROUND_DISABLED_RIGHT));

        // Buttons
        c = PAINTER_PREFIX + "ArrowButtonPainter";
        p = "TabbedPane:TabbedPaneTabArea:\"TabbedPaneTabArea.button\"";
        d.put(p + ".States", "Enabled,Pressed,MouseOver,Disabled");
        d.put(p + "[Disabled].foreground", new ColorUIResource(0x9ba8cf));
        d.put(p + "[Enabled].foreground", new ColorUIResource(Color.BLACK));
        d.put(p + "[Pressed].foreground", new ColorUIResource(0x134D8C));
        d.put(p + "[Disabled].foregroundPainter", new LazyPainter(c, ArrowButtonPainter.Which.FOREGROUND_DISABLED));
        d.put(p + "[Enabled].foregroundPainter", new LazyPainter(c, ArrowButtonPainter.Which.FOREGROUND_ENABLED));
        d.put(p + "[MouseOver].foregroundPainter", new LazyPainter(c, ArrowButtonPainter.Which.FOREGROUND_ENABLED));
        d.put(p + "[Pressed].foregroundPainter", new LazyPainter(c, ArrowButtonPainter.Which.FOREGROUND_PRESSED));

        p = "TabbedPane:TabbedPaneContent";
        d.put(p + ".contentMargins", new InsetsUIResource(0, 0, 0, 0));
    }