Creates a layout.
779853
public function createLayout(Layout $layout): Layout
    {
        $query = $this->connection->createQueryBuilder()
            ->insert('ngbm_layout')
            ->values(
                [
                    'id' => ':id',
                    'status' => ':status',
                    'type' => ':type',
                    'name' => ':name',
                    'description' => ':description',
                    'created' => ':created',
                    'modified' => ':modified',
                    'shared' => ':shared',
                    'main_locale' => ':main_locale',
                ]
            )
            ->setValue(
                'id',
                $layout->id !== null ?
                    (int) $layout->id :
                    $this->connectionHelper->getAutoIncrementValue('ngbm_layout')
            )
            ->setParameter('status', $layout->status, Type::INTEGER)
            ->setParameter('type', $layout->type, Type::STRING)
            ->setParameter('name', $layout->name, Type::STRING)
            ->setParameter('description', $layout->description, Type::STRING)
            ->setParameter('created', $layout->created, Type::INTEGER)
            ->setParameter('modified', $layout->modified, Type::INTEGER)
            ->setParameter('shared', $layout->shared, Type::BOOLEAN)
            ->setParameter('main_locale', $layout->mainLocale, Type::STRING);

        $query->execute();

        $layout->id = $layout->id ?? (int) $this->connectionHelper->lastInsertId('ngbm_layout');

        return $layout;
    }
490297
private void init() {
        this.setOrientation(LinearLayout.VERTICAL);
        mLayoutParams = new LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
    }
235668
private RelativeLayout.LayoutParams createLayoutParams() {
        Rect windowDimensions = new Rect();
        Window window = getWindow();
        assert window != null;
        window.getDecorView().getWindowVisibleDisplayFrame(windowDimensions);
        int leftInset = isFitsSystemWindowsLeft() && isFullscreen() && systemWindowInsets != null ?
                systemWindowInsets.left : 0;
        int topInset = isFitsSystemWindowsTop() && isFullscreen() && systemWindowInsets != null ?
                systemWindowInsets.top : 0;
        int rightInset =
                isFitsSystemWindowsRight() && isFullscreen() && systemWindowInsets != null ?
                        systemWindowInsets.right : 0;
        int bottomInset =
                isFitsSystemWindowsBottom() && isFullscreen() && systemWindowInsets != null ?
                        systemWindowInsets.bottom : 0;
        int leftMargin = getLeftMargin() - getWindowInsetLeft() + leftInset;
        int topMargin = getTopMargin() - getWindowInsetTop() + topInset;
        int rightMargin = getRightMargin() - getWindowInsetRight() + rightInset;
        int bottomMargin = getBottomMargin() - getWindowInsetBottom() + bottomInset;
        int width =
                getLayoutDimension(getWidth(), leftMargin + rightMargin, windowDimensions.right);
        int height =
                getLayoutDimension(getHeight(), topMargin + bottomMargin, windowDimensions.bottom);
        RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(width, height);
        layoutParams.leftMargin = leftMargin;
        layoutParams.topMargin = topMargin;
        layoutParams.rightMargin = rightMargin;
        layoutParams.bottomMargin = bottomMargin;

        if ((getGravity() & Gravity.CENTER_HORIZONTAL) == Gravity.CENTER_HORIZONTAL) {
            layoutParams.addRule(RelativeLayout.CENTER_HORIZONTAL, RelativeLayout.TRUE);
        }

        if ((getGravity() & Gravity.CENTER_VERTICAL) == Gravity.CENTER_VERTICAL) {
            layoutParams.addRule(RelativeLayout.CENTER_VERTICAL, RelativeLayout.TRUE);
        }

        if ((getGravity() & Gravity.LEFT) == Gravity.LEFT) {
            layoutParams.addRule(RelativeLayout.ALIGN_PARENT_LEFT, RelativeLayout.TRUE);
        }

        if ((getGravity() & Gravity.TOP) == Gravity.TOP) {
            layoutParams.addRule(RelativeLayout.ALIGN_PARENT_TOP, RelativeLayout.TRUE);
        }

        if ((getGravity() & Gravity.RIGHT) == Gravity.RIGHT) {
            layoutParams.addRule(RelativeLayout.ALIGN_PARENT_RIGHT, RelativeLayout.TRUE);
        }

        if ((getGravity() & Gravity.BOTTOM) == Gravity.BOTTOM) {
            layoutParams.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM, RelativeLayout.TRUE);
        }

        return layoutParams;
    }
1374920
@Override
	public Layout<AbstractType,String> getConfiguredLayout() {
		return new StaticLayout<AbstractType,String>( this.graph, this, getGraphDimension());
	}
510354
function Layout(options) {
    // Grant this View superpowers.
    this.manage = true;

    // Give this View access to all passed options as instance properties.
    _.extend(this, options);

    // Have Backbone set up the rest of this View.
    Backbone.View.apply(this, arguments);
  }
959286
def add_layout(self, l):
        """"""
        if self.layout():
            self.layout().addLayout(l)
        else:
            layout = QVBoxLayout(self)
            layout.addLayout(l)
90785
protected void layoutLabel ()
    {
        Graphics2D gfx = _mgr.createGraphics();
        if (gfx == null) {
            return;
        }
        try {
            gfx.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
                                 (_antiAliased) ?
                                 RenderingHints.VALUE_ANTIALIAS_ON :
                                 RenderingHints.VALUE_ANTIALIAS_OFF);
            _label.layout(gfx);
        } finally {
            gfx.dispose();
        }
    }
29103
protected function setupLayout($layout = null)
    {
        $this->layout = !is_null($layout) ? $layout : $this->layout;
        if ($this->layout && is_string($this->layout) && view()->exists($this->layout)) {
            $this->layout = view($this->layout);
        }
    }
315942
protected function setupLayout()
    {
        if (is_null($this->template)) {
            abort(500, 'The layout is not set');
        }

        $this->viewExistsOrFail(
            $this->template,
            "The layout [$this->template] not found"
        );

        $this->layout = view($this->template);
    }
714173
def create_widget(self):
        
        d = self.declaration
        self.widget = RelativeLayout(self.get_context(), None, d.style)
722179
function (cb, data, layout) {
            var self = this;

            Y.prepare([DEFAULT_THEME, themeDir], self.getProjectMeta(), function (err, opts) {
                if (err) {
                    console.log(err);
                }
                if (!data.name) {
                    return;
                }

                opts.meta = Y.merge(opts.meta, data);

                opts.meta.title = self.data.project.name;
                opts.meta.moduleName = data.name;
                opts.meta.projectRoot = '../';
                opts.meta.projectAssets = '../assets';
                opts.meta.projectLogo = self._resolveUrl(self.data.project.logo, opts);

                opts = self.populateClasses(opts);
                opts = self.populateModules(opts);
                opts = self.populateFiles(opts);

                opts.meta.fileName = data.name;
                fs.readFile(opts.meta.fileName, Y.charset, Y.rbind(function (err, str, opts, data) {
                    if (err) {
                        Y.log(err, 'error', 'builder');
                        cb(err);
                        return;
                    }

                    if (typeof self.options.tabspace === 'string') {
                        str = str.replace(/\t/g, self.options.tabspace);
                    }

                    opts.meta.fileData = str;
                    var view = new Y.DocView(opts.meta, 'index');
                    var mainLayout = opts.layouts[layout];
                    self.render('{{>files}}', view, mainLayout, opts.partials, function (err, html) {
                        self.files++;
                        cb(html, view, data);
                    });

                }, this, opts, data));
            });

        }
409431
protected function initLayout()
    {
        if ($this->layout === null) {
            $this->layout = 'Generic';
        }

        if (is_string($this->layout) || is_array($this->layout)) {
            $this->layout = $this->factory($this->layout, ['form'=>$this], 'FormLayout');
            $this->layout = $this->add($this->layout);
        } elseif (is_object($this->layout)) {
            $this->layout->form = $this;
            $this->add($this->layout);
        } else {
            throw new Exception(['Unsupported specification of form layout. Can be array, string or object', 'layout' => $this->layout]);
        }

        // Add save button in layout
        if ($this->buttonSave) {
            $this->buttonSave = $this->layout->addButton($this->buttonSave);
            $this->buttonSave->setAttr('tabindex', 0);
            $this->buttonSave->on('click', $this->js()->form('submit'));
            $this->buttonSave->on('keypress', new jsExpression('if (event.keyCode === 13){$([name]).form("submit");}', ['name' => '#'.$this->name]));
        }
    }
1253354
private function AddCreateLayoutsField()
    {
        $name = 'CreateLayouts';
        $this->AddField(new Checkbox($name, $name, (bool)$this->group->GetCreateLayouts()));
    }
562808
private void layoutComponents() {
		GridBagLayout layout = new GridBagLayout();
		layout.rowWeights = new double[]{1.0, 0.0, 0.0};
		layout.columnWeights = new double[]{1.0, 0.0, 0.0, 0.0, 0.0};
		layout.rowHeights = new int[] {0, 0, 0};
		layout.columnWidths = new int[] {0, 0, 0, 0, 0};
		getContentPane().setLayout(layout);

		GridBagConstraints wizardPageContainerConstraint = new GridBagConstraints();
		wizardPageContainerConstraint.gridwidth = 5;
		wizardPageContainerConstraint.fill = GridBagConstraints.BOTH;
		wizardPageContainerConstraint.gridx = 0;
		wizardPageContainerConstraint.gridy = 0;
		wizardPageContainerConstraint.insets = new Insets(5, 5, 5, 5);
		getContentPane().add(wizardPageContainer, wizardPageContainerConstraint);

		GridBagConstraints separatorConstraints = new GridBagConstraints();
		separatorConstraints.gridwidth = 5;
		separatorConstraints.fill = GridBagConstraints.HORIZONTAL;
		separatorConstraints.gridx = 0;
		separatorConstraints.gridy = 1;
		separatorConstraints.insets = new Insets(5, 5, 5, 5);
		getContentPane().add(new JSeparator(), separatorConstraints);

		GridBagConstraints cancelButtonConstraints = new GridBagConstraints();
		cancelButtonConstraints.gridx = 1;
		cancelButtonConstraints.gridy = 2;
		cancelButtonConstraints.insets = new Insets(5, 5, 5, 0);
		getContentPane().add(cancelButton, cancelButtonConstraints);

		GridBagConstraints previousButtonConstraints = new GridBagConstraints();
		previousButtonConstraints.gridx = 2;
		previousButtonConstraints.gridy = 2;
		previousButtonConstraints.insets = new Insets(5, 5, 5, 0);
		getContentPane().add(previousButton, previousButtonConstraints);

		GridBagConstraints nextButtonConstraints = new GridBagConstraints();
		nextButtonConstraints.gridx = 3;
		nextButtonConstraints.gridy = 2;
		nextButtonConstraints.insets = new Insets(5, 5, 5, 0);
		getContentPane().add(nextButton, nextButtonConstraints);

		GridBagConstraints finishButtonConstraints = new GridBagConstraints();
		finishButtonConstraints.gridx = 4;
		finishButtonConstraints.gridy = 2;
		finishButtonConstraints.insets = new Insets(5, 5, 5, 5);
		getContentPane().add(finishButton, finishButtonConstraints);
	}
100198
public void setButtonLayout(final Layout layout) {
		RadioButtonSelectModel model = getOrCreateComponentModel();
		model.layout = layout;
		model.numColumns = 0;
	}
937167
protected function setLayout()
    {
        $layout = $this->request->getAttribute(self::LAYOUT, $this->default_layout);
        if ($layout) {
            $this->view->setLayout($layout);
        }
    }
1301554
private void createView(Context context) {
        ((LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE)).inflate(R.layout.pin_view, this,
                true);
        inputMethodManager = (InputMethodManager) getContext().getSystemService(Service.INPUT_METHOD_SERVICE);
        mLinearLayoutPinTexts = (LinearLayout) findViewById(R.id.ll_pin_texts);
        mLinearLayoutPinBoxes = (LinearLayout) findViewById(R.id.ll_pin_edit_texts);
    }