Attach this {@link UITabGroup} to a {@link UIContainer}.

@param container the container to attach to.
@param displace if true, moves and resize the UIContainer to make place for the UITabGroup
@return this {@link UITab}
17395
public UITabGroup attachTo(UIContainer container, boolean displace)
	{
		attachedContainer = container;
		if (activeTab != null)
			activeTab.setActive(true);

		switch (tabPosition)
		{
			case TOP:
				setPosition(Position.above(this, container, -2));
				break;
			case BOTTOM:
				setPosition(Position.below(this, container, -2));
				break;
			case LEFT:
				setPosition(Position.leftOf(this, container, -2));
				break;
			case RIGHT:
				setPosition(Position.rightOf(this, container, -2));
				break;
		}

		for (UIContainer tabContainer : listTabs.values())
			setupTabContainer(tabContainer);

		calculateTabPosition();

		if (activeTab != null)
		{
			UITab tab = activeTab;
			activeTab = null;
			setActiveTab(tab);
		}

		if (displace)
		{
			attachedContainer.setPosition(new AttachedContainerPosition(attachedContainer.position()));
			attachedContainer.setSize(new AttachedContainerSize(attachedContainer.size()));
		}

		return this;
	}
384371
public function addTab( $label, $content, $fragmentKey = NULL )
	{
		if( is_null( $fragmentKey ) )
		{
			$this->tabs[]	= $label;
			$this->divs[]	= $content;
		}
		else
		{
			if( isset( $this->tabs[$fragmentKey] ) )
				throw new Exception( 'Tab with Fragment ID "'.$fragmentKey.'" is already set' );
			$this->tabs[$fragmentKey]	= $label;
			$this->divs[$fragmentKey]	= $content;
		}
	}
299257
public void eInit(XtendTypeDeclaration container, String name, IJvmTypeProvider context) {
		if (this.sarlAnnotationType == null) {
			this.container = container;
			this.sarlAnnotationType = SarlFactory.eINSTANCE.createSarlAnnotationType();
			container.getMembers().add(this.sarlAnnotationType);
			if (!Strings.isEmpty(name)) {
				this.sarlAnnotationType.setName(name);
			}
		}
	}
760960
def bind(self, container):
        
        # if there's already a matching bound instance, return that
        shared = container.shared_extensions.get(self.sharing_key)
        if shared:
            return shared

        instance = super(SharedExtension, self).bind(container)

        # save the new instance
        container.shared_extensions[self.sharing_key] = instance

        return instance
424518
private static void addStickyFooterDivider(Context ctx, ViewGroup footerView) {
        LinearLayout divider = new LinearLayout(ctx);
        LinearLayout.LayoutParams dividerParams = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
        divider.setMinimumHeight((int) UIUtils.convertDpToPixel(1, ctx));
        divider.setOrientation(LinearLayout.VERTICAL);
        divider.setBackgroundColor(UIUtils.getThemeColorFromAttrOrRes(ctx, R.attr.material_drawer_divider, R.color.material_drawer_divider));
        footerView.addView(divider, dividerParams);
    }
580558
def addContainer(self, query):
        
        self.setUpdatesEnabled(False)
        self.blockSignals(True)
        container = XOrbQueryContainer(self)
        
        # setup properties
        container.setShowBack(self.count() > 0)
        
        # create connections
        container.enterCompoundRequested.connect(self.enterContainer)
        container.exitCompoundRequested.connect(self.exitContainer)
        
        # show the widget
        self.addWidget(container)
        self.setUpdatesEnabled(True)
        self.blockSignals(False)
        
        container.setQuery(query)
        self.slideInNext()
        return container
908444
public function addContainer($container, $types = [], $defaultFormat = null, $formats = [])
    {
        if (isset($this->containers[$container])) {
            return $this;
        }

        $this->containers[$container] = new NotificationsBag($container, $types, $defaultFormat, $formats);
        $this->containers[$container]->setNotification($this);

        return $this;
    }
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
184123
public int addAll(KTypeContainer<? extends KType> container) {
    ensureCapacity(container.size());
    return addAll((Iterable<? extends KTypeCursor<? extends KType>>) container);
  }
1138830
public function setContainer(Symfony\Component\DependencyInjection\Container $container) {
        $this->container = $container;

        return $this;
    }
1089670
def _add_container(props_node, tag, container):
        
        values_node = ElementTree.SubElement(props_node, tag)
        for value in container:
            value_node = ElementTree.SubElement(values_node, TAG_VALUE)
            value_node.text = str(value)
151847
public QueryAtomGroupImpl bind(QueryBinding binding) {
        QueryAtomGroupImpl group = new QueryAtomGroupImpl();
        for (QueryAtom atom : atoms) {
            group.addAtom(atom.bind(binding));
        }
        return group;
    }
494392
public function addContainer(MutableContainerInterface $container): void
    {
        $containerName = get_class($container);
        if (array_key_exists($containerName, $this->registry)) {
            throw new ContainerAlreadyRegisteredException($containerName);
        }

        $this->registry[$containerName] = $container;
    }
143042
public static void setOriginContainer(final Set<Tag> tags, final EntityContainer container) {
	final UUID id = Identifiable.getID(container);
	if (id != null) {
	    tags.add(new OriginContainer(id));
	}
    }
1071805
public static GridPanel getInstanceByTabPanel(TabPanel tabPanel, String searchColumnId) {
        GridPanel gridPanel = new GridPanel();
        WebLocator container = tabPanel.getPathBuilder().getContainer();
        gridPanel.setContainer(container);

        tabPanel.setContainer(null); // hack to have path without container
        String elPath = tabPanel.getXPath();
        tabPanel.setContainer(container); // set container back

        gridPanel.setElPath(elPath);
        gridPanel.setSearchColumnId(searchColumnId);
        return gridPanel;
    }
378576
private static void addToContainer(Container container,
                                     PackingPlan.InstancePlan instancePlan,
                                     Map<String, TreeSet<Integer>> componentIndexes,
                                     Set<Integer> taskIds) {
    container.add(instancePlan);
    String componentName = instancePlan.getComponentName();

    // update componentIndex and taskIds
    componentIndexes.computeIfAbsent(componentName, k -> new TreeSet<Integer>());
    componentIndexes.get(componentName).add(instancePlan.getComponentIndex());
    taskIds.add(instancePlan.getTaskId());
  }
1179064
public static ViewGroup buildStickyDrawerItemFooter(Context ctx, DrawerBuilder drawer, View.OnClickListener onClickListener) {
        //create the container view
        final LinearLayout linearLayout = new LinearLayout(ctx);
        linearLayout.setLayoutParams(new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT));
        linearLayout.setOrientation(LinearLayout.VERTICAL);
        //set the background color to the drawer background color (if it has alpha the shadow won't be visible)
        linearLayout.setBackgroundColor(UIUtils.getThemeColorFromAttrOrRes(ctx, R.attr.material_drawer_background, R.color.material_drawer_background));

        //create the divider
        if (drawer.mStickyFooterDivider) {
            addStickyFooterDivider(ctx, linearLayout);
        }

        fillStickyDrawerItemFooter(drawer, linearLayout, onClickListener);

        return linearLayout;
    }