Package org.eclipse.nebula.widgets.nattable.sort

Examples of org.eclipse.nebula.widgets.nattable.sort.ISortModel


        IDataProvider columnHeaderDataProvider = new DefaultColumnHeaderDataProvider(
                propertyNames);
        DataLayer columnHeaderDataLayer = new DefaultColumnHeaderDataLayer(
                columnHeaderDataProvider);

        ISortModel sortModel = new GlazedListsSortModel<Datum>(sortedList,
                columnPropertyAccessor, configRegistry, columnHeaderDataLayer);

        final TreeList<Datum> treeList = new TreeList<Datum>(sortedList,
                new DatumTreeFormat(sortModel), new DatumExpansionModel());
        GlazedListTreeData<Datum> treeData = new DatumTreeData(treeList);
View Full Code Here


        IDataProvider columnHeaderDataProvider = new DefaultColumnHeaderDataProvider(
                propertyNames);
        DataLayer columnHeaderDataLayer = new DefaultColumnHeaderDataLayer(
                columnHeaderDataProvider);

        ISortModel sortModel = new GlazedListsSortModel<Datum>(sortedList,
                columnPropertyAccessor, configRegistry, columnHeaderDataLayer);

        final TreeList<Datum> treeList = new TreeList<Datum>(sortedList,
                new DatumTreeFormat(sortModel), new DatumExpansionModel());
        GlazedListTreeData<Datum> treeData = new DatumTreeData(treeList);
View Full Code Here

        sortModel = SortModelFixture.getEmptyModel();
        sortHeaderLayer = new SortHeaderLayer<RowDataFixture>(
                new DataLayerFixture(10, 20, 100, 20), sortModel);
        sortStatePersistor = new SortStatePersistor<RowDataFixture>(sortModel);
        sortStatePersistor.loadState(TEST_PREFIX, properties);
        ISortModel sortModel = sortHeaderLayer.getSortModel();

        // Sort direction
        assertEquals(SortDirectionEnum.DESC, sortModel.getSortDirection(0));
        assertEquals(SortDirectionEnum.ASC, sortModel.getSortDirection(3));
        assertEquals(SortDirectionEnum.DESC, sortModel.getSortDirection(5));
        assertEquals(SortDirectionEnum.ASC, sortModel.getSortDirection(6));

        // Sort order
        assertEquals(3, sortModel.getSortOrder(0));
        assertEquals(2, sortModel.getSortOrder(3));
        assertEquals(1, sortModel.getSortOrder(5));
        assertEquals(0, sortModel.getSortOrder(6));

        // No other columns should be flagged as sorted
        assertEquals(-1, sortModel.getSortOrder(4));
        assertFalse(sortModel.isColumnIndexSorted(4));
        assertEquals(SortDirectionEnum.NONE, sortModel.getSortDirection(4));
    }
View Full Code Here

TOP

Related Classes of org.eclipse.nebula.widgets.nattable.sort.ISortModel

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.