com.gwtext.client.widgets.layout
Class AccordionLayout

java.lang.Object
  extended by com.gwtext.client.widgets.layout.ContainerLayout
      extended by com.gwtext.client.widgets.layout.FitLayout
          extended by com.gwtext.client.widgets.layout.AccordionLayout

public class AccordionLayout
extends FitLayout

This is a layout that contains multiple panels in an expandable accordion style such that only one panel can be open at any given time. Each panel has built-in support for expanding and collapsing.
Note that child Panels added to a Panel with an AccordionLayout must have a title.


Field Summary
 
Fields inherited from class com.gwtext.client.widgets.layout.ContainerLayout
configJS
 
Constructor Summary
AccordionLayout()
          Create a new Accordion.
AccordionLayout(boolean animate)
          Create a new Accordion.
 
Method Summary
protected  com.google.gwt.core.client.JavaScriptObject create(com.google.gwt.core.client.JavaScriptObject config)
           
 void setActiveOnTop(boolean activeOnTop)
          True to swap the position of each panel as it is expanded so that it becomes the first item in the container, false to keep the panels in the rendered order.
 void setAnimate(boolean animate)
          True to slide the contained panels open and closed during expand/collapse using animation, false to open and close directly with no animation (defaults to false).
 void setAutoWidth(boolean autoWidth)
          True to set each contained item's width to 'auto', false to use the item's current width (defaults to true).
 void setCollapseFirst(boolean collapseFirst)
          True to make sure the collapse/expand toggle button always renders first (to the left of) any other tools in the contained panels' title bars, false to render it last (defaults to false).
 void setFill(boolean fill)
          True to adjust the active item's height to fill the available space in the container, false to use the item's current height, or auto height if not explicitly set (defaults to true).
 void setHideCollapseTool(boolean hideCollapseTool)
          True to hide the contained panels' collapse/expand toggle buttons, false to display them (defaults to false).
 void setSequence(boolean sequence)
          If animate is set to true, this will result in each animation running in sequence.
 void setTitleCollapse(boolean titleCollapse)
          True to allow expand/collapse of each contained panel by clicking anywhere on the title bar, false to allow expand/collapse only when the toggle tool button is clicked (defaults to true).
 
Methods inherited from class com.gwtext.client.widgets.layout.ContainerLayout
getActiveItem, getContainerAttributes, getJsObj, getSpacing, setExtraCls, setRenderHidden, setSpacing
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AccordionLayout

public AccordionLayout()
Create a new Accordion.


AccordionLayout

public AccordionLayout(boolean animate)
Create a new Accordion.

Parameters:
animate - true to animate
Method Detail

setActiveOnTop

public void setActiveOnTop(boolean activeOnTop)
True to swap the position of each panel as it is expanded so that it becomes the first item in the container, false to keep the panels in the rendered order. This is NOT compatible with "animate:true" (defaults to false).

Parameters:
activeOnTop - true to swap the position of each panel as it is expanded

setAnimate

public void setAnimate(boolean animate)
True to slide the contained panels open and closed during expand/collapse using animation, false to open and close directly with no animation (defaults to false). Note: to defer to the specific config setting of each contained panel for this property, set this to undefined at the layout level.

Parameters:
animate - true to animate

setAutoWidth

public void setAutoWidth(boolean autoWidth)
True to set each contained item's width to 'auto', false to use the item's current width (defaults to true).

Parameters:
autoWidth - true to set each contained item's width to 'auto'

setCollapseFirst

public void setCollapseFirst(boolean collapseFirst)
True to make sure the collapse/expand toggle button always renders first (to the left of) any other tools in the contained panels' title bars, false to render it last (defaults to false).

Parameters:
collapseFirst - true to make sure the collapse/expand toggle button always renders first

setFill

public void setFill(boolean fill)
True to adjust the active item's height to fill the available space in the container, false to use the item's current height, or auto height if not explicitly set (defaults to true).

Parameters:
fill - true to adjust the active item's height to fill the available space in the container

setHideCollapseTool

public void setHideCollapseTool(boolean hideCollapseTool)
True to hide the contained panels' collapse/expand toggle buttons, false to display them (defaults to false). When set to true, setTitleCollapse(boolean) should be true also.

Parameters:
hideCollapseTool - true to hide the contained panels' collapse/expand toggle buttons

setSequence

public void setSequence(boolean sequence)
If animate is set to true, this will result in each animation running in sequence.

Parameters:
sequence - if animate is set to true, this will result in each animation running in sequence.

setTitleCollapse

public void setTitleCollapse(boolean titleCollapse)
True to allow expand/collapse of each contained panel by clicking anywhere on the title bar, false to allow expand/collapse only when the toggle tool button is clicked (defaults to true). When set to false, setHideCollapseTool(boolean) should be false also.

Parameters:
titleCollapse - true to allow expand/collapse of each contained panel by clicking anywhere on the title bar

create

protected com.google.gwt.core.client.JavaScriptObject create(com.google.gwt.core.client.JavaScriptObject config)
Overrides:
create in class FitLayout