Search in sources :

Example 1 with ColumnSetNavigationPageGraphicsRenderer

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();
}
Also used : ColumnSetNavigationPageGraphicsRenderer(org.talend.dataprofiler.core.ui.editor.analysis.renderer.ColumnSetNavigationPageGraphicsRenderer) GridLayout(org.eclipse.swt.layout.GridLayout) ResultAndNavigationPageGraphicsRenderer(org.eclipse.nebula.widgets.pagination.renderers.navigation.ResultAndNavigationPageGraphicsRenderer) AbstractPageControllerComposite(org.eclipse.nebula.widgets.pagination.AbstractPageControllerComposite) Composite(org.eclipse.swt.widgets.Composite) MapDBPageLoader(org.talend.dataprofiler.common.ui.pagination.pageloder.MapDBPageLoader) GridData(org.eclipse.swt.layout.GridData) PageResult(org.eclipse.nebula.widgets.pagination.collections.PageResult) PatternsDataValidation(org.talend.dataprofiler.core.ui.editor.pattern.PatternsDataValidation)

Aggregations

AbstractPageControllerComposite (org.eclipse.nebula.widgets.pagination.AbstractPageControllerComposite)1 PageResult (org.eclipse.nebula.widgets.pagination.collections.PageResult)1 ResultAndNavigationPageGraphicsRenderer (org.eclipse.nebula.widgets.pagination.renderers.navigation.ResultAndNavigationPageGraphicsRenderer)1 GridData (org.eclipse.swt.layout.GridData)1 GridLayout (org.eclipse.swt.layout.GridLayout)1 Composite (org.eclipse.swt.widgets.Composite)1 MapDBPageLoader (org.talend.dataprofiler.common.ui.pagination.pageloder.MapDBPageLoader)1 ColumnSetNavigationPageGraphicsRenderer (org.talend.dataprofiler.core.ui.editor.analysis.renderer.ColumnSetNavigationPageGraphicsRenderer)1 PatternsDataValidation (org.talend.dataprofiler.core.ui.editor.pattern.PatternsDataValidation)1