Render a tabbed pane tab for each top-level
        L{xmantissa.ixmantissa.IPreferenceCollection} tab
769715
def tabbedPane(self, req, tag):
        
        navigation = webnav.getTabs(self.aggregator.getPreferenceCollections())
        pages = list()
        for tab in navigation:
            f = inevow.IRenderer(
                    self.aggregator.store.getItemByID(tab.storeID))
            f.tab = tab
            if hasattr(f, 'setFragmentParent'):
                f.setFragmentParent(self)
            pages.append((tab.name, f))

        f = tabbedPane.TabbedPaneFragment(pages, name='preference-editor')
        f.setFragmentParent(self)
        return f
78621
private void definePanels(UIDefaults d) {
        String p = "Panel";
        d.put(p + ".contentMargins", new InsetsUIResource(0, 0, 0, 0));
        d.put(p + ".background", new ColorUIResource((Color) d.get("control")));
        d.put(p + ".opaque", Boolean.TRUE);
    }
10069
function rawRender (vdom, isSvg) {
  if (Array.isArray(vdom)) return renderArray(vdom, isSvg)
  if (vdom instanceof window.Element) return renderDirectDom(vdom, isSvg)
  if (typeof vdom !== 'object') return renderPrimitive(vdom, isSvg)

  // one-level deep flatten children array
  var props = extend(
    extend({}, vdom.props),
    { children: [].concat.apply([], vdom.children || []) }
  )

  if (vdom.isDom) return renderDom(vdom, props, isSvg)
  if (vdom.isStateless) return renderStateless(vdom, props, isSvg)
  if (vdom.isComponent) return renderClass(vdom, props, isSvg)
}
420499
void setSourceTab(String title, @CheckForNull BugInstance bug) {
        mainFrameComponentFactory.setSourceTab(title, bug);
    }
1010888
public void renderExtendedTab(Collection<I_CmsFormField> fields, FlowPanel tab) {

        List<CmsFieldSet> result = new ArrayList<CmsFieldSet>();

        tab.clear();

        String used = Messages.get().key(Messages.GUI_PROPERTY_BLOCK_USED_0);
        CmsFieldSet usedFieldSet = new CmsFieldSet();
        usedFieldSet.addStyleName(I_CmsInputLayoutBundle.INSTANCE.inputCss().formGradientBackground());
        usedFieldSet.setLegend(used);
        usedFieldSet.setAnimationDuration(50);

        String unused = Messages.get().key(Messages.GUI_PROPERTY_BLOCK_UNUSED_0);
        CmsFieldSet unusedFieldSet = new CmsFieldSet();
        unusedFieldSet.addStyleName(I_CmsInputLayoutBundle.INSTANCE.inputCss().formGradientBackground());
        unusedFieldSet.setOpen(false);
        unusedFieldSet.setLegend(unused);
        unusedFieldSet.setAnimationDuration(50);
        boolean reopen = false;
        final String currentMarkedProperty = m_markedProperty;
        m_markedProperty = null;
        for (I_CmsFormField field : fields) {
            if (isTop(field)) {
                usedFieldSet.addContent(createRow(field));
            } else {
                if ((currentMarkedProperty != null)
                    && field.getLayoutData().get(LD_PROPERTY).equals(currentMarkedProperty)) {
                    reopen = true;
                }
                unusedFieldSet.addContent(createRow(field));
            }
        }
        if (reopen) {
            unusedFieldSet.setOpen(true);
        }

        if (usedFieldSet.getWidgetCount() > 0) {
            result.add(usedFieldSet);
        }
        if (unusedFieldSet.getWidgetCount() > 0) {
            result.add(unusedFieldSet);
        }

        Iterator<CmsFieldSet> iter = result.iterator();
        while (iter.hasNext()) {
            CmsFieldSet fieldSet = iter.next();
            if (iter.hasNext()) {
                fieldSet.getElement().getStyle().setMarginTop(9, Unit.PX);
            } else {
                fieldSet.getElement().getStyle().setMarginTop(15, Unit.PX);
            }
            tab.add(fieldSet);
        }
        CmsDomUtil.resizeAncestor(tab.getParent());
    }
5650
private void setCurrentTab(final int index)
	{
		if (this.currentTab == index)
		{
			// already current
			return;
		}
		this.currentTab = index;

		final Component component;

		if ((currentTab == -1) || tabs.isEmpty() || !getVisiblityCache().isVisible(currentTab))
		{
			// no tabs or the current tab is not visible
			component = newPanel();
		}
		else
		{
			// show panel from selected tab
			final T tab = tabs.get(currentTab);
			component = tab.getPanel(TAB_PANEL_ID);
			if (component == null)
			{
				throw new WicketRuntimeException("ITab.getPanel() returned null. TabbedPanel ["
					+ getPath() + "] ITab index [" + currentTab + "]");
			}
		}

		if (!component.getId().equals(TAB_PANEL_ID))
		{
			throw new WicketRuntimeException(
				"ITab.getPanel() returned a panel with invalid id [" + component.getId()
					+ "]. You always have to return a panel with id equal to the provided panelId parameter. TabbedPanel ["
					+ getPath() + "] ITab index [" + currentTab + "]");
		}

		addOrReplace(component);
	}
936791
private static void encodeTabs(final FacesContext context, final ResponseWriter writer, final List<UIComponent> children,
			final int currentlyActiveIndex, final String hiddenInputFieldID, final boolean disabled) throws IOException {
		if (null != children) {
			int tabIndex = 0;

			for (int index = 0; index < children.size(); index++) {	
				// todo what's the meaning of those countless parameters?
				final int loopIndex = index;
				final int currentIndex = tabIndex;
				final Tab tab = (Tab)children.get(loopIndex);
				Runnable r = new Runnable() {
					int offset = 0;
					public void run() {
						try {
							encodeTab(context, writer, tab, currentIndex + offset == currentlyActiveIndex, hiddenInputFieldID,
									currentIndex + offset, disabled);
							offset++;
						} catch (IOException ex) {
							// exotic case, suffice it to log it
							LOGGER.log(Level.SEVERE, "An exception occurred while rendering a tab.", ex);
						}
					}
				};

				if (((Tab) children.get(index)).getValue() == null) {
					r.run();
					tabIndex ++;
				} else {
					tabIndex += tab.encodeTabs(context, r);
				}
			}
		}
	}
1346970
@Override
	public void doRender(final WComponent component, final WebXmlRenderContext renderContext) {
		WTabSet tabSet = (WTabSet) component;
		XmlStringBuilder xml = renderContext.getWriter();

		xml.appendTagOpen("ui:tabset");
		xml.appendAttribute("id", component.getId());
		xml.appendOptionalAttribute("class", component.getHtmlClass());
		xml.appendOptionalAttribute("track", component.isTracking(), "true");
		xml.appendAttribute("type", getTypeAsString(tabSet.getType()));
		xml.appendOptionalAttribute("disabled", tabSet.isDisabled(), "true");
		xml.appendOptionalAttribute("hidden", tabSet.isHidden(), "true");
		xml.appendOptionalAttribute("contentHeight", tabSet.getContentHeight());
		xml.appendOptionalAttribute("showHeadOnly", tabSet.isShowHeadOnly(), "true");
		xml.appendOptionalAttribute("single",
				TabSetType.ACCORDION.equals(tabSet.getType()) && tabSet.isSingle(),
				"true");
		if (WTabSet.TabSetType.ACCORDION.equals(tabSet.getType())) {
			xml.appendOptionalAttribute("groupName", tabSet.getGroupName());
		}
		xml.appendClose();

		// Render margin
		MarginRendererUtil.renderMargin(tabSet, renderContext);

		paintChildren(tabSet, renderContext);

		xml.appendEndTag("ui:tabset");
	}
294737
@Override
    public void renderReference( PositionedText canvas, double x, double y, String target, String name )
    {
        canvas.add( x, y, "|" + name + "|" );
    }
600007
function()
	{
		if(!this._modelBindersMap) this._initBinding();
		if(!this._collectionBinder)
		{
			this._explicitSubviewsStruct = null;

			if(this._template) this.element.innerHTML = this._template;

			if(this.render !== noop) this.render();
			this.renderSubviews();
		}
	}
557719
public void showCustomScanDialog(Target target) {
		if (customScanDialog == null) {
			// Work out the tabs 
			String[] tabs = CustomScanDialog.STD_TAB_LABELS;
			if (this.customScanPanels.size() > 0) {
				List<String> tabList = new ArrayList<String>();
				for (String str : CustomScanDialog.STD_TAB_LABELS) {
					tabList.add(str);
				}
				for (CustomScanPanel csp : customScanPanels) {
					tabList.add(csp.getLabel());
				}
				tabs = tabList.toArray(new String[tabList.size()]);
			}
			
			customScanDialog = new CustomScanDialog(this, tabs, this.customScanPanels, 
					View.getSingleton().getMainFrame(), new Dimension(700, 500));
		}
		if (customScanDialog.isVisible()) {
			customScanDialog.requestFocus();
			// Its behind you! Actually not needed no the window is alwaysOnTop, but keeping in case we change that ;)
			customScanDialog.toFront();
			return;
		}
		if (target != null) {
			customScanDialog.init(target);
		} else {
			// Keep the previously selected target
			customScanDialog.init(null);
		}
		customScanDialog.setVisible(true);
	}
139894
function wireUpTabs(){
  var tabEl = document.getElementById('sidebar_switch');
  var children = tabEl.childNodes;

  // Each tab has a class corresponding of the id of its tab pane
  for(var i = 0, l = children.length; i < l;  i += 1){
    // Ignore text nodes
    if(children[i].nodeType !== 1) continue;
    children[i].addEventListener('click', function(c){
      return function(){ switchTab(c); };
    }(children[i].className));
  }
}
33590
public void updateOverviewPage()
	{
		try
		{
			theOverview.disposeFigures();
			traceRunner.drawOverview(theOverview, new Long(currentTime));

			for (Long cpu : cpuTabs.keySet())
			{
				GenericTabItem tab = cpuTabs.get(cpu);
				tab.disposeFigures();
				traceRunner.drawCpu(tab, cpu, new Long(currentTime));
			}

		} catch (Exception e)
		{
			TracefileViewerPlugin.log(e);
		}
	}
291887
function renderPageTree(root, renderOpts) {

    renderOpts = u.assign({ openClass:'open' }, renderOpts);

    if (renderOpts.groupBy) {
      var folderPages =
        u.map(u.groupBy(root._children, renderOpts.groupBy), function(children, name) {
          if (name === 'undefined') { name = renderOpts.defaultGroup || ''; }
          return { folderPage: true,
                   _href:      name ? '/' + u.slugify(name) + '/' : '',
                   _children:  children,
                   name:       name };
        });
      return recurse(folderPages);
    }
    else return recurse(root._children);

    function recurse(children, pid) {
      pid = pid || renderOpts.pageTreeID || 'page-tree';
      var out = '\n<ul>';

      u.each(children, function(page) {
        var ppid = (pid + '-' + page._href).replace(/\W+/g, '-').replace(/^-|-$/g,'');
        out += '\n<li' + (page._children ? ' id="' + ppid + '" class="folder"' : '') + '>'
            + (page.folderPage ?
              ((page.name || page._href) ? '<span class="folderPage">' + (page.name || u.unslugify(page._href)) + '</span>' : '') :
              renderLink(u.assign({}, renderOpts, { href:page._href, title:(page.title || page.name) })))
            + (page._children ? recurse(page._children, ppid) : '')
            + '</li>';
      });
      return out + '\n</ul>';
    }
  }
1221335
def render(self, **kwargs):
        """"""
        for item in self._parent._children.values():
            if not isinstance(item, Layer) or not item.control:
                continue
            key = item.layer_name
            if not item.overlay:
                self.base_layers[key] = item.get_name()
                if len(self.base_layers) > 1:
                    self.layers_untoggle[key] = item.get_name()
            else:
                self.overlays[key] = item.get_name()
                if not item.show:
                    self.layers_untoggle[key] = item.get_name()
        super(LayerControl, self).render()
1190432
public void showPanel() {
        if (mFirstLayout) {
            mSlideState = SlideState.COLLAPSED;
        } else {
            if (mSlideableView == null || mSlideState != SlideState.HIDDEN) return;
            mSlideableView.setVisibility(View.VISIBLE);
            requestLayout();
            smoothSlideTo(0, 0);
        }
    }
1134667
private void renderDescription(CmsTabInfo tabInfo, Panel descriptionParent) {

        if (tabInfo.getDescription() != null) {
            HTML descriptionLabel = new HTML();
            descriptionLabel.addStyleName(I_CmsLayoutBundle.INSTANCE.form().tabDescription());
            if (!tabInfo.getDescription().startsWith("<div")) {
                // add default styling in case of simple HTML
                descriptionLabel.addStyleName(I_CmsLayoutBundle.INSTANCE.form().tabDescriptionPanel());
            }
            descriptionLabel.setHTML(tabInfo.getDescription());
            descriptionParent.add(descriptionLabel);
        }
    }