Re-inflates the tab layout, which indicates the currently shown fragment, if the dialog has
already been created.
357534
private void reInflateTabLayout() {
        View rootView = getRootView();

        if (rootView != null) {
            View headerContentContainer = rootView.findViewById(R.id.header_content_container);
            View contentContainer = rootView.findViewById(R.id.content_container);

            if (headerContentContainer != null && contentContainer != null) {
                inflateTabLayout(headerContentContainer, contentContainer);
            }
        }
    }
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);
	}
1252525
private void addFragmentToView(final int viewId, final Fragment fragment) {
    fragmentManager.beginTransaction().replace(viewId, fragment).commit();
  }
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' );
	}
832882
function selectTab() {
        layout.resetTabState_(tabs);
        tab.classList.add(layout.CssClasses_.IS_ACTIVE);
    }
1010054
private void inflateMessageContainer() {
        if (messageContainer == null) {
            messageContainer = new RelativeLayout(getContext());
            messageContainer.setId(R.id.message_container);
            messageContainer.setLayoutParams(
                    new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,
                            ViewGroup.LayoutParams.WRAP_CONTENT));
        } else {
            messageContainer.removeAllViews();
        }
    }
633155
function dialogResize() {
			resize(null, self.dialog.height()-self.view.tlb.parent().height()-($.browser.msie ? 47 : 32))
		}
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);
    }
1249109
protected void switchTab() {

        Component tab = m_tab.getSelectedTab();
        int pos = m_tab.getTabPosition(m_tab.getTab(tab));
        if (m_isWebOU) {
            if (pos == 0) {
                pos = 1;
            }
        }
        m_tab.setSelectedTab(pos + 1);
    }
902874
def rebuild(self):
        
        table = self.tableType()
        form  = nativestring(self.filterFormat())
        
        if not table and form:
            if self.layout().count() == 0:
                self.layout().addWidget(QLabel(form, self))
            else:
                self.layout().itemAt(0).widget().setText(form)
            return
        
        elif not form:
            return
        
        for child in self.findChildren(QWidget):
            child.close()
            child.setParent(None)
            child.deleteLater()
        
        self.setUpdatesEnabled(False)
        schema = table.schema()
        
        vlayout = self.layout()
        for i in range(vlayout.count()):
            vlayout.takeAt(0)
        
        self._plugins = []
        for line in form.split('\n'):
            row = QHBoxLayout()
            row.setContentsMargins(0, 0, 0, 0)
            row.setSpacing(0)
            
            for label, lookup in FORMAT_SPLITTER.findall(line):
                # create the label
                lbl = QLabel(label, self)
                row.addWidget(lbl)
                
                # create the query plugin
                opts = lookup.split(':')
                if len(opts) == 1:
                    opts.append('is')
                
                column = schema.column(opts[0])
                if not column:
                    continue
                
                plugin = self.pluginFactory().plugin(column)
                if not plugin:
                    continue
                
                editor = plugin.createEditor(self, column, opts[1], None)
                if editor:
                    editor.setObjectName(opts[0])
                    row.addWidget(editor)
                    self._plugins.append((opts[0], opts[1], plugin, editor))
            
            row.addStretch(1)
            vlayout.addLayout(row)
        
        self.setUpdatesEnabled(True)
        self.adjustSize()
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
975333
private void updateCachedLayout(
            Document layout, IUserProfile profile, FragmentDefinition fragment) {
        final Locale locale = profile.getLocaleManager().getLocales().get(0);
        // need to make a copy that we can fragmentize
        layout = (Document) layout.cloneNode(true);

        // Fix later to handle multiple profiles
        final Element root = layout.getDocumentElement();
        final UserView userView = this.fragmentUtils.getUserView(fragment, locale);
        if (userView == null) {
            throw new IllegalStateException(
                    "No UserView found for fragment: " + fragment.getName());
        }

        root.setAttribute(
                Constants.ATT_ID,
                Constants.FRAGMENT_ID_USER_PREFIX
                        + userView.getUserId()
                        + Constants.FRAGMENT_ID_LAYOUT_PREFIX
                        + "1");
        try {
            this.fragmentActivator.clearChacheForOwner(fragment.getOwnerId());
            this.fragmentUtils.getUserView(fragment, locale);
        } catch (final Exception e) {
            logger.error("An exception occurred attempting to update a layout.", e);
        }
    }
817901
@SuppressLint("WrongCall")
    protected boolean layout() {
        boolean relaidout = false;
        Log.v(Log.SUBSYSTEM.LAYOUT, TAG, "layout(%s): changed: %b, requested: %b", getName(),
                isChanged(), mLayoutRequested);

        if (isChanged() || mLayoutRequested) {
            Log.v(Log.SUBSYSTEM.LAYOUT, TAG, "layout(%s): calling onLayout", getName());
            relaidout = onLayout();
        }

        mLayoutRequested = false;
        mChanged = false;
        return relaidout;
    }
11750
private void showTab() {
		if (parentTab != null) {
			tab = parentTab.getTab(this);
			if (tab != null) {
				// FIXME: this should be added by the constructor or by the panel that adds this
				// tab
				// tab.getComponent().addStyleName("example-queries-tab");
				tab.setEnabled(true);

				if (!(parentTab.getSelectedTab() instanceof ResultViewPanel)) {
					parentTab.setSelectedTab(tab);
				}
			}
		}

	}
213604
private void showFragment(ShowcaseFragment fragment) {
    final FragmentTransaction fragmentTransaction = getSupportFragmentManager()
        .beginTransaction()
        .replace(R.id.content_main, (Fragment) fragment);
    if (fragment.getBackstackTag() != null) {
      fragmentTransaction.addToBackStack(fragment.getBackstackTag());
    }
    fragmentTransaction.commit();

    setTitle(fragment.getTitleId());
  }
871214
function selectTab() {
        var href = tab.href.split('#')[1];
        var panel = layout._content.querySelector('#' + href);
        layout._resetTabState(tabs);
        layout._resetPanelState(panels);
        u.addClass(tab, layout._CssClasses.IS_ACTIVE);
        u.addClass(panel, layout._CssClasses.IS_ACTIVE);
    }
823719
function( id ) {
			if ( this._.currentTabId == id )
				return;

			if ( this._.tabs[ id ][ 0 ].hasClass( 'cke_dialog_tab_disabled' ) )
				return;

			// If event was canceled - do nothing.
			if ( this.fire( 'selectPage', { page: id, currentPage: this._.currentTabId } ) === false )
				return;

			// Hide the non-selected tabs and pages.
			for ( var i in this._.tabs ) {
				var tab = this._.tabs[ i ][ 0 ],
					page = this._.tabs[ i ][ 1 ];
				if ( i != id ) {
					tab.removeClass( 'cke_dialog_tab_selected' );
					page.hide();
				}
				page.setAttribute( 'aria-hidden', i != id );
			}

			var selected = this._.tabs[ id ];
			selected[ 0 ].addClass( 'cke_dialog_tab_selected' );

			// [IE] an invisible input[type='text'] will enlarge it's width
			// if it's value is long when it shows, so we clear it's value
			// before it shows and then recover it (#5649)
			if ( CKEDITOR.env.ie6Compat || CKEDITOR.env.ie7Compat ) {
				clearOrRecoverTextInputValue( selected[ 1 ] );
				selected[ 1 ].show();
				setTimeout( function() {
					clearOrRecoverTextInputValue( selected[ 1 ], 1 );
				}, 0 );
			} else
				selected[ 1 ].show();

			this._.currentTabId = id;
			this._.currentTabIndex = CKEDITOR.tools.indexOf( this._.tabIdList, id );
		}