Constructordijit.layout.LayoutContainer

dojo.require("dijit.layout.LayoutContainer");
defined in dijit/layout/LayoutContainer.js

A LayoutContainer is a box with a specified size (like style="width: 500px; height: 500px;"), that contains children widgets marked with "layoutAlign" of "left", "right", "bottom", "top", and "client". It takes it's children marked as left/top/bottom/right, and lays them out along the edges of the box, and then it takes the child marked "client" and puts it into the remaining space in the middle.

Left/right positioning is similar to CSS's "float: left" and "float: right", and top/bottom positioning would be similar to "float: top" and "float: bottom", if there were such CSS.

Note that there can only be one client element, but there can be multiple left, right, top, or bottom elements.

Usage

function () (view source)

Examples

Example 1


header text


table of contents


client area



Lays out each child in the natural order the children occur in.
Basically each child is laid out into the "remaining space", where "remaining space" is initially
the content area of this widget, but is reduced to a smaller rectangle each time a child is added.
dijit._Contained (from dijit.layout._LayoutWidget), dijit._Container (from dijit.layout._LayoutWidget)

Jump to PropertiesFunctionsBack to top

FunctionaddChild(child, insertIndex: Integer?)
Overrides dijit._Container
Process the given child widget, inserting it's dom node as a child of our dom node
Defined by dijit._Widget
Construct the UI for this widget, setting this.domNode. Most widgets will mixin TemplatedWidget, which overrides this method.
Functionconnect(obj: Object, event: String, method: String|Function)
Defined by dijit._Widget
Connects specified obj/event to specified method of this object and registers for disconnect() on widget destroy. Special event: "ondijitclick" triggers on a click or enter-down or space-up Similar to dojo.connect() but takes three arguments rather than four.
Functioncreate(params: Object?, srcNodeRef: DomNode|String)
Defined by dijit._Widget
Kick off the life-cycle of a widget
Functiondestroy(finalize: Boolean)
Defined by dijit._Widget
Destroy this widget, but not its descendants
Defined by dijit._Widget
Recursively destroy the children of this widget and their descendants.
Defined by dijit._Widget
Destroy this widget and it's descendants. This is the generic "destructor" function that all widget users should call to cleanly discard with a widget. Once a widget is destroyed, it's removed from the manager object.
Defined by dijit._Widget
Destroys the DOM nodes associated with this widget
Functiondisconnect(handles: Object)
Defined by dijit._Widget
Disconnects handle created by this.connect. Also removes handle from this widget's list of connects
Defined by dijit._Container
Returns array of children widgets
Defined by dijit._Widget
Returns all the widgets that contained by this, i.e., all widgets underneath this.containerNode.
Defined by dijit._Contained
Returns null if this is the last child of the parent, otherwise returns the next element sibling to the "right".
Defined by dijit._Contained
Returns the parent widget of this widget, assuming the parent implements dijit._Container
Defined by dijit._Contained
Returns null if this is the first child of the parent, otherwise returns the next element sibling to the "left".
Defined by dijit._Container
Returns true if widget has children
Defined by dijit._Widget
Return true if this widget can currently be focused and false if not
Defined by dijit._Widget
Checks the DOM to for the text direction for bi-directional support
Widgets override this method to size & position their contents/children. When this is called this._contentBox is guaranteed to be set (see resize()). This is called after startup(), and also when the widget's size has been changed.
Defined by dijit._Widget
stub function. Override or connect to this method to receive notifications for when the widget moves out of focus.
Defined by dijit._Widget
Callback if someone tries to close the child, child will be closed if func returns true
Defined by dijit._Widget
stub function. Override or connect to this method to receive notifications for when the widget moves into focus.
Called after a widget's dom has been setup
Defined by dijit._Widget
Called after the parameters to the widget have been read-in, but before the widget template is instantiated. Especially useful to set properties that are referenced in the widget template.
Functionpostscript(params: Object?, srcNodeRef: DomNode|String)
Defined by dijit._Widget
FunctionremoveChild(widget)
Overrides dijit._Container
Removes the passed widget instance from this widget but does not destroy it
Functionresize(args: Object?)
Explicitly set this widget's size (in pixels), and then call layout() to resize contents (and maybe adjust child widgets)
FunctionsetAttribute(attr: String, value)
Defined by dijit._Widget
Set native HTML attributes reflected in the widget, such as readOnly, disabled, and maxLength in TextBox widgets.
Called after all the widgets have been instantiated and their dom nodes have been inserted somewhere under dojo.doc.body. Widgets should override this method to do any initialization dependent on other widgets existing, and then call this superclass method to finish things off. startup() in subclasses shouldn't do anything size related because the size of the widget hasn't been set yet.
Defined by dijit._Widget
Defined by dijit._Widget
stub function. Override to implement custom widget tear-down behavior.
Function_getSibling(which)
Defined by dijit._Contained
Defined by dijit._Container
Get the next or previous widget sibling of child
Defined by dijit._Widget
Defined by dijit._Widget

Jump to FunctionsPropertiesBack to top

Defined by dijit._Widget
A map of attributes and attachpoints -- typically standard HTML attributes -- to set on the widget's dom, at the "domNode" attach point, by default. Other node references can be specified as properties of 'this'
Defined by dijit._Widget
HTML class attribute
Defined by dijit._Widget
Unsupported by Dijit, but here for completeness. Dijit only supports setting text direction on the entire document. Bi-directional support, as defined by the [HTML DIR](http://www.w3.org/TR/html401/struct/dirlang.html#adef-dir) attribute. Either left-to-right "ltr" or right-to-left "rtl".
Defined by dijit._Widget
this is our visible representation of the widget! Other DOM Nodes may by assigned to other properties, usually through the template system's dojoAttachPonit syntax, but the domNode property is the canonical "top level" node in widget UI.
Defined by dijit._Widget
a unique, opaque ID string that can be assigned by users or by the system. If the developer passes an ID which is known not to be unique, the specified ID is ignored and the system-generated ID is used instead.
Defined by dijit._Widget
Rarely used. Overrides the default Dojo locale used to render this widget, as defined by the [HTML LANG](http://www.w3.org/TR/html401/struct/dirlang.html#adef-lang) attribute. Value must be among the list of locales specified during by the Dojo bootstrap, formatted according to [RFC 3066](http://www.ietf.org/rfc/rfc3066.txt) (like en-us).
Defined by dijit._Widget
pointer to original dom node
Defined by dijit._Widget
HTML style attribute
Defined by dijit._Widget
Defined by dijit._Widget