T
- the pagination controller.public class PageableTable extends AbstractPaginationWidget<org.eclipse.swt.widgets.Table>
Composite
which host a SWT Table
linked to
a pagination controller to display data with pagination. The
refreshPage()
must be implemented to load paginated
data and update the total element of the controller.
This composite is able to to add another Composite
on the top and on
the bottom of the table. For instance you can display navigation page links
on the top of the table.Modifier and Type | Field and Description |
---|---|
protected static int |
DEFAULT_TABLE_STYLE
default table style
|
protected org.eclipse.jface.viewers.TableViewer |
viewer
the table viewer
|
Modifier | Constructor and Description |
---|---|
|
PageableTable(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.
|
|
PageableTable(org.eclipse.swt.widgets.Composite parent,
int style,
int tableStyle,
int pageSize) |
|
PageableTable(org.eclipse.swt.widgets.Composite parent,
int style,
int tableStyle,
int pageSize,
IPageContentProvider pageContentProvider)
Constructs a new instance of this class given its parent and a style
value describing its behavior and appearance.
|
|
PageableTable(org.eclipse.swt.widgets.Composite parent,
int style,
int tableStyle,
int pageSize,
IPageContentProvider pageContentProvider,
ICompositeRendererFactory pageRendererTopFactory,
ICompositeRendererFactory pageRendererBottomFactory)
Constructs a new instance of this class given its parent and a style
value describing its behavior and appearance.
|
protected |
PageableTable(org.eclipse.swt.widgets.Composite parent,
int style,
int tableStyle,
int pageSize,
IPageContentProvider pageContentProvider,
ICompositeRendererFactory pageRendererTopFactory,
ICompositeRendererFactory pageRendererBottomFactory,
boolean createUI)
Constructs a new instance of this class given its parent and a style
value describing its behavior and appearance.
|
Modifier and Type | Method and Description |
---|---|
protected org.eclipse.swt.widgets.Table |
createTable(org.eclipse.swt.widgets.Composite parent)
Create the table widget and layout it.
|
protected org.eclipse.swt.widgets.Table |
createTable(org.eclipse.swt.widgets.Composite parent,
int style)
Create a table.
|
protected org.eclipse.swt.widgets.Table |
createWidget(org.eclipse.swt.widgets.Composite parent)
Create the widget linked to the pagination controller.
|
static ICompositeRendererFactory |
getDefaultPageRendererBottomFactory()
Returns the default page renderer factory for the bottom region.
|
static ICompositeRendererFactory |
getDefaultPageRendererTopFactory()
Returns the default page renderer factory for the top region.
|
protected int |
getTableStyle()
Returns the table style.
|
org.eclipse.jface.viewers.TableViewer |
getViewer()
Returns the table viewer.
|
void |
refreshPage()
Refresh the page.
|
createCompositeBottom, createCompositeTop, createUI, getCompositeBottom, getCompositeTop, getPageLoader, getPageLoaderHandler, getPageRendererBottomFactory, getPageRendererTopFactory, getWidget, pageIndexChanged, pageSizeChanged, refreshPage, setLocale, setPageLoader, setPageLoaderHandler, sortChanged, totalElementsChanged
createController, dispose, getController, getLocale, getPageContentProvider, localeChanged, setCurrentPage
changed, checkSubclass, drawBackground, getBackgroundMode, getChildren, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, layout, layout, setBackgroundMode, setFocus, setLayout, setLayoutDeferred, setTabList
computeTrim, getClientArea, getHorizontalBar, getScrollbarsMode, getVerticalBar
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
addDisposeListener, addListener, checkWidget, getData, getData, getDisplay, getListeners, getStyle, isAutoDirection, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, reskin, setData, setData, toString
protected static final int DEFAULT_TABLE_STYLE
protected org.eclipse.jface.viewers.TableViewer viewer
public PageableTable(org.eclipse.swt.widgets.Composite parent, int style)
PageableController.DEFAULT_PAGE_SIZE
and default table style
SWT.BORDER | SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL are used.parent
- a widget which will be the parent of the new instance (cannot
be null)style
- the style of widget to constructpublic PageableTable(org.eclipse.swt.widgets.Composite parent, int style, int tableStyle, int pageSize, IPageContentProvider pageContentProvider)
parent
- a widget which will be the parent of the new instance (cannot
be null)style
- the style of widget to constructtableStyle
- the style of table to constructpageSize
- size of the page (number items displayed per page).public PageableTable(org.eclipse.swt.widgets.Composite parent, int style, int tableStyle, int pageSize)
public PageableTable(org.eclipse.swt.widgets.Composite parent, int style, int tableStyle, int pageSize, IPageContentProvider pageContentProvider, ICompositeRendererFactory pageRendererTopFactory, ICompositeRendererFactory pageRendererBottomFactory)
parent
- a widget which will be the parent of the new instance (cannot
be null)style
- the style of widget to constructtableStyle
- the style of table to constructpageSize
- size of the page (number items displayed per page).pageRendererTopFactory
- the page renderer factory used to create a SWT Composite on
the top of the widget. Null if none Composite must be created.pageRendererBottomFactory
- the page renderer factory used to create a SWT Composite on
the bottom of the widget. Null if none Composite must be
created.protected PageableTable(org.eclipse.swt.widgets.Composite parent, int style, int tableStyle, int pageSize, IPageContentProvider pageContentProvider, ICompositeRendererFactory pageRendererTopFactory, ICompositeRendererFactory pageRendererBottomFactory, boolean createUI)
parent
- a widget which will be the parent of the new instance (cannot
be null)style
- the style of widget to constructtableStyle
- the style of table to constructpageSize
- size of the page (number items displayed per page).pageRendererTopFactory
- the page renderer factory used to create a SWT Composite on
the top of the widget. Null if none Composite must be created.pageRendererBottomFactory
- the page renderer factory used to create a SWT Composite on
the bottom of the widget. Null if none Composite must be
created.createUI
- true if the UI must be created and false otherwise.protected org.eclipse.swt.widgets.Table createWidget(org.eclipse.swt.widgets.Composite parent)
AbstractPaginationWidget
createWidget
in class AbstractPaginationWidget<org.eclipse.swt.widgets.Table>
parent
- a widget which will be the parent of the new instance (cannot
be null)protected org.eclipse.swt.widgets.Table createTable(org.eclipse.swt.widgets.Composite parent)
parent
- protected int getTableStyle()
public org.eclipse.jface.viewers.TableViewer getViewer()
protected org.eclipse.swt.widgets.Table createTable(org.eclipse.swt.widgets.Composite parent, int style)
parent
- a widget which will be the parent of the new instance (cannot
be null)style
- the style of table to constr * @returnpublic static ICompositeRendererFactory getDefaultPageRendererTopFactory()
public static ICompositeRendererFactory getDefaultPageRendererBottomFactory()
public void refreshPage()
AbstractPaginationWidget
refreshPage
in class AbstractPaginationWidget<org.eclipse.swt.widgets.Table>