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
Class PagingToolbar

    java.lang.Object
      com.google.gwt.user.client.ui.UIObject
          com.google.gwt.user.client.ui.Widget
              com.gwtext.client.widgets.Component
                  com.gwtext.client.widgets.BoxComponent
                      com.gwtext.client.widgets.Toolbar
                          com.gwtext.client.widgets.PagingToolbar

All Implemented Interfaces:
  com.google.gwt.user.client.EventListener, Observable

    public class PagingToolbar

extends Toolbar

A specialized toolbar that is bound to a `Store` and provides automatic paging controls.

Field Summary

Fields inherited from class com.gwtext.client.widgets.Component
`config, id`

Constructor Summary
`PagingToolbar()` Create a new PagingToolbar.
`PagingToolbar(com.google.gwt.core.client.JavaScriptObject jsObj)`
`PagingToolbar(Store store)` Create a new PagingToolbar.

Method Summary
`void` | `bind(Store store)` Binds the paging toolbar to the specified Store.
`protected com.google.gwt.core.client.JavaScriptObject` | `create(com.google.gwt.core.client.JavaScriptObject config)`
`java.lang.String` | `getAfterPageText()` The after page paging text tooltip (defaults to "of %0")
`java.lang.String` | `getBeforePageText()` The before page paging text tooltip (defaults to "First Page")
`int` | `getCurrentPage()` Return the current page number.
`boolean` | `getDisplayInfo()` True to display the displayMsg.
`java.lang.String` | `getDisplayMsg()` The paging status message to display (defaults to "Displaying {start} - {end} of {total}").
`java.lang.String` | `getEmptyMsg()`
`ToolbarButton` | `getFirstButton()` Return the "First" ToolbarButton on the PagingTaoolbar.
`java.lang.String` | `getFirstText()` The first page paging text tooltip (defaults to "First Page")
`ToolbarButton` | `getLastButton()` Return the "Last" ToolbarButton on the PagingTaoolbar.
`java.lang.String` | `getLastText()` The last page paging text tooltip (defaults to "Last Page")
`ToolbarButton` | `getNextButton()` Return the "Next" ToolbarButton on the PagingTaoolbar.
`java.lang.String` | `getNextText()` The next page paging text tooltip (defaults to "Next Page")
`int` | `getPageSize()` The number of records to display per page (defaults to 20).
`ToolbarButton` | `getPreviousButton()` Return the "Previous" ToolbarButton on the PagingTaoolbar.
`java.lang.String` | `getPrevText()` The previous page paging text tooltip (defaults to "Previous Page")
`ToolbarButton` | `getRefreshButton()` Return the "Refresh" ToolbarButton on the PagingTaoolbar.
`java.lang.String` | `getRefreshText()` The refresh page paging text tooltip (defaults to "Refresh")
`Store` | `getStore()` Return the Store of the PagingToolbar.
`java.lang.String` | `getXType()` Gets the xtype for this component as registered with ComponentMgr.
`void` | `setAfterPageText(java.lang.String afterPageText)` The after page paging text tooltip (defaults to "of %0")
`void` | `setBeforePageText(java.lang.String beforePageText)` The before page paging text tooltip (defaults to "First Page")
`void` | `setDisplayInfo(boolean displayInfo)` True to display the displayMsg (defaults to false).
`void` | `setDisplayMsg(java.lang.String displayMsg)` The paging status message to display (defaults to "Displaying {start} - {end} of {total}").
`void` | `setEmptyMsg(java.lang.String emptyMsg)` The message to display when no records are found (defaults to "No data to display").
`void` | `setFirstText(java.lang.String firstText)` The first page paging text tooltip (defaults to "First Page")
`void` | `setLastText(java.lang.String lastText)` The last page paging text tooltip (defaults to "Last Page")
`void` | `setNextText(java.lang.String nextText)` The next page paging text tooltip (defaults to "Next Page")
`void` | `setPageSize(int pageSize)` The number of records to display per page (defaults to 20).
`void` | `setPagingParamNames(java.lang.String start, java.lang.String limit)` Parameter names during data load.
`void` | `setPrevText(java.lang.String prevText)` The previous page paging text tooltip (defaults to "Previous Page")
`void` | `setRefreshText(java.lang.String refreshText)` The refrest page paging text tooltip (defaults to "Refresh")
`void` | `setStore(Store store)` Set the Store for the PagingToolbar.
`void` | `unbind(Store store)` Unbinds the paging toolbar from the specified Store.

Methods inherited from class com.gwtext.client.widgets.Toolbar
`addButton, addButton, addElement, addField, addFill, addItem, addSeparator, addSpacer, addText, getConfigPrototype`

Methods inherited from class com.gwtext.client.widgets.BoxComponent
`addListener, doOnRender, doOnRender, getAutoHeight, getAutoWidth, getBox, getBox, getHeight, getPosition, getPosition, getSize, getWidth, setAutoHeight, setAutoWidth, setHeight, setHeight, setPagePosition, setPosition, setSize, setSize, setWidth, setWidth, syncSize, updateBox`

Methods inherited from class com.gwtext.client.widgets.Component
`addClass, addClassCreated, addEvent, addEvents, addListener, addListener, addListener, addPlugin, addStyleDependentName, addStyleName, afterRender, beforeDestroy, check, cloneComponent, cloneComponent, cloneConfig, destroy, disable, enable, equals, error, findParentBy, findParentByType, fireEvent, focus, focus, focus, getApplyTo, getAttribute, getAttributeAsBoolean, getAttributeAsFloat, getAttributeAsInt, getAttributeAsJavaScriptObject, getAutoShow, getCls, getComponentJS, getConfig, getCtCls, getDisabledClass, getEl, getElement, getElement, getElement, getHideMode, getHideParent, getId, getItemId, getJsObj, getOffsetHeight, getOffsetWidth, getOrCreateJsObj, getOwnerContainer, getRenderTo, getStateEvents, getStateId, getStyleElement, getTitle, getXTypes, hashCode, hide, initComponent, isCreated, isDisabled, isHidden, isRendered, isVisible, isXType, isXType, onDestroy, purgeListeners, removeClass, removeStyleDependentName, removeStyleName, render, render, render, render, render, render, resumeEvents, setApplyTo, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAutoEl, setAutoEl, setAutoShow, setCls, setCtCls, setDisabled, setDisabledClass, setEl, setEl, setHideMode, setHideParent, setId, setRenderTo, setRenderToID, setStateEvents, setStateId, setStyle, setStyle, setStyleName, setStylePrimaryName, setTitle, setVisible, show, suspendEvents`

Methods inherited from class com.google.gwt.user.client.ui.Widget
`doAttachChildren, doDetachChildren, getParent, isAttached, onAttach, onBrowserEvent, onDetach, onLoad, onUnload, removeFromParent, setElement`

Methods inherited from class com.google.gwt.user.client.ui.UIObject
`getAbsoluteLeft, getAbsoluteTop, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, isVisible, setPixelSize, setStyleName, setStyleName, setStylePrimaryName, setVisible, sinkEvents, toString, unsinkEvents`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Constructor Detail

### PagingToolbar

    public PagingToolbar()

  Create a new PagingToolbar.

### PagingToolbar

    public PagingToolbar(Store store)

  Create a new PagingToolbar.

  Parameters:
    `store` - the underlying Store

### PagingToolbar

    public PagingToolbar(com.google.gwt.core.client.JavaScriptObject jsObj)

Method Detail

### getXType

    public java.lang.String getXType()

  Description copied from class: `Component`
  Gets the xtype for this component as registered with ComponentMgr. For a list of all available xtypes, see the Component javadocs.

       TextField field = new TextField();
       field.getXType() returns "textfield"

  Overrides:
    `getXType` in class `Toolbar`
  Returns:
    the xtype

### create

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

  Overrides:
    `create` in class `Toolbar`

### bind

    public void bind(Store store)

  Binds the paging toolbar to the specified Store.

  Parameters:
    `store` - the Store to bind to

### unbind

    public void unbind(Store store)

  Unbinds the paging toolbar from the specified Store.

  Parameters:
    `store` - the store

### getFirstButton

    public ToolbarButton getFirstButton()
                                 throws java.lang.IllegalStateException

  Return the "First" ToolbarButton on the PagingTaoolbar. Note that this method must be called only after the PagingToolbar has been rendered. You can setup your logic in the `ComponentListener.onRender(Component)` event, or in `BoxComponent.doOnRender(com.gwtext.client.core.Function)` method.

  Returns:
    the ToolbarButton
  Throws:
    `java.lang.IllegalStateException` - when this method is called before the PagingToolbar has been rendered.

### getPreviousButton

    public ToolbarButton getPreviousButton()
                                    throws java.lang.IllegalStateException

  Return the "Previous" ToolbarButton on the PagingTaoolbar. Note that this method must be called only after the PagingToolbar has been rendered. You can setup your logic in the `ComponentListener.onRender(Component)` event, or in `BoxComponent.doOnRender(com.gwtext.client.core.Function)` method.

  Returns:
    the ToolbarButton
  Throws:
    `java.lang.IllegalStateException` - when this method is called before the PagingToolbar has been rendered.

### getNextButton

    public ToolbarButton getNextButton()
                                throws java.lang.IllegalStateException

  Return the "Next" ToolbarButton on the PagingTaoolbar. Note that this method must be called only after the PagingToolbar has been rendered. You can setup your logic in the `ComponentListener.onRender(Component)` event, or in `BoxComponent.doOnRender(com.gwtext.client.core.Function)` method.

  Returns:
    the ToolbarButton
  Throws:
    `java.lang.IllegalStateException` - when this method is called before the PagingToolbar has been rendered.

### getLastButton

    public ToolbarButton getLastButton()
                                throws java.lang.IllegalStateException

  Return the "Last" ToolbarButton on the PagingTaoolbar. Note that this method must be called only after the PagingToolbar has been rendered. You can setup your logic in the `ComponentListener.onRender(Component)` event, or in `BoxComponent.doOnRender(com.gwtext.client.core.Function)` method.

  Returns:
    the ToolbarButton
  Throws:
    `java.lang.IllegalStateException` - when this method is called before the PagingToolbar has been rendered.

### getRefreshButton

    public ToolbarButton getRefreshButton()
                                   throws java.lang.IllegalStateException

  Return the "Refresh" ToolbarButton on the PagingTaoolbar. Note that this method must be called only after the PagingToolbar has been rendered. You can setup your logic in the `ComponentListener.onRender(Component)` event, or in `BoxComponent.doOnRender(com.gwtext.client.core.Function)` method.

  Returns:
    the ToolbarButton
  Throws:
    `java.lang.IllegalStateException` - when this method is called before the PagingToolbar has been rendered.

### setDisplayMsg

    public void setDisplayMsg(java.lang.String displayMsg)

  The paging status message to display (defaults to "Displaying {start} - {end} of {total}").

  Parameters:
    `displayMsg` - the display message

### getDisplayMsg

    public java.lang.String getDisplayMsg()

  The paging status message to display (defaults to "Displaying {start} - {end} of {total}").

  Returns:
    the display message

### setEmptyMsg

    public void setEmptyMsg(java.lang.String emptyMsg)

  The message to display when no records are found (defaults to "No data to display").

  Parameters:
    `emptyMsg` - the empty message

### getEmptyMsg

    public java.lang.String getEmptyMsg()

  Returns:
    the message dispalyed when no records are found

### setPageSize

    public void setPageSize(int pageSize)

  The number of records to display per page (defaults to 20).

  Parameters:
    `pageSize` - the page size

### getPageSize

    public int getPageSize()

  The number of records to display per page (defaults to 20).

  Returns:
    the page size

### getCurrentPage

    public int getCurrentPage()

  Return the current page number.

  Returns:
    the current page. The first page starts at 1

### setDisplayInfo

    public void setDisplayInfo(boolean displayInfo)
                        throws java.lang.IllegalStateException

  True to display the displayMsg (defaults to false).

  Parameters:
    `displayInfo` - the display message
  Throws:
    `java.lang.IllegalStateException` - this property cannot be changed after the Component has been rendered

### getDisplayInfo

    public boolean getDisplayInfo()

  True to display the displayMsg.

  Returns:
    true to display the info

### setStore

    public void setStore(Store store)

  Set the Store for the PagingToolbar.

  Parameters:
    `store` - the store

### getStore

    public Store getStore()

  Return the Store of the PagingToolbar.

  Returns:
    the store

### setBeforePageText

    public void setBeforePageText(java.lang.String beforePageText)
                           throws java.lang.IllegalStateException

  The before page paging text tooltip (defaults to "First Page")

  Parameters:
    `beforePageText` - the before page tooltip
  Throws:
    `java.lang.IllegalStateException` - this property cannot be changed after the Component has been rendered

### getBeforePageText

    public java.lang.String getBeforePageText()

  The before page paging text tooltip (defaults to "First Page")

  Returns:
    the before text tooltip

### setAfterPageText

    public void setAfterPageText(java.lang.String afterPageText)
                          throws java.lang.IllegalStateException

  The after page paging text tooltip (defaults to "of %0")

  Parameters:
    `afterPageText` - the before page tooltip
  Throws:
    `java.lang.IllegalStateException` - this property cannot be changed after the Component has been rendered

### getAfterPageText

    public java.lang.String getAfterPageText()

  The after page paging text tooltip (defaults to "of %0")

  Returns:
    the after page tooltip

### setFirstText

    public void setFirstText(java.lang.String firstText)
                      throws java.lang.IllegalStateException

  The first page paging text tooltip (defaults to "First Page")

  Parameters:
    `firstText` - the first page tooltip
  Throws:
    `java.lang.IllegalStateException` - this property cannot be changed after the Component has been rendered

### getFirstText

    public java.lang.String getFirstText()

  The first page paging text tooltip (defaults to "First Page")

  Returns:
    the after page tooltip

### setPrevText

    public void setPrevText(java.lang.String prevText)
                     throws java.lang.IllegalStateException

  The previous page paging text tooltip (defaults to "Previous Page")

  Parameters:
    `prevText` - the first page tooltip
  Throws:
    `java.lang.IllegalStateException` - this property cannot be changed after the Component has been rendered

### getPrevText

    public java.lang.String getPrevText()

  The previous page paging text tooltip (defaults to "Previous Page")

  Returns:
    the previous page tooltip

### setNextText

    public void setNextText(java.lang.String nextText)
                     throws java.lang.IllegalStateException

  The next page paging text tooltip (defaults to "Next Page")

  Parameters:
    `nextText` - the first page tooltip
  Throws:
    `java.lang.IllegalStateException` - this property cannot be changed after the Component has been rendered

### getNextText

    public java.lang.String getNextText()

  The next page paging text tooltip (defaults to "Next Page")

  Returns:
    the next page tooltip

### setLastText

    public void setLastText(java.lang.String lastText)
                     throws java.lang.IllegalStateException

  The last page paging text tooltip (defaults to "Last Page")

  Parameters:
    `lastText` - the first page tooltip
  Throws:
    `java.lang.IllegalStateException` - this property cannot be changed after the Component has been rendered

### getLastText

    public java.lang.String getLastText()

  The last page paging text tooltip (defaults to "Last Page")

  Returns:
    the after page tooltip

### setRefreshText

    public void setRefreshText(java.lang.String refreshText)
                        throws java.lang.IllegalStateException

  The refrest page paging text tooltip (defaults to "Refresh")

  Parameters:
    `refreshText` - the first page tooltip
  Throws:
    `java.lang.IllegalStateException` - this property cannot be changed after the Component has been rendered

### getRefreshText

    public java.lang.String getRefreshText()

  The refresh page paging text tooltip (defaults to "Refresh")

  Returns:
    the after page tooltip

### setPagingParamNames

    public void setPagingParamNames(java.lang.String start,
                                    java.lang.String limit)

  Parameter names during data load.

  Parameters:
    `start` - defaults to "start"
    `limit` - defaults to "limit"

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