Class ResultAndNavigationPageGraphicsRenderer
java.lang.Object
org.eclipse.swt.widgets.Widget
org.eclipse.swt.widgets.Control
org.eclipse.swt.widgets.Scrollable
org.eclipse.swt.widgets.Composite
org.eclipse.nebula.widgets.pagination.AbstractPageControllerComposite
org.eclipse.nebula.widgets.pagination.renderers.navigation.ResultAndNavigationPageGraphicsRenderer
- All Implemented Interfaces:
IPageChangedListener
,org.eclipse.swt.graphics.Drawable
public class ResultAndNavigationPageGraphicsRenderer extends AbstractPageControllerComposite
This SWT
Composite
display :
- on the left region the result page.
- on the right region the page links navigation by using
GC
.
Example :
Results 1-5 of 10 Previous 1 2 ...10 Next
-
Field Summary
-
Constructor Summary
Constructors Constructor Description ResultAndNavigationPageGraphicsRenderer(org.eclipse.swt.widgets.Composite parent, int style, PageableController controller)
ResultAndNavigationPageGraphicsRenderer(org.eclipse.swt.widgets.Composite parent, int style, PageableController controller, INavigationPageGraphicsConfigurator configurator)
-
Method Summary
Modifier and Type Method Description protected org.eclipse.swt.widgets.Composite
createComposite(org.eclipse.swt.widgets.Composite parent, int style)
protected void
createUI(org.eclipse.swt.widgets.Composite parent)
Create the UI like this :protected void
displayResults(PageableController controller)
NavigationPageGraphics
getNavigationPage()
Returns theGC
navigation page.void
pageIndexChanged(int oldPageNumber, int newPageNumber, PageableController controller)
Sent when page changed in the page controllerPageableController
.void
pageSizeChanged(int oldPageSize, int newPageSize, PageableController paginationController)
Sent when page size changed in the page controllerPageableController
.void
setConfigurator(INavigationPageGraphicsConfigurator configurator)
Configure navigation page.void
setLocale(java.util.Locale locale)
Set the locale to use for resources.void
sortChanged(java.lang.String oldPopertyName, java.lang.String propertyName, int oldSortDirection, int sortDirection, PageableController paginationController)
Sent when sort changed in the page controllerPageableController
.void
totalElementsChanged(long oldTotalElements, long newTotalElements, PageableController controller)
Sent when total elements changed in the page controllerPageableController
.Methods inherited from class org.eclipse.nebula.widgets.pagination.AbstractPageControllerComposite
createController, dispose, getController, getLocale, getPageContentProvider, localeChanged, setCurrentPage
Methods inherited from class org.eclipse.swt.widgets.Composite
changed, checkSubclass, drawBackground, getBackgroundMode, getChildren, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, layout, layout, setBackgroundMode, setFocus, setLayout, setLayoutDeferred, setTabList, toString
Methods inherited from class org.eclipse.swt.widgets.Scrollable
computeTrim, getClientArea, getHorizontalBar, getScrollbarsMode, getVerticalBar
Methods inherited from class org.eclipse.swt.widgets.Control
addControlListener, addDragDetectListener, addFocusListener, addGestureListener, addHelpListener, addKeyListener, addMenuDetectListener, addMouseListener, addMouseMoveListener, addMouseTrackListener, addMouseWheelListener, addPaintListener, addTouchListener, addTraverseListener, computeSize, computeSize, dragDetect, dragDetect, forceFocus, getAccessible, getBackground, getBackgroundImage, getBorderWidth, getBounds, getCursor, getDragDetect, getEnabled, getFont, getForeground, getLayoutData, getLocation, getMenu, getMonitor, getOrientation, getParent, getRegion, getShell, getSize, getTextDirection, getToolTipText, getTouchEnabled, getVisible, internal_dispose_GC, internal_new_GC, isEnabled, isFocusControl, isReparentable, isVisible, moveAbove, moveBelow, pack, pack, print, redraw, redraw, removeControlListener, removeDragDetectListener, removeFocusListener, removeGestureListener, removeHelpListener, removeKeyListener, removeMenuDetectListener, removeMouseListener, removeMouseMoveListener, removeMouseTrackListener, removeMouseWheelListener, removePaintListener, removeTouchListener, removeTraverseListener, requestLayout, setBackground, setBackgroundImage, setBounds, setBounds, setCapture, setCursor, setDragDetect, setEnabled, setFont, setForeground, setLayoutData, setLocation, setLocation, setMenu, setOrientation, setParent, setRedraw, setRegion, setSize, setSize, setTextDirection, setToolTipText, setTouchEnabled, setVisible, toControl, toControl, toDisplay, toDisplay, traverse, traverse, traverse, update
Methods inherited from class org.eclipse.swt.widgets.Widget
addDisposeListener, addListener, checkWidget, getData, getData, getDisplay, getListeners, getStyle, isAutoDirection, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, reskin, setData, setData
-
Constructor Details
-
ResultAndNavigationPageGraphicsRenderer
public ResultAndNavigationPageGraphicsRenderer(org.eclipse.swt.widgets.Composite parent, int style, PageableController controller) -
ResultAndNavigationPageGraphicsRenderer
public ResultAndNavigationPageGraphicsRenderer(org.eclipse.swt.widgets.Composite parent, int style, PageableController controller, INavigationPageGraphicsConfigurator configurator)
-
-
Method Details
-
createUI
protected void createUI(org.eclipse.swt.widgets.Composite parent)Create the UI like this :Results 1-5 of 10 Previous 1 2 ...10 Next
- Specified by:
createUI
in classAbstractPageControllerComposite
-
pageIndexChanged
Description copied from interface:IPageChangedListener
Sent when page changed in the page controllerPageableController
.- Parameters:
oldPageNumber
- old page index.newPageNumber
- new page index.controller
- the page controller which have sent this event.
-
pageSizeChanged
public void pageSizeChanged(int oldPageSize, int newPageSize, PageableController paginationController)Description copied from interface:IPageChangedListener
Sent when page size changed in the page controllerPageableController
.- Parameters:
oldPageSize
- old page size.newPageSize
- new page size.paginationController
- the page controller which have sent this event.
-
totalElementsChanged
public void totalElementsChanged(long oldTotalElements, long newTotalElements, PageableController controller)Description copied from interface:IPageChangedListener
Sent when total elements changed in the page controllerPageableController
.- Parameters:
oldTotalElements
- old total elements.newTotalElements
- new total elements.controller
- the page controller which have sent this event.
-
sortChanged
public void sortChanged(java.lang.String oldPopertyName, java.lang.String propertyName, int oldSortDirection, int sortDirection, PageableController paginationController)Description copied from interface:IPageChangedListener
Sent when sort changed in the page controllerPageableController
.- Parameters:
oldPopertyName
- old property name.propertyName
- new property name.oldSortDirection
- old sort direction :SWT.UP
,SWT.DOWN
.sortDirection
- new sort direction :SWT.UP
,SWT.DOWN
.
-
displayResults
-
createComposite
protected org.eclipse.swt.widgets.Composite createComposite(org.eclipse.swt.widgets.Composite parent, int style) -
setLocale
public void setLocale(java.util.Locale locale)Description copied from class:AbstractPageControllerComposite
Set the locale to use for resources.- Overrides:
setLocale
in classAbstractPageControllerComposite
-
getNavigationPage
Returns theGC
navigation page.- Returns:
-
setConfigurator
Configure navigation page.- Parameters:
configurator
-
-