jBPM Console NG - Generic Client 6.1.0.Final

org.jbpm.console.ng.gc.client.experimental.pagination
Class JBPMSimplePager<T>

java.lang.Object
  extended by com.google.gwt.user.client.ui.UIObject
      extended by com.google.gwt.user.client.ui.Widget
          extended by com.google.gwt.user.client.ui.Composite
              extended by com.google.gwt.user.cellview.client.AbstractPager
                  extended by org.jbpm.console.ng.gc.client.experimental.pagination.JBPMSimplePager<T>
All Implemented Interfaces:
com.google.gwt.event.logical.shared.HasAttachHandlers, com.google.gwt.event.shared.HasHandlers, com.google.gwt.user.client.EventListener, com.google.gwt.user.client.ui.HasVisibility, com.google.gwt.user.client.ui.IsRenderable, com.google.gwt.user.client.ui.IsWidget

public class JBPMSimplePager<T>
extends com.google.gwt.user.cellview.client.AbstractPager

A pager for controlling a HasRows that only supports simple page navigation.

Example

   
   


Nested Class Summary
static class JBPMSimplePager.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
JBPMSimplePager()
          Construct a SimplePager with the default text location.
JBPMSimplePager(GenericDataProvider<T> dataProvider)
           
JBPMSimplePager(JBPMSimplePager.TextLocation location)
          Construct a SimplePager with the specified text location.
JBPMSimplePager(JBPMSimplePager.TextLocation location, boolean showFastForwardButton, boolean showLastPageButton)
          Construct a SimplePager with the default resources, fast forward rows and default image button names.
JBPMSimplePager(JBPMSimplePager.TextLocation location, boolean showFastForwardButton, int fastForwardRows, boolean showLastPageButton)
          Construct a SimplePager with the default resources and default image button names.
JBPMSimplePager(JBPMSimplePager.TextLocation location, com.google.gwt.user.cellview.client.SimplePager.Resources resources, boolean showFastForwardButton, int fastForwardRows, boolean showLastPageButton)
          Construct a SimplePager with the specified resources and default image button names.
JBPMSimplePager(JBPMSimplePager.TextLocation location, com.google.gwt.user.cellview.client.SimplePager.Resources resources, boolean showFastForwardButton, int fastForwardRows, boolean showLastPageButton, com.github.gwtbootstrap.client.ui.SimplePager.ImageButtonsConstants imageButtonConstants)
          Construct a SimplePager with the specified resources.
 
Method Summary
protected  String createText()
          Get the text to display in the pager that reflects the state of the pager.
 void firstPage()
           
 int getCurrentPage()
           
 int getFastForwardRows()
           
 int getPage()
           
 int getPageCount()
           
 boolean hasNextPage()
           
 boolean hasNextPages(int pages)
           
 boolean hasPage(int index)
           
 boolean hasPreviousPage()
           
 boolean hasPreviousPages(int pages)
           
 void lastPage()
           
 void lastPageStart()
           
 void nextPage()
           
protected  void onRangeOrRowCountChanged()
           
 void previousPage()
           
 void setDataProvider(GenericDataProvider<T> dataProvider)
           
 void setDisplay(com.google.gwt.view.client.HasRows display)
           
 void setFastForwardRows(int fastForwardRows)
           
 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
getDisplay, getPageSize, getPageStart, isRangeLimited, setRangeLimited
 
Methods inherited from class com.google.gwt.user.client.ui.Composite
claimElement, getWidget, initializeClaimedElement, initWidget, isAttached, onAttach, onBrowserEvent, onDetach, render, render, resolvePotentialElement, setWidget
 
Methods inherited from class com.google.gwt.user.client.ui.Widget
addAttachHandler, addBitlessDomHandler, 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, sinkBitlessEvent, toString, unsinkEvents
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JBPMSimplePager

public JBPMSimplePager(GenericDataProvider<T> dataProvider)

JBPMSimplePager

public JBPMSimplePager()
Construct a SimplePager with the default text location.


JBPMSimplePager

@UiConstructor
public JBPMSimplePager(JBPMSimplePager.TextLocation location)
Construct a SimplePager with the specified text location.

Parameters:
location - the location of the text relative to the buttons

JBPMSimplePager

public JBPMSimplePager(JBPMSimplePager.TextLocation location,
                       boolean showFastForwardButton,
                       boolean showLastPageButton)
Construct a SimplePager with the default resources, fast forward rows and default image button names.

Parameters:
location - the location of the text relative to the buttons
showFastForwardButton - if true, show a fast-forward button that advances by a larger increment than a single page
showLastPageButton - if true, show a button to go the the last page

JBPMSimplePager

public JBPMSimplePager(JBPMSimplePager.TextLocation location,
                       boolean showFastForwardButton,
                       int fastForwardRows,
                       boolean showLastPageButton)
Construct a SimplePager with the default resources and default image button names.

Parameters:
location - the location of the text relative to the buttons
showFastForwardButton - if true, show a fast-forward button that advances by a larger increment than a single page
fastForwardRows - the number of rows to jump when fast forwarding
showLastPageButton - if true, show a button to go the the last page

JBPMSimplePager

public JBPMSimplePager(JBPMSimplePager.TextLocation location,
                       com.google.gwt.user.cellview.client.SimplePager.Resources resources,
                       boolean showFastForwardButton,
                       int fastForwardRows,
                       boolean showLastPageButton,
                       com.github.gwtbootstrap.client.ui.SimplePager.ImageButtonsConstants imageButtonConstants)
Construct a SimplePager with the specified resources.

Parameters:
location - the location of the text relative to the buttons
resources - the SimplePager.Resources to use
showFastForwardButton - if true, show a fast-forward button that advances by a larger increment than a single page
fastForwardRows - the number of rows to jump when fast forwarding
showLastPageButton - if true, show a button to go the the last page
imageButtonConstants - Constants that contain the image button names

JBPMSimplePager

public JBPMSimplePager(JBPMSimplePager.TextLocation location,
                       com.google.gwt.user.cellview.client.SimplePager.Resources resources,
                       boolean showFastForwardButton,
                       int fastForwardRows,
                       boolean showLastPageButton)
Construct a SimplePager with the specified resources and default image button names.

Parameters:
location - the location of the text relative to the buttons
resources - the SimplePager.Resources to use
showFastForwardButton - if true, show a fast-forward button that advances by a larger increment than a single page
fastForwardRows - the number of rows to jump when fast forwarding
showLastPageButton - if true, show a button to go the the last page
Method Detail

firstPage

public void firstPage()
Overrides:
firstPage in class com.google.gwt.user.cellview.client.AbstractPager

getPage

public int getPage()
Overrides:
getPage in class com.google.gwt.user.cellview.client.AbstractPager

getPageCount

public int getPageCount()
Overrides:
getPageCount in class com.google.gwt.user.cellview.client.AbstractPager

hasNextPage

public boolean hasNextPage()
Overrides:
hasNextPage in class com.google.gwt.user.cellview.client.AbstractPager

hasNextPages

public boolean hasNextPages(int pages)
Overrides:
hasNextPages in class com.google.gwt.user.cellview.client.AbstractPager

hasPage

public boolean hasPage(int index)
Overrides:
hasPage in class com.google.gwt.user.cellview.client.AbstractPager

hasPreviousPage

public boolean hasPreviousPage()
Overrides:
hasPreviousPage in class com.google.gwt.user.cellview.client.AbstractPager

hasPreviousPages

public boolean hasPreviousPages(int pages)
Overrides:
hasPreviousPages in class com.google.gwt.user.cellview.client.AbstractPager

lastPage

public void lastPage()
Overrides:
lastPage in class com.google.gwt.user.cellview.client.AbstractPager

lastPageStart

public void lastPageStart()
Overrides:
lastPageStart in class com.google.gwt.user.cellview.client.AbstractPager

nextPage

public void nextPage()
Overrides:
nextPage in class com.google.gwt.user.cellview.client.AbstractPager

previousPage

public void previousPage()
Overrides:
previousPage in class com.google.gwt.user.cellview.client.AbstractPager

setDisplay

public void setDisplay(com.google.gwt.view.client.HasRows display)
Overrides:
setDisplay in class com.google.gwt.user.cellview.client.AbstractPager

setPage

public void setPage(int index)
Overrides:
setPage in class com.google.gwt.user.cellview.client.AbstractPager

setPageSize

public void setPageSize(int pageSize)
Overrides:
setPageSize in class com.google.gwt.user.cellview.client.AbstractPager

setPageStart

public void setPageStart(int index)
Overrides:
setPageStart in class com.google.gwt.user.cellview.client.AbstractPager

startLoading

public void startLoading()
Let the page know that the table is loading. Call this method to clear all data from the table and hide the current range when new data is being loaded into the table.


createText

protected String createText()
Get the text to display in the pager that reflects the state of the pager.

Returns:
the text

onRangeOrRowCountChanged

protected void onRangeOrRowCountChanged()
Specified by:
onRangeOrRowCountChanged in class com.google.gwt.user.cellview.client.AbstractPager

getFastForwardRows

public int getFastForwardRows()

setFastForwardRows

public void setFastForwardRows(int fastForwardRows)

getCurrentPage

public int getCurrentPage()

setDataProvider

public void setDataProvider(GenericDataProvider<T> dataProvider)

jBPM Console NG - Generic Client 6.1.0.Final

Copyright © 2001-2014 JBoss by Red Hat. All Rights Reserved.