creates the tab buttons (which are radio buttons)
11874
def _create_buttons
      $log.debug "XXX: INSIDE create_buttons col_offset #{@col_offset} "
      v = Variable.new
      r = @button_row # @row + 1
      col = @col + @col_offset
      @tabs.each_with_index { |t, i| 
        txt = t.text
        @buttons << TabButton.new(nil) do 
          variable v
          text  txt
          name  txt
          #value txt
          row  r
          col col
          surround_chars ['','']
          selected_bgcolor 'green'
          selected_color 'white'

        end
        b = @buttons.last
        b.command do
          set_current_tab i
        end
        b.form = @form
        b.override_graphic  @graphic
        col += txt.length + @button_gap
      }
    end
1206220
def addTab(self, tab):
        
        if not isinstance(tab, XViewPanelItem):
            tab = XViewPanelItem(tab, self)
            tab.setFixedHeight(self.height())

        index = len(self.items())
        self.layout().insertWidget(index, tab)

        self.setCurrentIndex(index)
        return tab
1356754
private void setUpActionButtons() {
		// Buttons Panel
		WPanel buttonPanel = new WPanel();
		actionContainer.add(buttonPanel);

		// Edit Button
		final WButton editButton = new WButton("Edit") {
			@Override
			public boolean isVisible() {
				Object key = TableUtil.getCurrentRowKey();
				return !isEditRow(key);
			}
		};
		editButton.setImage("/image/pencil.png");
		editButton.setRenderAsLink(true);
		editButton.setToolTip("Edit");
		editButton.setAction(new Action() {
			@Override
			public void execute(final ActionEvent event) {
				Object key = TableUtil.getCurrentRowKey();
				addEditRow(key);
			}
		});

		// Cancel Button
		final WButton cancelButton = new WButton("Cancel") {
			@Override
			public boolean isVisible() {
				Object key = TableUtil.getCurrentRowKey();
				return isEditRow(key);
			}
		};
		cancelButton.setImage("/image/cancel.png");
		cancelButton.setRenderAsLink(true);
		cancelButton.setToolTip("Cancel");
		cancelButton.setAction(new Action() {
			@Override
			public void execute(final ActionEvent event) {
				Object key = TableUtil.getCurrentRowKey();
				removeEditRow(key);
				firstNameField.reset();
				lastNameField.reset();
				dobField.reset();
			}
		});

		// Delete Button
		WConfirmationButton deleteButton = new WConfirmationButton("Delete") {
			@Override
			public boolean isVisible() {
				Object key = TableUtil.getCurrentRowKey();
				return !isEditRow(key);
			}
		};
		deleteButton.setMessage("Do you want to delete row?");
		deleteButton.setImage("/image/remove.png");
		deleteButton.setRenderAsLink(true);
		deleteButton.setToolTip("Delete");
		deleteButton.setAction(new Action() {
			@Override
			public void execute(final ActionEvent event) {
				Object key = TableUtil.getCurrentRowKey();
				removeEditRow(key);
				PersonBean bean = (PersonBean) actionContainer.getBean();
				List<PersonBean> beans = (List<PersonBean>) table.getBean();
				beans.remove(bean);
				table.handleDataChanged();
				messages.success(bean.getFirstName() + " " + bean.getLastName() + " removed.");
			}
		});

		buttonPanel.add(editButton);
		buttonPanel.add(cancelButton);
		buttonPanel.add(deleteButton);

		// Ajax - edit button
		WAjaxControl editAjax = new WAjaxControl(editButton,
				new AjaxTarget[]{firstNameField, lastNameField,
					dobField, buttonPanel}) {
			@Override
			public boolean isVisible() {
				return editButton.isVisible();
			}

		};
		buttonPanel.add(editAjax);

		// Ajax - cancel button
		WAjaxControl cancelAjax = new WAjaxControl(cancelButton,
				new AjaxTarget[]{firstNameField, lastNameField,
					dobField, buttonPanel}) {
			@Override
			public boolean isVisible() {
				return cancelButton.isVisible();
			}
		};
		buttonPanel.add(cancelAjax);

		buttonPanel.setIdName("buttons");
		editAjax.setIdName("ajax_edit");
		cancelAjax.setIdName("ajax_can");
		editButton.setIdName("edit_btn");
		cancelButton.setIdName("cancel_btn");
		deleteButton.setIdName("delete_btn");
	}
147230
function createTabbable(fnRedirectFocus) {
			var oBlockSpan = document.createElement("span");

			oBlockSpan.setAttribute("tabindex", 0);
			oBlockSpan.addEventListener('focusin', fnRedirectFocus);

			return oBlockSpan;
		}
263085
function() {
  /**
   * Current options values.
   * These are only ever modified by using the {@see #setOptions} call.
   * @type {!Options}
   * @private
   */
  this.options_ = new Options();

  /**
   * Page options JSON strings mapped by UUID.
   * These are used as a lookup for the HTTP header hack.
   * @type {!Object.<string>}
   * @private
   */
  this.pageOptionsBlobs_ = {};

  /**
   * Injected tabs, mapped by tab ID.
   * @type {!Object.<!InjectedTab>}
   * @private
   */
  this.injectedTabs_ = {};

  /**
   * Tracer.
   * @type {Tracer}
   * @private
   */
  this.tracer_ = null;

  /**
   * All popup window tab IDs mapped by opener tab ID.
   * @type {!Object.<number, number>}
   * @private
   */
  this.popupWindows_ = {};

  chrome.tabs.onActivated.addListener(
      this.tabActivated_.bind(this));
  chrome.tabs.onUpdated.addListener(
      this.tabUpdated_.bind(this));

  // Handle tab closes.
  chrome.tabs.onRemoved.addListener((function(tabId) {
    for (var key in this.popupWindows_) {
      if (this.popupWindows_[key] === tabId) {
        delete this.popupWindows_[key];
        break;
      }
    }
    if (tabId in this.injectedTabs_) {
      var injectedTab = this.injectedTabs_[tabId];
      this.injectedTabs_[tabId] = null;
      injectedTab.dispose();
    }
  }).bind(this));

  // Listen for commands from content scripts.
  chrome.extension.onConnect.addListener(function(port) {
    var options = this.getOptions();
    if (port.name == 'injector') {
      // Setup the extended info provider for the page.
      var tab = port.sender.tab;
      if (!tab) {
        // This sometimes happens on about:blank and the new tab page.
        return;
      }
      var pageUrl = URI.canonicalize(tab.url);
      var pageStatus = options.getPageStatus(pageUrl, tab.id);
      var pageOptions = options.getPageOptions(pageUrl);

      _gaq.push(['_trackEvent', 'extension', 'injected']);

      var injectedTab = new InjectedTab(
          this, tab, pageStatus, pageOptions, port);
      this.injectedTabs_[tab.id] = injectedTab;
    } else if (port.name == 'popup') {
      // Get info about the selected tab and send back.
      // Note: port.sender is the popup tab, not the current tab.
      chrome.tabs.getSelected(null, (function(tab) {
        var pageUrl = URI.canonicalize(tab.url);
        if (!pageUrl.length) {
          return;
        }
        this.sendPopupInfo_(pageUrl, tab.id, port);

        // Listen for messages from the popup.
        port.onMessage.addListener((function(data, port) {
          this.popupMessageReceived_(tab, data, port);
        }).bind(this));
      }).bind(this));
    }
  }.bind(this));

  // Detect the application.
  this.detectApplication_();
  var detectApplication = this.detectApplication_.bind(this);
  chrome.management.onInstalled.addListener(detectApplication);
  chrome.management.onUninstalled.addListener(detectApplication);
  chrome.management.onEnabled.addListener(detectApplication);
  chrome.management.onDisabled.addListener(detectApplication);

  // Rescan all open tabs to reload any that are whitelisted.
  this.options_.load(function() {
    var whitelist = this.options_.getWhitelistedPages();
    var whitelistMap = {};
    for (var n = 0; n < whitelist.length; n++) {
      whitelistMap[whitelist[n]] = true;
    }
    chrome.tabs.query({}, (function(tabs) {
      var tabsReloaded = 0;
      for (var n = 0; n < tabs.length; n++) {
        var pageUrl = URI.canonicalize(tabs[n].url);
        if (whitelistMap[pageUrl]) {
          tabsReloaded++;
          this.reloadTab(tabs[n].id, tabs[n].url);
        }
      }
      _gaq.push(['_trackEvent', 'extension', 'tabs_reloaded',
          null, tabsReloaded]);
    }).bind(this));
  }, this);

  // This hacky thing lets people open wtf from the omnibox.
  // HACK(benvanik): https://code.google.com/p/chromium/issues/detail?id=237817
  try {
    chrome.omnibox.setDefaultSuggestion({
      description: '<url><match>%s</match></url> Open trace file'
    });
  } catch (e) {
  }
  chrome.omnibox.onInputChanged.addListener((function(text, suggest) {
    suggest([
      {
        content: 'ui',
        description: 'Open the UI'
      }
    ]);
  }).bind(this));
  chrome.omnibox.onInputEntered.addListener((function(text) {
    chrome.tabs.getSelected(null, (function(tab) {
      text = text.trim();
      if (text == 'ui' || text.length == 0) {
        // Open the UI.
        _gaq.push(['_trackEvent', 'extension', 'omnibox_show_ui']);
        this.showUi_({
          targetTab: tab
        });
      } else {
        // A URL? File path? etc?
        if (text.indexOf('http') == 0) {
          _gaq.push(['_trackEvent', 'extension', 'omnibox_show_file']);
          this.showFileInUi_({
            targetTab: tab
          }, text);
        }
      }
    }).bind(this));
  }).bind(this));

  // FileBrowserHandler requests, on Chrome OS.
  if (chrome.fileBrowserHandler) {
    chrome.fileBrowserHandler.onExecute.addListener((function(id, details) {
      chrome.tabs.get(details.tab_id, (function(tab) {
        switch (id) {
          case 'open':
            this.showFileEntriesInUi_({
              targetTab: tab
            }, details.entries);
            break;
        }
      }).bind(this));
    }).bind(this));
  }

  // This is a workaround for a regression in Chrome that prevents blob URIs
  // from work in content scripts. Instead, we smuggle the options data
  // synchronously via HTTP headers. Yeah, I know. FML.
  // https://code.google.com/p/chromium/issues/detail?id=295829
  chrome.webRequest.onHeadersReceived.addListener((function(details) {
    var uuid = details.url.substr(details.url.lastIndexOf('/') + 1);
    var headerValue = this.pageOptionsBlobs_[uuid];
    return {
      responseHeaders: [
        {
          name: 'X-WTF-Options',
          value: headerValue
        }
      ]
    };
  }).bind(this), {
    urls: ['http://tracing-framework.appspot.com/tab-options/*'],
    types: ['xmlhttprequest']
  }, ['blocking']);
}
622228
def grid_widgets(self):
        """"""
        sticky = {"sticky": "nswe"}
        self.label.grid(row=1, column=1, columnspan=2, **sticky)
        self.dropdown.grid(row=2, column=1, **sticky)
        self.entry.grid(row=2, column=2, **sticky)
        self.button.grid(row=3, column=1, columnspan=2, **sticky)
        self.radio_one.grid(row=4, column=1, **sticky)
        self.radio_two.grid(row=4, column=2, **sticky)
        self.checked.grid(row=5, column=1, **sticky)
        self.unchecked.grid(row=5, column=2, **sticky)
        self.scroll.grid(row=1, column=3, rowspan=8, padx=5, **sticky)
        self.tree.grid(row=6, column=1, columnspan=2, **sticky)
        self.scale_entry.grid(row=7, column=1, columnspan=2, **sticky)
        self.combo.grid(row=8, column=1, columnspan=2, **sticky)
        self.progress.grid(row=9, column=1, columnspan=2, padx=5, pady=5, **sticky)
62556
function (tab) {
                var self = this, bar = self.get('bar'), body = self.get('body');
                bar.set('selectedTab', tab);
                body.set('selectedPanelIndex', util.indexOf(tab, bar.get('children')));
                return this;
            }
153361
function(tab) {
        var that = this;
        if(typeof tab === 'string') {
            that.url = tab;
        } else if($.isPlainObject(tab)) {
            $.extend(that, tab);
        }
        if(!that.id) {
            that.id = $.zui.uuid();
        }
        if(!that.type) {
            if(that.iframe) {
                that.type = 'iframe';
                that.url = that.url || that.iframe;
            } else if(that.ajax) {
                that.type = 'ajax';
                that.url = that.url || ($.isPlainObject(that.ajax) ? that.ajax.url : that.ajax);
            } else if(that.url) {
                that.type = tab.ajax ? 'ajax' : 'iframe';
            } else {
                that.type = 'custom';
            }
        }
        that.createTime = new Date().getTime();
        that.openTime = 0;
        that.onCreate && that.onCreate.call(that);
    }
338465
function switchTab( tabParentId ) {
    var tabElements = $G( tabParentId ).children,
        tabHeads = tabElements[0].children,
        tabBodys = tabElements[1].children;

    for ( var i = 0, length = tabHeads.length; i < length; i++ ) {
        var head = tabHeads[i];
        if ( head.className === "focus" )clickHandler(tabHeads,tabBodys, head );
        head.onclick = function () {
            clickHandler(tabHeads,tabBodys,this);
        }
    }
}
1076749
function editors () {
  editors.textBox = form.textBox = ace.edit("text-box");
  form.textBox.setTheme(ACE_THEME);
  var session = form.textBox.getSession();
  session.setMode("ace/mode/yaml");
  session.setTabSize(2);

  editors.results = $("#results");
  editors.tabs = editors.results.find(".nav-tabs");
  editors.panes = editors.results.find(".tab-content");
}
179768
function(start) {
        var itemsToShow = this.options.itemsToShow,
            length = this.items.length,
            stop = start + itemsToShow,
            set = $([]),
            tabs = this.tabs
                .removeClass('is-active')
                .aria('toggled', false);

        if (!tabs.length) {
            return;
        }

        if (this.options.infinite) {
            length = length - (itemsToShow * 2);
        }

        if (start >= 0) {
            set = set.add(tabs.slice(start, stop));
        } else {
            set = set.add(tabs.slice(0, stop));
            set = set.add(tabs.slice(start));
        }

        if (stop > length) {
            set = set.add(tabs.slice(0, stop - length));
        }

        set
            .addClass('is-active')
            .aria('toggled', true);
    }
931999
public function registerTabs()
    {
        global $post;

        if (!$post && !isset($_GET['page_for'])) {
            return;
        }

        if (!$post && isset($_GET['page_for']) && !empty($_GET['page_for'])) {
            $post = get_post($_GET['page_for']);
        }

        $modulesEditorId = false;

        if ($post) {
            $modulesEditorId = $post->ID;
            $thePostId = $post->ID;
        }

        if ($postType = self::isPageForPostType($post->ID)) {
            $modulesEditorId = 'archive-' . $postType . '&page_for=' . $post->ID;
        }

        $tabs = new \Modularity\Editor\Tabs();
        $tabs->add(__('Content', 'modularity'), admin_url('post.php?post=' . $thePostId . '&action=edit'));
        $tabs->add(__('Modules', 'modularity'), admin_url('options.php?page=modularity-editor&id=' . $modulesEditorId));
    }
1147719
def make_configure_tab(self):
        
        # Setup the choice between single and multicolor
        modeframe = tk.Frame(self.tab_configure)
        self.mode = tk.IntVar()
        singlecolor = tk.Radiobutton(modeframe, text="Single color", variable=self.mode,
                                     value=1, command=lambda: self.disable_multicolor())
        multicolor = tk.Radiobutton(modeframe, text="Three color", variable=self.mode,
                                    value=3, command=lambda: self.disable_singlecolor())
        self.mode.set(3)
        singlecolor.pack(side=tk.LEFT)
        multicolor.pack(side=tk.LEFT)

        updatebutton = tk.Button(master=modeframe, text="Update",
                                 command=self.update_button_action)
        updatebutton.pack(side=tk.RIGHT)
        modeframe.grid(row=0, column=0)
        self.setup_multicolor()
        self.setup_singlecolor()
683124
function () {

		// Create Layout
		this._el.button_zoomin 							= TL.Dom.create('span', 'tl-menubar-button', this._el.container);
		this._el.button_zoomout 						= TL.Dom.create('span', 'tl-menubar-button', this._el.container);
		this._el.button_backtostart 					= TL.Dom.create('span', 'tl-menubar-button', this._el.container);

		if (TL.Browser.mobile) {
			this._el.container.setAttribute("ontouchstart"," ");
		}

		this._el.button_backtostart.innerHTML		= "<span class='tl-icon-goback'></span>";
		this._el.button_zoomin.innerHTML			= "<span class='tl-icon-zoom-in'></span>";
		this._el.button_zoomout.innerHTML			= "<span class='tl-icon-zoom-out'></span>";


	}
149777
function () {
/*Line 20 - 'AtomTabControl.js' */               baseType.createChildren.call(this);

/*Line 22 - 'AtomTabControl.js' */                if (this._itemsPresenter != this._element) {


/*Line 25 - 'AtomTabControl.js' */                    var children = [];

/*Line 27 - 'AtomTabControl.js' */                    var ae = new ChildEnumerator(this._element);
/*Line 28 - 'AtomTabControl.js' */                    while (ae.next()) {
/*Line 29 - 'AtomTabControl.js' */                        var c = ae.current();
/*Line 30 - 'AtomTabControl.js' */                        this._element.removeChild(c);
/*Line 31 - 'AtomTabControl.js' */                        children.push(c);
/*Line 32 - 'AtomTabControl.js' */                    }

/*Line 34 - 'AtomTabControl.js' */                    if (this._template) {
/*Line 35 - 'AtomTabControl.js' */                        var t = AtomUI.cloneNode(this._template);
/*Line 36 - 'AtomTabControl.js' */                        t._templateParent = this;
/*Line 37 - 'AtomTabControl.js' */                        this._element.appendChild(t);
/*Line 38 - 'AtomTabControl.js' */                        this.onCreateChildren(this._element);
/*Line 39 - 'AtomTabControl.js' */                    }

/*Line 41 - 'AtomTabControl.js' */                    ae = new AtomEnumerator(children);
/*Line 42 - 'AtomTabControl.js' */                    while (ae.next()) {
/*Line 43 - 'AtomTabControl.js' */                        this._itemsPresenter.appendChild(ae.current());
/*Line 44 - 'AtomTabControl.js' */                    }
/*Line 45 - 'AtomTabControl.js' */                    if (this._template) {
/*Line 46 - 'AtomTabControl.js' */                        this.onCreateChildren(this._itemsPresenter);
/*Line 47 - 'AtomTabControl.js' */                    }

/*Line 49 - 'AtomTabControl.js' */                }

/*Line 51 - 'AtomTabControl.js' */            }
1115416
def collection_radio_buttons(method, collection, value_method, label_method, options = {}, html_options = {})
      fieldset_wrapper options[:legend_title] do
        super(method, collection, value_method, label_method, options, html_options) do |builder|
          if block_given?
            yield builder
          else
            builder.label { builder.radio_button + builder.text }
          end
        end
      end
    end
1118397
def CreateSourceWindow(self, tabs):
        """"""
        if editor and self.sourceCodeControl is None:
            self.sourceCodeControl = wx.py.editwindow.EditWindow(
                self.tabs, -1
            )
            self.sourceCodeControl.SetText(u"")
            self.sourceFileShown = None
            self.sourceCodeControl.setDisplayLineNumbers(True)