Package org.eclipse.nebula.widgets.nattable.grid.data

Examples of org.eclipse.nebula.widgets.nattable.grid.data.DummyBodyDataProvider


    }

    @Test
    public void testCalculateInSameThreadWithColumnKey() throws Exception {
        this.valueCache = new CalculatedValueCache(new DataLayer(
                new DummyBodyDataProvider(10, 10)), true, false);

        Object result = this.valueCache.getCalculatedValue(0, 0, false,
                calculator);
        assertEquals(Integer.valueOf(42), Integer.valueOf(result.toString()));
    }
View Full Code Here


    }

    @Test
    public void testCalculateInBackgroundWithRowKey() throws Exception {
        this.valueCache = new CalculatedValueCache(new DataLayer(
                new DummyBodyDataProvider(10, 10)), false, true);

        Object result = this.valueCache.getCalculatedValue(0, 0, true,
                calculator);
        // as calculation is performed in background, the immediate return value
        // is null
View Full Code Here

    }

    @Test
    public void testCalculateInSameThreadWithRowKey() throws Exception {
        this.valueCache = new CalculatedValueCache(new DataLayer(
                new DummyBodyDataProvider(10, 10)), false, true);

        Object result = this.valueCache.getCalculatedValue(0, 0, false,
                calculator);
        assertEquals(Integer.valueOf(42), Integer.valueOf(result.toString()));
    }
View Full Code Here

    }

    @Test(expected = IllegalStateException.class)
    public void testIllegalState() {
        this.valueCache = new CalculatedValueCache(new DataLayer(
                new DummyBodyDataProvider(10, 10)), false, false);
        this.valueCache.getCalculatedValue(0, 0, false, calculator);
    }
View Full Code Here

    private RowHideShowLayer layer;

    @Before
    public void setup() {
        layer = new RowHideShowLayer(new DataLayer(new DummyBodyDataProvider(
                10, 10)) {

            @Override
            public void saveState(String prefix, Properties properties) {
                // Do nothing
View Full Code Here

    private ColumnHideShowLayer layer;

    @Before
    public void setup() {
        layer = new ColumnHideShowLayer(new DataLayer(
                new DummyBodyDataProvider(10, 10)) {

            @Override
            public void saveState(String prefix, Properties properties) {
                // Do nothing
            }
View Full Code Here

        StandaloneNatExampleRunner
                .run(new ColumnHeaderViewportSelectionReorderDataLayerExample());
    }

    public Control createExampleControl(Composite parent) {
        DummyBodyDataProvider bodyDataProvider = new DummyBodyDataProvider(200,
                1000000);
        SelectionLayer selectionLayer = new SelectionLayer(
                new ColumnReorderLayer(new DataLayer(bodyDataProvider)));
        ViewportLayer viewportLayer = new ViewportLayer(selectionLayer);
View Full Code Here

        StandaloneNatExampleRunner
                .run(new ColumnHeaderSelectionDataLayerExample());
    }

    public Control createExampleControl(Composite parent) {
        DummyBodyDataProvider bodyDataProvider = new DummyBodyDataProvider(
                1000000, 1000000);
        SelectionLayer selectionLayer = new SelectionLayer(new DataLayer(
                bodyDataProvider));
        ILayer columnHeaderLayer = new ColumnHeaderLayer(new DataLayer(
                new DummyColumnHeaderDataProvider(bodyDataProvider)),
View Full Code Here

    public String getDescription() {
        return "This example shows a very large (1 million columns x 1 million rows) data layer with a row header attached.";
    }

    public Control createExampleControl(Composite parent) {
        DummyBodyDataProvider bodyDataProvider = new DummyBodyDataProvider(
                1000000, 1000000);
        SelectionLayer selectionLayer = new SelectionLayer(new DataLayer(
                bodyDataProvider));
        ViewportLayer viewportLayer = new ViewportLayer(selectionLayer);
View Full Code Here

        StandaloneNatExampleRunner
                .run(new RowHeaderSelectionDataLayerExample());
    }

    public Control createExampleControl(Composite parent) {
        DummyBodyDataProvider bodyDataProvider = new DummyBodyDataProvider(
                1000000, 1000000);
        SelectionLayer selectionLayer = new SelectionLayer(new DataLayer(
                bodyDataProvider));

        DataLayer rowHeaderDataLayer = new DataLayer(
View Full Code Here

TOP

Related Classes of org.eclipse.nebula.widgets.nattable.grid.data.DummyBodyDataProvider

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.