Roo.util.Observable Roo.LayoutManager Roo.BorderLayout
Package: | Roo |
Defined In: | Roo/BorderLayout.js. |
Class: | BorderLayout |
Subclasses: | Roo.ReaderLayout |
Extends: | Roo.LayoutManager |
var layout = new Roo.BorderLayout(document.body, {
north: {
initialSize: 25,
titlebar: false
},
west: {
split:true,
initialSize: 200,
minSize: 175,
maxSize: 400,
titlebar: true,
collapsible: true
},
east: {
split:true,
initialSize: 202,
minSize: 175,
maxSize: 400,
titlebar: true,
collapsible: true
},
south: {
split:true,
initialSize: 100,
minSize: 100,
maxSize: 200,
titlebar: true,
collapsible: true
},
center: {
titlebar: true,
autoScroll:true,
resizeTabs: true,
minTabWidth: 50,
preferredTabWidth: 150
}
});
// shorthand
var CP = Roo.ContentPanel;
layout.beginUpdate();
layout.add("north", new CP("north", "North"));
layout.add("south", new CP("south", {title: "South", closable: true}));
layout.add("west", new CP("west", {title: "West"}));
layout.add("east", new CP("autoTabs", {title: "Auto Tabs", closable: true}));
layout.add("center", new CP("center1", {title: "Close Me", closable: true}));
layout.add("center", new CP("center2", {title: "Center Panel", closable: false}));
layout.getRegion("center").showPanel("center1");
layout.endUpdate();
Options | Defined By | |
---|---|---|
listeners : Object
list of events and functions to call for this object,
For example :
list of events and functions to call for this object,
For example :
|
Roo.util.Observable |
Method | Defined By | |
---|---|---|
Roo.BorderLayout.create
(config, targetEl)
Shortcut for creating a new BorderLayout object and adding one or more ContentPanels to it in a single step, handling
the beginUpdate and endUpdate calls internally.
Shortcut for creating a new BorderLayout object and adding one or more ContentPanels to it in a single step, handling
the beginUpdate and endUpdate calls internally. The key to this method is the panels property that can be provided with each region config, which allows you to add ContentPanel configs in addition to the region configs during creation. The following code is equivalent to the constructor-based example at the beginning of this class:
|
Roo.BorderLayout | |
Adds a ContentPanel (or subclass) to this layout.
Adds a ContentPanel (or subclass) to this layout.
|
Roo.BorderLayout | |
addEvents
(Object object)
Used to define events on this Observable
Used to define events on this Observable
|
Roo.util.Observable | |
Appends an event handler to this component
Appends an event handler to this component
|
Roo.util.Observable | |
Roo.BorderLayout | ||
addxtype
(Object cfg)
Adds a xtype elements to the layout.
Adds a xtype elements to the layout.
|
Roo.BorderLayout | |
batchAdd
(Object regions)
Adds a batch of multiple ContentPanels dynamically by passing a special regions config object.
Adds a batch of multiple ContentPanels dynamically by passing a special regions config object. This config
object should contain properties for each region to add ContentPanels to, and each property's value should be a valid ContentPanel config object. Example:
|
Roo.BorderLayout | |
beginUpdate
()
Suspend the LayoutManager from doing auto-layouts while
making multiple add or remove calls
Suspend the LayoutManager from doing auto-layouts while
making multiple add or remove calls |
Roo.LayoutManager | |
endUpdate
(Boolean noLayout)
Restore auto-layouts and optionally disable the manager from performing a layout
Restore auto-layouts and optionally disable the manager from performing a layout
|
Roo.LayoutManager | |
findPanel
(String panelId)
:
Roo.ContentPanel
Searches all regions for a panel with the specified id
Searches all regions for a panel with the specified id
|
Roo.BorderLayout | |
Fires the specified event with the passed parameters (minus the event name).
|
Roo.util.Observable | |
getEl
()
:
Roo.Element
Returns the Element this layout is bound to.
Returns the Element this layout is bound to.
|
Roo.LayoutManager | |
getRegion
(String target)
:
Roo.LayoutRegion
Returns the specified region.
Returns the specified region.
|
Roo.LayoutManager | |
getViewSize
()
:
Object
Returns the size of the current view.
Returns the size of the current view. This method normalizes document.body and element embedded layouts and
performs box-model adjustments.
|
Roo.LayoutManager | |
Roo.util.Observable | ||
isUpdating
()
:
Boolean
Returns true if this layout is currently being updated
Returns true if this layout is currently being updated
|
Roo.LayoutManager | |
layout
()
Performs a layout update.
Performs a layout update.
|
Roo.BorderLayout | |
Appends an event handler to this element (shorthand for addListener)
Appends an event handler to this element (shorthand for addListener)
|
Roo.util.Observable | |
purgeListeners
()
Removes all listeners for this object
Removes all listeners for this object
|
Roo.util.Observable | |
Remove a ContentPanel (or subclass) to this layout.
Remove a ContentPanel (or subclass) to this layout.
|
Roo.BorderLayout | |
Roo.util.Observable | ||
restoreState
(Roo.state.Provider provider)
Restores this layout's state using Roo.state.Manager or the state provided by the passed provider.
Restores this layout's state using Roo.state.Manager or the state provided by the passed provider.
|
Roo.BorderLayout | |
showPanel
(String/ContentPanel panelId)
:
Roo.ContentPanel
Searches all regions for a panel with the specified id and activates (shows) it.
Searches all regions for a panel with the specified id and activates (shows) it.
|
Roo.BorderLayout | |
Roo.util.Observable |
Event | Defined By | |
---|---|---|
layout (Roo.LayoutManager this)
Fires when a layout is performed.
Fires when a layout is performed.
|
Roo.LayoutManager | |
regioncollapsed (Roo.LayoutRegion region)
Fires when a region is collapsed.
Fires when a region is collapsed.
|
Roo.LayoutManager | |
regionexpanded (Roo.LayoutRegion region)
Fires when a region is expanded.
Fires when a region is expanded.
|
Roo.LayoutManager | |
regionresized (Roo.LayoutRegion region, Number newSize)
Fires when the user resizes a region.
Fires when the user resizes a region.
|
Roo.LayoutManager |