Creates a layout configuration out of the current state

@returns {Object} GoldenLayout configuration
438863
function() {
		var config = $.extend( true, {}, this.config );
		config.content = [];
		var next = function( configNode, item ) {
			var key, i;
			
			for( key in item.config ) {
				if( key !== 'content' ) {
					configNode[ key ] = item.config[ key ];
				}
			}

			if( item.contentItems.length ) {
				configNode.content = [];
				
				for( i = 0; i < item.contentItems.length; i++ ) {
					configNode.content[ i ] = {};
					next( configNode.content[ i ], item.contentItems[ i ] );
				}
			}
		};

		next( config, this.root );

		return config;
	}
14012
function(ch, w, coord, prop) {
     if(this.layout.horizontal()) {
       return this.layoutH(ch, w, coord, prop);
     } else {
       return this.layoutV(ch, w, coord, prop);
     }
    }
624804
public static JPanel createPanelWithHorizontalLayout()
	{
		JPanel _panel = new JPanel();
		_panel.setLayout(new BoxLayout(_panel, BoxLayout.X_AXIS));
		return _panel;
	}
731273
function () {
        var self = this, layoutRect = self._super(), deltaH = 0, headEl;

        // Reserve vertical space for title
        if (self.settings.title && !self._fullscreen) {
          headEl = self.getEl('head');

          var size = DomUtils.getSize(headEl);

          layoutRect.headerW = size.width;
          layoutRect.headerH = size.height;

          deltaH += layoutRect.headerH;
        }

        // Reserve vertical space for statusbar
        if (self.statusbar) {
          deltaH += self.statusbar.layoutRect().h;
        }

        layoutRect.deltaH += deltaH;
        layoutRect.minH += deltaH;
        //layoutRect.innerH -= deltaH;
        layoutRect.h += deltaH;

        var rect = DomUtils.getWindowSize();

        layoutRect.x = self.settings.x || Math.max(0, rect.w / 2 - layoutRect.w / 2);
        layoutRect.y = self.settings.y || Math.max(0, rect.h / 2 - layoutRect.h / 2);

        return layoutRect;
      }
308758
function createTableLayout(){
    var tableItem = {
        type: 'component',
        componentName: 'Table'
    };

    var stackItem = myLayout.root.getItemsById('stack-topleft')[0];
    stackItem.addChild(tableItem);
    // get focus on the search tab
    stackItem.setActiveContentItem(myLayout.root.getItemsById('node-list')[0]);
    globalFunc.initTable();
}
15985
function applyLayout(chunk) {
    chunk.data.contents = String(chunk.contents);
    var layout = getLayout(chunk.data.layout),
        contents = options.renderTemplate(layout.contents, chunk.data, layout.path);
    chunk.contents = new Buffer(contents);
    return chunk;
  }
427058
private Component createUpperRightComponent() {

        HorizontalLayout upperRight = new HorizontalLayout();
        upperRight.setSizeFull();

        FormLayout fileNameDisplay = new FormLayout();
        fileNameDisplay.setDefaultComponentAlignment(Alignment.MIDDLE_LEFT);
        fileNameDisplay.setSizeFull();

        m_filePathField = new TextField();
        m_filePathField.setWidth("100%");
        m_filePathField.setEnabled(true);
        m_filePathField.setReadOnly(true);

        fileNameDisplay.addComponent(m_filePathField);
        fileNameDisplay.setSpacing(true);

        FormLayout filePathDisplay = new FormLayout();
        filePathDisplay.setDefaultComponentAlignment(Alignment.MIDDLE_LEFT);
        filePathDisplay.setSizeFull();
        filePathDisplay.addComponent(m_filePathField);
        filePathDisplay.setSpacing(true);

        upperRight.addComponent(filePathDisplay);
        upperRight.setExpandRatio(filePathDisplay, 2f);

        HorizontalLayout placeHolder = new HorizontalLayout();
        placeHolder.setWidth(CmsMessageBundleEditorTypes.OPTION_COLUMN_WIDTH_PX);
        upperRight.addComponent(placeHolder);

        return upperRight;
    }
322429
function addFlexibleLayout() {
    var modifier = new Modifier({
        size: [200, 200],
        transform: Transform.translate(200, 0)
    });

    var layout = new FlexibleLayout({
        direction: Utility.Direction.X,
        ratios: [true, 1, 2, 3, true]
    });

    function getItem() {
        return new Surface({
            properties: {
                backgroundColor: getRandomColor()
            }
        });
    }

    var items = [
        new Surface({
            size: [20, undefined],
            properties: {
                backgroundColor: getRandomColor()
            }
        }),
        getItem(),
        getItem(),
        getItem(),
        new Surface({
            size: [10, undefined],
            properties: {
                backgroundColor: getRandomColor()
            }
        })
    ];

    layout.sequenceFrom(items);
    ctx.add(modifier).add(layout);
}
142253
function() {
            var element = this.element,
                template = this.template,
                offset = element.offset(),
                width = element.outerWidth(),
                height = element.outerHeight(),
                position = this.options.position,
                alignment = this.options.alignment,
                styles = {},
                self = this;

            template.show();

            // Place the template
            switch (position) {
                case 'bottom':
                    styles.top = offset.top + height;
                    break;
                case 'right':
                    styles.left = offset.left + width;
                    break;
                case 'top':
                    styles.top = offset.top - template.outerHeight();
                    break;
                case 'left':
                    styles.left = offset.left - template.outerWidth();
                    break;
            }

            // Align the template arrow
            switch (alignment) {
                case 'left':
                    styles.left = offset.left;
                    break;
                case 'right':
                    styles.left = offset.left + width - template.outerWidth();
                    break;
            }

            template.css(styles);
        }
1323015
function () {
        var self = this, statusbar = self.statusbar, layoutRect, width, x, needsRecalc;

        if (self._fullscreen) {
          self.layoutRect(DomUtils.getWindowSize());
          self.layoutRect().contentH = self.layoutRect().innerH;
        }

        self._super();

        layoutRect = self.layoutRect();

        // Resize window based on title width
        if (self.settings.title && !self._fullscreen) {
          width = layoutRect.headerW;
          if (width > layoutRect.w) {
            x = layoutRect.x - Math.max(0, width / 2);
            self.layoutRect({ w: width, x: x });
            needsRecalc = true;
          }
        }

        // Resize window based on statusbar width
        if (statusbar) {
          statusbar.layoutRect({ w: self.layoutRect().innerW }).recalc();

          width = statusbar.layoutRect().minW + layoutRect.deltaW;
          if (width > layoutRect.w) {
            x = layoutRect.x - Math.max(0, width - layoutRect.w);
            self.layoutRect({ w: width, x: x });
            needsRecalc = true;
          }
        }

        // Recalc body and disable auto resize
        if (needsRecalc) {
          self.recalc();
        }
      }
326700
function layoutInit() {
  IBMChat.subscribe('layout:choose', function(data) {
    var widget = new Choose(data);
    widgets[data.uuid] = widget;
  });
  IBMChat.subscribe('layout:confirm', function(data) {
    var widget = new Choose(data);
    widgets[data.uuid] = widget;
  });
}
971522
function(view) {
    if (view.options.layoutApplied) {
      return view;
    }

    // handle pre-layout middleware
    this.handle('preLayout', view);

    var opts = {};
    lazy.extend(opts, this.options);
    lazy.extend(opts, view.options);
    lazy.extend(opts, view.context());

    // get the layout stack
    var stack = {};
    var alias = this.viewTypes.layout;
    var len = alias.length, i = 0;

    while (len--) {
      var views = this.views[alias[i++]];
      for (var key in views) {
        var val = views[key];
        if (views.hasOwnProperty(key) && typeof val !== 'function' && val.path) {
          stack[key] = val;
        }
      }
    }

    // get the name of the first layout
    var name = view.layout;
    var str = view.content;
    var self = this;

    if (!name) return view;

    // Handle each layout before it's applied to a view
    function handleLayout(layoutObj) {
      view.currentLayout = layoutObj.layout;
      self.handle('onLayout', view);
      delete view.currentLayout;
    }

    // actually apply the layout
    var res = lazy.layouts(str, name, stack, opts, handleLayout);

    view.option('layoutStack', res.history);
    view.option('layoutApplied', true);
    view.content = res.result;

    // handle post-layout middleware
    this.handle('postLayout', view);
    return view;
  }
367632
protected TextLayout getTextLayout()
    {
        if (refreshTextLayout)
        {
            refreshTextLayout = false;
            layout = new TextLayout(getText(), getFont(), new FontRenderContext(transform, true, false));
        }

        return layout;
    }
578678
private FormLayout initContent() {

        FormLayout form = new FormLayout();
        CmsPathSelectField field = new CmsPathSelectField();
        field.setValue(getInitialTarget(m_context.getCms(), m_context.getResources().get(0)));
        field.setStartWithSitempaView(true);
        field.setResourceFilter(CmsResourceFilter.IGNORE_EXPIRATION.addRequireFolder());
        field.setCaption(CmsVaadinUtils.getMessageText(org.opencms.workplace.commons.Messages.GUI_COPY_MOVE_TARGET_0));
        form.addComponent(field);
        m_targetSelect = field;
        m_copyMode.addItem(CmsContainerPageCopier.CopyMode.automatic);
        m_copyMode.setItemCaption(
            CmsContainerPageCopier.CopyMode.automatic,
            CmsVaadinUtils.getMessageText(Messages.GUI_COPYPAGE_MODE_AUTO_0));

        m_copyMode.addItem(CmsContainerPageCopier.CopyMode.smartCopyAndChangeLocale);
        m_copyMode.setItemCaption(
            CmsContainerPageCopier.CopyMode.smartCopyAndChangeLocale,
            CmsVaadinUtils.getMessageText(Messages.GUI_COPYPAGE_MODE_SMART_0));
        m_copyMode.addItem(CmsContainerPageCopier.CopyMode.reuse);
        m_copyMode.setItemCaption(
            CmsContainerPageCopier.CopyMode.reuse,
            CmsVaadinUtils.getMessageText(Messages.GUI_COPYPAGE_MODE_REUSE_0));
        m_copyMode.setValue(CmsContainerPageCopier.CopyMode.automatic);
        form.addComponent(m_copyMode);
        m_copyMode.setCaption(CmsVaadinUtils.getMessageText(Messages.GUI_COPYPAGE_COPY_MODE_0));
        return form;
    }
704343
function(options) {
    _.extend(LayoutManager.prototype, options);

    // Allow LayoutManager to manage Backbone.View.prototype.
    if (options.manage) {
      Backbone.View.prototype.manage = true;
    }

    // Disable the element globally.
    if (options.el === false) {
      Backbone.View.prototype.el = false;
    }

    // Allow global configuration of `suppressWarnings`.
    if (options.suppressWarnings === true) {
      Backbone.View.prototype.suppressWarnings = true;
    }

    // Allow global configuration of `useRAF`.
    if (options.useRAF === false) {
      Backbone.View.prototype.useRAF = false;
    }

    // Allow underscore to be swapped out
    if (options._) {
      _ = options._;
    }
  }
1370023
function () {
        var self = this, layout = self._layout, innerHtml = self.settings.html;

        self.preRender();
        layout.preRender(self);

        if (typeof innerHtml == "undefined") {
          innerHtml = (
            '<div id="' + self._id + '-body" class="' + self.bodyClasses + '">' +
            layout.renderHtml(self) +
            '</div>'
          );
        } else {
          if (typeof innerHtml == 'function') {
            innerHtml = innerHtml.call(self);
          }

          self._hasBody = false;
        }

        return (
          '<div id="' + self._id + '" class="' + self.classes + '" hidefocus="1" tabindex="-1" role="group">' +
          (self._preBodyHtml || '') +
          innerHtml +
          '</div>'
        );
      }
522576
protected HorizontalLayout buildTitleLayout() {
        titleLayout = new HorizontalLayout();
        titleLayout.addStyleName(SPUIStyleDefinitions.WIDGET_TITLE);
        titleLayout.setSpacing(false);
        titleLayout.setMargin(false);
        titleLayout.setSizeFull();
        titleLayout.addComponent(title);
        titleLayout.setComponentAlignment(title, Alignment.TOP_LEFT);
        titleLayout.setExpandRatio(title, 0.8F);

        if (hasHeaderMaximizeSupport()) {
            titleLayout.addComponents(getHeaderMaximizeSupport().maxMinButton);
            titleLayout.setComponentAlignment(getHeaderMaximizeSupport().maxMinButton, Alignment.TOP_RIGHT);
            titleLayout.setExpandRatio(getHeaderMaximizeSupport().maxMinButton, 0.2F);
        }

        return titleLayout;
    }