Print Friendly

Class Ext.SplitLayoutRegion

Package:Ext
Class:SplitLayoutRegion
Extends:LayoutRegion
Defined In:SplitLayoutRegion.js
Adds a splitbar and other (private) useful functionality to a LayoutRegion

Properties   -  Methods   -  Events   -  Config Options

Public Properties

Property Defined By
  bodyEl : Ext.Element LayoutRegion
This regions body element
  collapsedEl : Ext.Element LayoutRegion
This regions collapsed element
  el : Ext.Element LayoutRegion
This regions container element
  split : Ext.SplitBar SplitLayoutRegion
The SplitBar for this region
  titleEl : Ext.Element LayoutRegion
This regions title element
  titleTextEl : HTMLElement LayoutRegion
This regions title text element

Public Methods

Method Defined By
  add(ContentPanel... panel) : Ext.ContentPanel LayoutRegion
Add the passed ContentPanel(s)
  addListener(String eventName, Function handler, [Object options]) : void Observable
Appends an event handler to this component
  collapse([Boolean skipAnim]) : void LayoutRegion
Collapses this region.
  expand(Ext.EventObject e, [Boolean skipAnim]) : void LayoutRegion
Expand this region if it was previously collapsed.
  fireEvent(String eventName, Object... args) : Boolean Observable
Fires the specified event with the passed parameters (minus the event name).
  getActivePanel() : Ext.ContentPanel LayoutRegion
Get the active panel for this region.
  getEl() : Ext.Element LayoutRegion
Returns the container element for this region.
  getSplitBar() : Ext.SplitBar SplitLayoutRegion
Returns the SplitBar for this region.
  getTabs() : Ext.TabPanel LayoutRegion
Returns the TabPanel component used by this region
  hide() : void LayoutRegion
Hides this region.
  hidePanel(Number/String/ContentPanel panel) : void LayoutRegion
Hides the tab for the specified panel.
  isVisible() : Boolean LayoutRegion
Returns true if this region is currently visible.
  on(String eventName, Function handler, [Object options]) : void Observable
Appends an event handler to this element (shorthand for addListener)
  purgeListeners() : void Observable
Removes all listeners for this object
  remove(Number/String/ContentPanel panel, Boolean preservePanel) : Ext.ContentPanel LayoutRegion
Removes the specified panel. If preservePanel is not true (either here or in the config), the panel is destroyed.
  removeListener(String eventName, Function handler, [Object scope]) : void Observable
Removes a listener
  setCollapsedTitle() : void LayoutRegion
Updates the collapsed text for north/south regions (used with collapsedTitle config option)
  show() : void LayoutRegion
Shows this region if it was previously hidden.
  showPanel(Number/String/ContentPanel panelId) : Ext.ContentPanel LayoutRegion
Show the specified panel.
  un(String eventName, Function handler, [Object scope]) : void Observable
Removes a listener (shorthand for removeListener)
  unhidePanel(Number/String/ContentPanel panel) : void LayoutRegion
Unhides the tab for a previously hidden panel.

Public Events

This class has no public events.

Config Options

Config Options Defined By
  alwaysShowTabs : Boolean LayoutRegion
True to always display tabs even when only 1 panel (defaults to false)
  animate : Boolean LayoutRegion
True to animate expand/collapse (defaults to false)
  autoHide : Boolean LayoutRegion
False to disable disable autoHide when the mouse leaves the "floated" region (defaults to true)
  autoScroll : Boolean LayoutRegion
True to enable overflow scrolling (defaults to false)
  closeOnTab : Boolean LayoutRegion
True to place the close icon on the tabs instead of the region titlebar (defaults to false)
  cmargins : Object LayoutRegion
Margins for the element when collapsed (defaults to: north/south {top: 2, left: 0, right:0, bottom: 2} or east/west {...
  collapsedTitle : String LayoutRegion
Optional string message to display in the collapsed block of a north or south region
  collapsible : Boolean LayoutRegion
False to disable collapsing (defaults to true)
  duration : Float LayoutRegion
The duration of the expand/collapse animation in seconds
  floatable : Boolean LayoutRegion
False to disable floating (defaults to true)
  hideTabs : Boolean LayoutRegion
True to hide the tab strip (defaults to false)
  margins : Object LayoutRegion
Margins for the element (defaults to {top: 0, left: 0, right:0, bottom: 0})
  minTabWidth : Number LayoutRegion
The minimum tab width (defaults to 40)
  preferredTabWidth : Number LayoutRegion
The preferred tab width (defaults to 150)
  preservePanels : Boolean LayoutRegion
True to preserve removed panels so they can be readded later (defaults to false)
  resizeTabs : Boolean LayoutRegion
True to enable automatic tab resizing. This will resize the tabs so they are all the same size and fit within the spa...
  slideDuration : Float LayoutRegion
The duration of the slide out/in when collapsed in seconds
  tabPosition : String LayoutRegion
'top' or 'bottom' (defaults to 'bottom')
  title : String LayoutRegion
The title for the region (overrides panel titles)
  titlebar : Boolean LayoutRegion
True to display a title bar (defaults to true)

Property Details

bodyEl

public Ext.Element bodyEl
This regions body element
This property is defined by LayoutRegion.

collapsedEl

public Ext.Element collapsedEl
This regions collapsed element
This property is defined by LayoutRegion.

el

public Ext.Element el
This regions container element
This property is defined by LayoutRegion.

split

public Ext.SplitBar split
The SplitBar for this region
This property is defined by SplitLayoutRegion.

titleEl

public Ext.Element titleEl
This regions title element
This property is defined by LayoutRegion.

titleTextEl

public HTMLElement titleTextEl
This regions title text element
This property is defined by LayoutRegion.

Method Details

add

public function add(ContentPanel... panel)
Add the passed ContentPanel(s)
Parameters:
  • panel : ContentPanel...
    The ContentPanel(s) to add (you can pass more than one)
Returns:
  • Ext.ContentPanel
    The panel added (if only one was added)
This method is defined by LayoutRegion.

addListener

public function addListener(String eventName, Function handler, [Object options])
Appends an event handler to this component
Parameters:
  • eventName : String
    The type of event to listen for
  • handler : Function
    The method the event invokes
  • options : Object
    (optional)
Returns:
  • void
This method is defined by Observable.

collapse

public function collapse([Boolean skipAnim])
Collapses this region.
Parameters:
  • skipAnim : Boolean
    (optional) true to collapse the element without animation (if animate is true)
Returns:
  • void
This method is defined by LayoutRegion.

expand

public function expand(Ext.EventObject e, [Boolean skipAnim])
Expand this region if it was previously collapsed.
Parameters:
  • e : Ext.EventObject
    The event that triggered the expand (or null if calling manually)
  • skipAnim : Boolean
    (optional) true to expand the element without animation (if animate is true)
Returns:
  • void
This method is defined by LayoutRegion.

fireEvent

public function fireEvent(String eventName, Object... args)
Fires the specified event with the passed parameters (minus the event name).
Parameters:
  • eventName : String
  • args : Object...
    Variable number of parameters are passed to handlers
Returns:
  • Boolean
    returns false if any of the handlers return false otherwise it returns true
This method is defined by Observable.

getActivePanel

public function getActivePanel()
Get the active panel for this region.
Parameters:
  • None.
Returns:
  • Ext.ContentPanel
    The active panel or null
This method is defined by LayoutRegion.

getEl

public function getEl()
Returns the container element for this region.
Parameters:
  • None.
Returns:
  • Ext.Element
This method is defined by LayoutRegion.

getSplitBar

public function getSplitBar()
Returns the SplitBar for this region.
Parameters:
  • None.
Returns:
  • Ext.SplitBar
This method is defined by SplitLayoutRegion.

getTabs

public function getTabs()
Returns the TabPanel component used by this region
Parameters:
  • None.
Returns:
  • Ext.TabPanel
This method is defined by LayoutRegion.

hide

public function hide()
Hides this region.
Parameters:
  • None.
Returns:
  • void
This method is defined by LayoutRegion.

hidePanel

public function hidePanel(Number/String/ContentPanel panel)
Hides the tab for the specified panel.
Parameters:
  • panel : Number/String/ContentPanel
    The panels index, id or the panel itself
Returns:
  • void
This method is defined by LayoutRegion.

isVisible

public function isVisible()
Returns true if this region is currently visible.
Parameters:
  • None.
Returns:
  • Boolean
This method is defined by LayoutRegion.

on

public function on(String eventName, Function handler, [Object options])
Appends an event handler to this element (shorthand for addListener)
Parameters:
  • eventName : String
    The type of event to listen for
  • handler : Function
    The method the event invokes
  • options : Object
    (optional)
Returns:
  • void
This method is defined by Observable.

purgeListeners

public function purgeListeners()
Removes all listeners for this object
Parameters:
  • None.
Returns:
  • void
This method is defined by Observable.

remove

public function remove(Number/String/ContentPanel panel, Boolean preservePanel)
Removes the specified panel. If preservePanel is not true (either here or in the config), the panel is destroyed.
Parameters:
  • panel : Number/String/ContentPanel
    The panels index, id or the panel itself
  • preservePanel : Boolean
    Overrides the config preservePanel option
Returns:
  • Ext.ContentPanel
    The panel that was removed
This method is defined by LayoutRegion.

removeListener

public function removeListener(String eventName, Function handler, [Object scope])
Removes a listener
Parameters:
  • eventName : String
    The type of event to listen for
  • handler : Function
    The handler to remove
  • scope : Object
    (optional) The scope (this object) for the handler
Returns:
  • void
This method is defined by Observable.

setCollapsedTitle

public function setCollapsedTitle()
Updates the collapsed text for north/south regions (used with collapsedTitle config option)
Parameters:
  • None.
Returns:
  • void
This method is defined by LayoutRegion.

show

public function show()
Shows this region if it was previously hidden.
Parameters:
  • None.
Returns:
  • void
This method is defined by LayoutRegion.

showPanel

public function showPanel(Number/String/ContentPanel panelId)
Show the specified panel.
Parameters:
  • panelId : Number/String/ContentPanel
    The panels index, id or the panel itself
Returns:
  • Ext.ContentPanel
    The shown panel or null
This method is defined by LayoutRegion.

un

public function un(String eventName, Function handler, [Object scope])
Removes a listener (shorthand for removeListener)
Parameters:
  • eventName : String
    The type of event to listen for
  • handler : Function
    The handler to remove
  • scope : Object
    (optional) The scope (this object) for the handler
Returns:
  • void
This method is defined by Observable.

unhidePanel

public function unhidePanel(Number/String/ContentPanel panel)
Unhides the tab for a previously hidden panel.
Parameters:
  • panel : Number/String/ContentPanel
    The panels index, id or the panel itself
Returns:
  • void
This method is defined by LayoutRegion.

Config Details

alwaysShowTabs

alwaysShowTabs : Boolean
True to always display tabs even when only 1 panel (defaults to false)
This config option is defined by LayoutRegion.

animate

animate : Boolean
True to animate expand/collapse (defaults to false)
This config option is defined by LayoutRegion.

autoHide

autoHide : Boolean
False to disable disable autoHide when the mouse leaves the "floated" region (defaults to true)
This config option is defined by LayoutRegion.

autoScroll

autoScroll : Boolean
True to enable overflow scrolling (defaults to false)
This config option is defined by LayoutRegion.

closeOnTab

closeOnTab : Boolean
True to place the close icon on the tabs instead of the region titlebar (defaults to false)
This config option is defined by LayoutRegion.

cmargins

cmargins : Object
Margins for the element when collapsed (defaults to: north/south {top: 2, left: 0, right:0, bottom: 2} or east/west {top: 0, left: 2, right:2, bottom: 0})
This config option is defined by LayoutRegion.

collapsedTitle

collapsedTitle : String
Optional string message to display in the collapsed block of a north or south region
This config option is defined by LayoutRegion.

collapsible

collapsible : Boolean
False to disable collapsing (defaults to true)
This config option is defined by LayoutRegion.

duration

duration : Float
The duration of the expand/collapse animation in seconds
This config option is defined by LayoutRegion.

floatable

floatable : Boolean
False to disable floating (defaults to true)
This config option is defined by LayoutRegion.

hideTabs

hideTabs : Boolean
True to hide the tab strip (defaults to false)
This config option is defined by LayoutRegion.

margins

margins : Object
Margins for the element (defaults to {top: 0, left: 0, right:0, bottom: 0})
This config option is defined by LayoutRegion.

minTabWidth

minTabWidth : Number
The minimum tab width (defaults to 40)
This config option is defined by LayoutRegion.

preferredTabWidth

preferredTabWidth : Number
The preferred tab width (defaults to 150)
This config option is defined by LayoutRegion.

preservePanels

preservePanels : Boolean
True to preserve removed panels so they can be readded later (defaults to false)
This config option is defined by LayoutRegion.

resizeTabs

resizeTabs : Boolean
True to enable automatic tab resizing. This will resize the tabs so they are all the same size and fit within the space available, similar to FireFox 1.5 tabs (defaults to false)
This config option is defined by LayoutRegion.

slideDuration

slideDuration : Float
The duration of the slide out/in when collapsed in seconds
This config option is defined by LayoutRegion.

tabPosition

tabPosition : String
'top' or 'bottom' (defaults to 'bottom')
This config option is defined by LayoutRegion.

title

title : String
The title for the region (overrides panel titles)
This config option is defined by LayoutRegion.

titlebar

titlebar : Boolean
True to display a title bar (defaults to true)
This config option is defined by LayoutRegion.

yui-ext - Copyright © 2006 Jack Slocum. | Yahoo! UI - Copyright © 2006 Yahoo! Inc.
All rights reserved.