Class AbstractPageControllerComposite
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
- Type Parameters:
T
- pagination controller.
- All Implemented Interfaces:
IPageChangedListener
,org.eclipse.swt.graphics.Drawable
- Direct Known Subclasses:
AbstractPaginationWidget
,NavigationPageComboRenderer
,NavigationPageScaleRenderer
,PageSizeComboRenderer
,ResultAndNavigationPageGraphicsRenderer
,ResultAndNavigationPageLinksRenderer
public abstract class AbstractPageControllerComposite extends org.eclipse.swt.widgets.Composite implements IPageChangedListener
Classes which implement this interface are SWT
Composite
which must
observe changed of a pagination controller to react and update the UI
according the change of the pagination controller. Ex: control to display
page navigation, paginated data in a table, etc...-
Field Summary
-
Constructor Summary
Constructors Modifier Constructor Description AbstractPageControllerComposite(org.eclipse.swt.widgets.Composite parent, int style)
Constructs a new instance of this class given its parent and a style value describing its behavior and appearance.AbstractPageControllerComposite(org.eclipse.swt.widgets.Composite parent, int style, int pageSize, IPageContentProvider pageContentProvider)
Constructs a new instance of this class given its parent and a style value describing its behavior and appearance.AbstractPageControllerComposite(org.eclipse.swt.widgets.Composite parent, int style, PageableController controller)
Constructs a new instance of this class given its parent and a style value describing its behavior and appearance.protected
AbstractPageControllerComposite(org.eclipse.swt.widgets.Composite parent, int style, PageableController controller, int pageSize, IPageContentProvider pageContentProvider, boolean createUI)
Constructs a new instance of this class given its parent and a style value describing its behavior and appearance. -
Method Summary
Modifier and Type Method Description protected PageableController
createController(int pageSize)
protected abstract void
createUI(org.eclipse.swt.widgets.Composite parent)
Create the UI content.void
dispose()
PageableController
getController()
java.util.Locale
getLocale()
returns the locale to use for resources.IPageContentProvider
getPageContentProvider()
void
localeChanged(java.util.Locale oldLocale, java.util.Locale newLocale, PageableController paginationController)
Sent when locale changed in the page controllerPageableController
.void
setCurrentPage(int currentPage)
Set the current page index to teh pagination controller.void
setLocale(java.util.Locale locale)
Set the locale to use for resources.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
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.eclipse.nebula.widgets.pagination.IPageChangedListener
pageIndexChanged, pageSizeChanged, sortChanged, totalElementsChanged
-
Constructor Details
-
AbstractPageControllerComposite
public AbstractPageControllerComposite(org.eclipse.swt.widgets.Composite parent, int style)Constructs a new instance of this class given its parent and a style value describing its behavior and appearance. Here the pagination controller is created in this class with default page size.- Parameters:
parent
- a widget which will be the parent of the new instance (cannot be null)style
- the style of widget to construct
-
AbstractPageControllerComposite
public AbstractPageControllerComposite(org.eclipse.swt.widgets.Composite parent, int style, PageableController controller)Constructs a new instance of this class given its parent and a style value describing its behavior and appearance. Here the pagination controller is filled.- Parameters:
parent
- a widget which will be the parent of the new instance (cannot be null)style
- the style of widget to constructcontroller
- the pagination controller to observe and update.
-
AbstractPageControllerComposite
public AbstractPageControllerComposite(org.eclipse.swt.widgets.Composite parent, int style, int pageSize, IPageContentProvider pageContentProvider)Constructs a new instance of this class given its parent and a style value describing its behavior and appearance. Here the pagination controller is created in this class with the given page size.- Parameters:
parent
- a widget which will be the parent of the new instance (cannot be null)style
- the style of widget to constructpageSize
- size of the page (number items displayed per page).
-
AbstractPageControllerComposite
protected AbstractPageControllerComposite(org.eclipse.swt.widgets.Composite parent, int style, PageableController controller, int pageSize, IPageContentProvider pageContentProvider, boolean createUI)Constructs a new instance of this class given its parent and a style value describing its behavior and appearance. The pagination controller is created in this class or filled.- Parameters:
parent
- a widget which will be the parent of the new instance (cannot be null)style
- the style of widget to constructcontroller
- the pagination controller to observe and update. If this controller is null, this Composite create the pagination controller with the given pageSize.pageSize
- size of the page (number items displayed per page).createUI
- true if the UI must be created and false otherwise.
-
-
Method Details
-
createController
-
getController
-
setCurrentPage
public void setCurrentPage(int currentPage)Set the current page index to teh pagination controller.- Parameters:
currentPage
- new current page index.
-
dispose
public void dispose()- Overrides:
dispose
in classorg.eclipse.swt.widgets.Widget
-
setLocale
public void setLocale(java.util.Locale locale)Set the locale to use for resources.- Parameters:
locale
-
-
getLocale
public java.util.Locale getLocale()returns the locale to use for resources.- Returns:
-
localeChanged
public void localeChanged(java.util.Locale oldLocale, java.util.Locale newLocale, PageableController paginationController)Description copied from interface:IPageChangedListener
Sent when locale changed in the page controllerPageableController
.- Specified by:
localeChanged
in interfaceIPageChangedListener
- Parameters:
oldLocale
- old locale.newLocale
- new locale.
-
getPageContentProvider
-
createUI
protected abstract void createUI(org.eclipse.swt.widgets.Composite parent)Create the UI content.- Parameters:
parent
-
-