T
- the pagination controller.public class PageableTree extends AbstractPaginationWidget<org.eclipse.swt.widgets.Tree>
Composite
which host a SWT Tree
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 tree. For instance you can display navigation page links on
the top of the tree.Modifier and Type | Field and Description |
---|---|
protected static int |
DEFAULT_TREE_STYLE |
protected org.eclipse.jface.viewers.TreeViewer |
viewer
the tree viewer
|
Modifier | Constructor and Description |
---|---|
|
PageableTree(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.
|
|
PageableTree(org.eclipse.swt.widgets.Composite parent,
int style,
int treeStyle,
int pageSize) |
|
PageableTree(org.eclipse.swt.widgets.Composite parent,
int style,
int treeStyle,
int pageSize,
IPageContentProvider pageContentProvider)
Constructs a new instance of this class given its parent and a style
value describing its behavior and appearance.
|
|
PageableTree(org.eclipse.swt.widgets.Composite parent,
int style,
int treeStyle,
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 |
PageableTree(org.eclipse.swt.widgets.Composite parent,
int style,
int treeStyle,
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.Tree |
createTree(org.eclipse.swt.widgets.Composite parent)
Create the tree widget and layout it.
|
protected org.eclipse.swt.widgets.Tree |
createTree(org.eclipse.swt.widgets.Composite parent,
int style)
Create a tree.
|
protected org.eclipse.swt.widgets.Tree |
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 |
getTreeStyle()
Returns the tree style.
|
org.eclipse.jface.viewers.TreeViewer |
getViewer()
Returns the tree 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_TREE_STYLE
protected org.eclipse.jface.viewers.TreeViewer viewer
public PageableTree(org.eclipse.swt.widgets.Composite parent, int style)
PageableController.DEFAULT_PAGE_SIZE
and default tree 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 PageableTree(org.eclipse.swt.widgets.Composite parent, int style, int treeStyle, 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 constructtreeStyle
- the style of tree to constructpageSize
- size of the page (number items displayed per page).public PageableTree(org.eclipse.swt.widgets.Composite parent, int style, int treeStyle, int pageSize)
public PageableTree(org.eclipse.swt.widgets.Composite parent, int style, int treeStyle, 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 constructtreeStyle
- the style of tree 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 PageableTree(org.eclipse.swt.widgets.Composite parent, int style, int treeStyle, 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 constructtreeStyle
- the style of tree 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.Tree createWidget(org.eclipse.swt.widgets.Composite parent)
AbstractPaginationWidget
createWidget
in class AbstractPaginationWidget<org.eclipse.swt.widgets.Tree>
parent
- a widget which will be the parent of the new instance (cannot
be null)protected org.eclipse.swt.widgets.Tree createTree(org.eclipse.swt.widgets.Composite parent)
parent
- protected int getTreeStyle()
public org.eclipse.jface.viewers.TreeViewer getViewer()
protected org.eclipse.swt.widgets.Tree createTree(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 tree to constr * @returnpublic static ICompositeRendererFactory getDefaultPageRendererTopFactory()
public static ICompositeRendererFactory getDefaultPageRendererBottomFactory()
public void refreshPage()
AbstractPaginationWidget
refreshPage
in class AbstractPaginationWidget<org.eclipse.swt.widgets.Tree>