|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.Widget
com.extjs.gxt.ui.client.widget.Component
com.extjs.gxt.ui.client.widget.BoxComponent
com.extjs.gxt.ui.client.widget.Container<Component>
com.extjs.gxt.ui.client.widget.toolbar.ToolBar
com.extjs.gxt.ui.client.widget.toolbar.PagingToolBar
public class PagingToolBar
A specialized toolbar that is bound to a ListLoader
and provides
automatic paging controls.
Nested Class Summary | |
---|---|
static class |
PagingToolBar.PagingToolBarImages
PagingToolBar images. |
static class |
PagingToolBar.PagingToolBarMessages
PagingToolBar messages. |
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject |
---|
com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled |
Field Summary | |
---|---|
protected int |
activePage
|
protected LabelToolItem |
afterText
|
protected LabelToolItem |
beforePage
|
protected PagingLoadConfig |
config
|
protected LabelToolItem |
displayText
|
protected Button |
first
|
protected PagingToolBar.PagingToolBarImages |
images
|
protected Button |
last
|
protected Listener<ComponentEvent> |
listener
|
protected PagingLoader<?> |
loader
|
protected LoadListener |
loadListener
|
protected PagingToolBar.PagingToolBarMessages |
msgs
|
protected Button |
next
|
protected int |
pages
|
protected int |
pageSize
|
protected com.google.gwt.user.client.ui.TextBox |
pageText
|
protected Button |
prev
|
protected Button |
refresh
|
protected boolean |
showToolTips
|
protected int |
start
|
protected int |
totalLength
|
Fields inherited from class com.extjs.gxt.ui.client.widget.Container |
---|
attachChildren, enableLayout, layoutExecuted, layoutNeeded, layoutOnAttach, layoutOnChange |
Fields inherited from class com.extjs.gxt.ui.client.widget.BoxComponent |
---|
adjustSize, cacheSizes, ensureVisibilityOnSizing, height, lastSize, layer, shim, width |
Fields inherited from class com.extjs.gxt.ui.client.widget.Component |
---|
afterRender, attachables, baseStyle, disabled, disabledStyle, disableTextSelection, dummy, focusable, hidden, mask, maskMessage, maskMessageStyleName, monitorWindowResize, rendered, resizeHandler, setElementRender, stateId, swallowEvents, toolTip, windowResizeDelay, windowResizeTask |
Fields inherited from class com.google.gwt.user.client.ui.UIObject |
---|
DEBUG_ID_PREFIX |
Constructor Summary | |
---|---|
PagingToolBar(int pageSize)
Creates a new paging tool bar with the given page size. |
Method Summary | |
---|---|
void |
bind(PagingLoader<?> loader)
Binds the toolbar to the loader. |
void |
clear()
Clears the current toolbar text. |
protected void |
doLoadRequest(int offset,
int limit)
|
void |
first()
Moves to the first page. |
int |
getActivePage()
Returns the active page. |
PagingToolBar.PagingToolBarImages |
getImages()
|
PagingToolBar.PagingToolBarMessages |
getMessages()
Returns the tool bar's messages. |
int |
getPageSize()
Returns the current page size. |
int |
getTotalPages()
Returns the total number of pages. |
boolean |
isReuseConfig()
Returns true if the previous load config is reused. |
boolean |
isShowToolTips()
Returns true if tooltip are enabled. |
void |
last()
Moves to the last page. |
void |
next()
Moves to the last page. |
protected void |
onLoad(LoadEvent event)
|
protected void |
onPageChange()
|
protected void |
onRender(com.google.gwt.user.client.Element target,
int index)
Subclasses must override and ensure setElement is called for lazy rendered components. |
void |
previous()
Moves the the previous page. |
void |
refresh()
Refreshes the data using the current configuration. |
void |
setActivePage(int page)
Sets the active page (1 to page count inclusive). |
void |
setImages(PagingToolBar.PagingToolBarImages images)
|
void |
setMessages(PagingToolBar.PagingToolBarMessages messages)
Sets the tool bar's messages. |
void |
setPageSize(int pageSize)
Sets the current page size. |
void |
setReuseConfig(boolean reuseConfig)
True to reuse the previous load config (defaults to true). |
void |
setShowToolTips(boolean showToolTips)
Sets if the button tool tips should be displayed (defaults to true, pre-render). |
Methods inherited from class com.extjs.gxt.ui.client.widget.toolbar.ToolBar |
---|
add, createComponentEvent, createContainerEvent, getAlignment, getLayout, getMinButtonWidth, getSpacing, insert, isEnableOverflow, layout, onComponentEvent, onFocus, remove, setAlignment, setEnableOverflow, setMinButtonWidth, setSpacing |
Methods inherited from class com.extjs.gxt.ui.client.widget.Container |
---|
adjustIndex, adopt, disable, doAttachChildren, doDetachChildren, doLayout, doLayout, enable, findItem, getItem, getItemByItemId, getItemCount, getItems, getLayoutTarget, getWidget, indexOf, isLayoutNeeded, iterator, layout, notifyHide, notifyShow, onAfterLayout, onAttach, onBeforeLayoutExcecuted, onInsert, onLayoutExcecuted, onRemove, orphan, remove, removeAll, removeAll, scrollIntoView, setLayout, setLayoutNeeded, setLayoutOnChange, wrapWidget |
Methods inherited from class com.extjs.gxt.ui.client.widget.BoxComponent |
---|
adjustPosition, adjustSize, afterRender, getBounds, getHeight, getHeight, getPosition, getPositionEl, getResizeEl, getShadow, getShadowOffset, getShadowPosition, getSize, getWidth, getWidth, hideShadow, hideShim, hideUnders, isAutoHeight, isAutoWidth, isDeferHeight, isShim, onHide, onPosition, onResize, onShow, onUnload, setAutoHeight, setAutoWidth, setBounds, setBounds, setDeferHeight, setHeight, setHeight, setPagePosition, setPagePosition, setPixelSize, setPosition, setShadow, setShadowOffset, setShadowPosition, setShim, setSize, setSize, setWidth, setWidth, sync, syncSize |
Methods inherited from class com.google.gwt.user.client.ui.Widget |
---|
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, setLayoutData |
Methods inherited from class com.google.gwt.user.client.ui.UIObject |
---|
addStyleDependentName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, isVisible, removeStyleDependentName, setElement, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setVisible, sinkBitlessEvent, unsinkEvents |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected int activePage
protected int pages
protected LabelToolItem afterText
protected LabelToolItem beforePage
protected PagingLoadConfig config
protected LabelToolItem displayText
protected Button first
protected Button prev
protected Button next
protected Button last
protected Button refresh
protected PagingToolBar.PagingToolBarImages images
protected Listener<ComponentEvent> listener
protected PagingLoader<?> loader
protected LoadListener loadListener
protected PagingToolBar.PagingToolBarMessages msgs
protected com.google.gwt.user.client.ui.TextBox pageText
protected boolean showToolTips
protected int start
protected int pageSize
protected int totalLength
Constructor Detail |
---|
public PagingToolBar(int pageSize)
pageSize
- the page sizeMethod Detail |
---|
public void bind(PagingLoader<?> loader)
loader
- the loaderpublic void clear()
public void first()
public int getActivePage()
public PagingToolBar.PagingToolBarImages getImages()
public PagingToolBar.PagingToolBarMessages getMessages()
public int getPageSize()
public int getTotalPages()
public boolean isReuseConfig()
public boolean isShowToolTips()
public void last()
public void next()
public void previous()
public void refresh()
public void setActivePage(int page)
page
- the pagepublic void setImages(PagingToolBar.PagingToolBarImages images)
public void setMessages(PagingToolBar.PagingToolBarMessages messages)
messages
- the messagespublic void setPageSize(int pageSize)
pageSize
- the new page sizepublic void setReuseConfig(boolean reuseConfig)
reuseConfig
- true to reuse the load configpublic void setShowToolTips(boolean showToolTips)
showToolTips
- true to show tool tipsprotected void doLoadRequest(int offset, int limit)
protected void onLoad(LoadEvent event)
protected void onPageChange()
protected void onRender(com.google.gwt.user.client.Element target, int index)
Component
onRender
in class ToolBar
target
- the target elementindex
- the insert location
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |