Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.gwtext.client.widgets.layout
Class CardLayout

    java.lang.Object
      com.gwtext.client.widgets.layout.ContainerLayout
          com.gwtext.client.widgets.layout.FitLayout
              com.gwtext.client.widgets.layout.CardLayout

    public class CardLayout

extends FitLayout

This layout contains multiple panels, each fit to the container, where only a single panel can be visible at any given time. This layout style is most commonly used for wizards, tab implementations, etc.

The CardLayout's focal method is setActiveItem. Since only one panel is displayed at a time, the only way to move from one panel to the next is by calling setActiveItem, passing the id or index of the next panel to display. The layout itself does not provide a mechanism for handling this navigation, so that functionality must be provided by the developer.

Field Summary

Fields inherited from class com.gwtext.client.widgets.layout.ContainerLayout
`configJS`

Constructor Summary
`CardLayout()` Contruct a new CardLayout
`CardLayout(boolean deferredRender)` Construct a new CardLayout.

Method Summary
`protected com.google.gwt.core.client.JavaScriptObject` | `create(com.google.gwt.core.client.JavaScriptObject config)`
`void` | `setActiveItem(int index)` Sets the active (visible) item in the layout.
`void` | `setActiveItem(java.lang.String itemID)` Sets the active (visible) item in the layout.
`void` | `setDeferredRender(boolean deferredRender)` True to render each contained item at the time it becomes active, false to render all contained items as soon as the layout is rendered (defaults to false).

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

### CardLayout

    public CardLayout()

  Contruct a new CardLayout

### CardLayout

    public CardLayout(boolean deferredRender)

  Construct a new CardLayout.

  Parameters:
    `deferredRender` - true to render each contained item at the time it becomes active, false to render all contained items as soon as the layout is rendered (defaults to false).

Method Detail

### setDeferredRender

    public void setDeferredRender(boolean deferredRender)

  True to render each contained item at the time it becomes active, false to render all contained items as soon as the layout is rendered (defaults to false). If there is a significant amount of content or a lot of heavy controls being rendered into panels that are not displayed by default, setting this to true might improve performance.

  Parameters:
    `deferredRender` - true to render each contained item at the time it becomes active

### create

    protected com.google.gwt.core.client.JavaScriptObject create(com.google.gwt.core.client.JavaScriptObject config)

  Overrides:
    `create` in class `FitLayout`

### setActiveItem

    public void setActiveItem(int index)

  Sets the active (visible) item in the layout.

  Parameters:
    `index` - the item index

### setActiveItem

    public void setActiveItem(java.lang.String itemID)

  Sets the active (visible) item in the layout.

  Parameters:
    `itemID` - the item ID

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD