|
||||||||||
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.google.gwt.user.client.ui.Composite
com.google.gwt.user.cellview.client.AbstractPager
org.drools.guvnor.client.widgets.tables.GuvnorSimplePager
public class GuvnorSimplePager
Essentially a fork of GWT's SimplePager that maintains a set page size and
displays page numbers and total pages more elegantly. SimplePager will ensure
pageSize
rows are always rendered even if the "last" page has
less than pageSize
rows remain. Forked not sub-classed as
GWTs code is largely private and not open to extension :(
Nested Class Summary | |
---|---|
static interface |
GuvnorSimplePager.Resources
A ClientBundle that provides images for this widget. |
static interface |
GuvnorSimplePager.Style
Styles used by this widget. |
static class |
GuvnorSimplePager.TextLocation
The location of the text relative to the paging buttons. |
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 |
---|
Fields inherited from class com.google.gwt.user.client.ui.UIObject |
---|
DEBUG_ID_PREFIX |
Constructor Summary | |
---|---|
GuvnorSimplePager()
Construct a SimplePager with the default text location. |
|
GuvnorSimplePager(GuvnorSimplePager.TextLocation location)
Construct a SimplePager with the specified text location. |
|
GuvnorSimplePager(GuvnorSimplePager.TextLocation location,
GuvnorSimplePager.Resources resources,
boolean showFastForwardButton,
int fastForwardRows,
boolean showLastPageButton)
Construct a SimplePager with the specified resources. |
Method Summary | |
---|---|
protected String |
createText()
|
int |
getPageSize()
|
void |
nextPage()
|
protected void |
onRangeOrRowCountChanged()
|
void |
previousPage()
|
void |
setDisplay(com.google.gwt.view.client.HasRows display)
|
void |
setPage(int index)
|
void |
setPageSize(int pageSize)
|
void |
setPageStart(int index)
|
void |
startLoading()
Let the page know that the table is loading. |
Methods inherited from class com.google.gwt.user.cellview.client.AbstractPager |
---|
firstPage, getDisplay, getPage, getPageCount, getPageStart, hasNextPage, hasNextPages, hasPage, hasPreviousPage, hasPreviousPages, isRangeLimited, lastPage, lastPageStart, setRangeLimited |
Methods inherited from class com.google.gwt.user.client.ui.Composite |
---|
getWidget, initWidget, isAttached, onAttach, onBrowserEvent, onDetach, setWidget |
Methods inherited from class com.google.gwt.user.client.ui.Widget |
---|
addAttachHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isOrWasAttached, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents |
Methods inherited from class com.google.gwt.user.client.ui.UIObject |
---|
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, toString, unsinkEvents |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public GuvnorSimplePager()
SimplePager
with the default text location.
public GuvnorSimplePager(GuvnorSimplePager.TextLocation location)
SimplePager
with the specified text location.
location
- the location of the text relative to the buttonspublic GuvnorSimplePager(GuvnorSimplePager.TextLocation location, GuvnorSimplePager.Resources resources, boolean showFastForwardButton, int fastForwardRows, boolean showLastPageButton)
SimplePager
with the specified resources.
location
- the location of the text relative to the buttonsresources
- the GuvnorSimplePager.Resources
to useshowFastForwardButton
- if true, show a fast-forward button that advances by a larger
increment than a single pagefastForwardRows
- the number of rows to jump when fast forwardingshowLastPageButton
- if true, show a button to go the the last pageMethod Detail |
---|
public int getPageSize()
getPageSize
in class com.google.gwt.user.cellview.client.AbstractPager
public void nextPage()
nextPage
in class com.google.gwt.user.cellview.client.AbstractPager
public void previousPage()
previousPage
in class com.google.gwt.user.cellview.client.AbstractPager
public void setDisplay(com.google.gwt.view.client.HasRows display)
setDisplay
in class com.google.gwt.user.cellview.client.AbstractPager
public void setPage(int index)
setPage
in class com.google.gwt.user.cellview.client.AbstractPager
public void setPageSize(int pageSize)
setPageSize
in class com.google.gwt.user.cellview.client.AbstractPager
public void setPageStart(int index)
setPageStart
in class com.google.gwt.user.cellview.client.AbstractPager
public void startLoading()
protected String createText()
protected void onRangeOrRowCountChanged()
onRangeOrRowCountChanged
in class com.google.gwt.user.cellview.client.AbstractPager
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |