use of org.talend.dataprofiler.core.ui.editor.analysis.renderer.ColumnSetNavigationPageGraphicsRenderer in project tdq-studio-se by Talend.
the class ColumnSetAnalysisResultPage method redrawPagationComposite.
/**
* DOC zshen Comment method "redrawPagationComposite".
*
* @param parent
*/
private void redrawPagationComposite(Composite parent, List<Map<Integer, RegexpMatchingIndicator>> patternList, boolean withPageNumberButton) {
final IPageLoader<PageResult<Object[]>> pageLoader = new MapDBPageLoader<Object>(mapDB, new PatternsDataValidation(patternList, filterType), mapDB.size());
controller.removePageChangedListener(createLoadPageAndReplaceItemsListener);
controller.removePageChangedListener(resultAndPageButtonsDecorator);
controller.setCurrentPage(-1);
createLoadPageAndReplaceItemsListener = PageLoaderStrategyHelper.createLoadPageAndReplaceItemsListener(controller, columnsElementViewer, pageLoader, PageResultContentProvider.getInstance(), null);
controller.addPageChangedListener(createLoadPageAndReplaceItemsListener);
if (buttonComposite != null) {
buttonComposite.dispose();
}
buttonComposite = new Composite(parent, SWT.NONE);
buttonComposite.setLayoutData(new GridData(GridData.FILL_BOTH));
buttonComposite.setLayout(new GridLayout());
if (withPageNumberButton) {
resultAndPageButtonsDecorator = new ResultAndNavigationPageGraphicsRenderer(buttonComposite, SWT.NONE, controller);
} else {
resultAndPageButtonsDecorator = new ColumnSetNavigationPageGraphicsRenderer(buttonComposite, SWT.NONE, controller);
}
GridData gridData = new GridData(GridData.FILL_BOTH);
resultAndPageButtonsDecorator.setLayoutData(gridData);
controller.reset();
parent.layout();
}
Aggregations