Package org.eclipse.nebula.widgets.nattable.coordinate

Examples of org.eclipse.nebula.widgets.nattable.coordinate.Range


        // delete columns in the middle
        contents.get(0).remove(1);
        contents.get(0).remove(1);
        contents.get(0).remove(1);
        underlyingLayer.fireLayerEvent(new ColumnDeleteEvent(underlyingLayer,
                new Range(1, 4)));

        assertEquals(2, columnHideShowLayer.getColumnCount());
        assertEquals(0, columnHideShowLayer.getColumnIndexByPosition(0));
        assertEquals(1, columnHideShowLayer.getColumnIndexByPosition(1));
        assertEquals(-1, columnHideShowLayer.getColumnIndexByPosition(2));
View Full Code Here


        Collection<StructuralDiff> rowDiffs = event.getRowDiffs();
        Assert.assertNotNull(rowDiffs);
        Assert.assertEquals(3, rowDiffs.size());
        Iterator<StructuralDiff> iterator = rowDiffs.iterator();
        Assert.assertEquals(new StructuralDiff(DiffTypeEnum.ADD,
                new Range(2, 2), new Range(2, 3)), iterator.next());
        Assert.assertEquals(new StructuralDiff(DiffTypeEnum.ADD,
                new Range(3, 3), new Range(4, 5)), iterator.next());
        Assert.assertEquals(new StructuralDiff(DiffTypeEnum.ADD,
                new Range(5, 5), new Range(7, 10)), iterator.next());
    }
View Full Code Here

        Collection<StructuralDiff> rowDiffs = event.getRowDiffs();
        Assert.assertNotNull(rowDiffs);
        Assert.assertEquals(3, rowDiffs.size());
        Iterator<StructuralDiff> iterator = rowDiffs.iterator();
        Assert.assertEquals(new StructuralDiff(DiffTypeEnum.ADD,
                new Range(2, 2), new Range(2, 3)), iterator.next());
        Assert.assertEquals(new StructuralDiff(DiffTypeEnum.ADD,
                new Range(3, 3), new Range(4, 5)), iterator.next());
        Assert.assertEquals(new StructuralDiff(DiffTypeEnum.ADD,
                new Range(5, 5), new Range(7, 10)), iterator.next());

        event.convertToLocal(viewportLayer);

        rowDiffs = event.getRowDiffs();
        Assert.assertNotNull(rowDiffs);
        Assert.assertEquals(3, rowDiffs.size());
        iterator = rowDiffs.iterator();
        Assert.assertEquals(new StructuralDiff(DiffTypeEnum.ADD,
                new Range(0, 0), new Range(0, 1)), iterator.next());
        Assert.assertEquals(new StructuralDiff(DiffTypeEnum.ADD,
                new Range(1, 1), new Range(2, 3)), iterator.next());
        Assert.assertEquals(new StructuralDiff(DiffTypeEnum.ADD,
                new Range(3, 3), new Range(5, 8)), iterator.next());
    }
View Full Code Here

    @Test
    public void testColumnDiffs() {
        Collection<StructuralDiff> columnDiffs = event.getColumnDiffs();
        Assert.assertNotNull(columnDiffs);
        Assert.assertEquals(1, columnDiffs.size());
        Assert.assertEquals(new StructuralDiff(DiffTypeEnum.CHANGE, new Range(
                2, 3), new Range(2, 3)), columnDiffs.iterator().next());
    }
View Full Code Here

        event.convertToLocal(viewportLayer);

        Collection<StructuralDiff> columnDiffs = event.getColumnDiffs();
        Assert.assertNotNull(columnDiffs);
        Assert.assertEquals(1, columnDiffs.size());
        Assert.assertEquals(new StructuralDiff(DiffTypeEnum.CHANGE, new Range(
                0, 1), new Range(0, 1)), columnDiffs.iterator().next());
    }
View Full Code Here

        Collection<StructuralDiff> columnDiffs = event.getColumnDiffs();
        Assert.assertNotNull(columnDiffs);
        Assert.assertEquals(3, columnDiffs.size());
        Iterator<StructuralDiff> iterator = columnDiffs.iterator();
        Assert.assertEquals(new StructuralDiff(DiffTypeEnum.ADD,
                new Range(2, 2), new Range(2, 3)), iterator.next());
        Assert.assertEquals(new StructuralDiff(DiffTypeEnum.ADD,
                new Range(3, 3), new Range(4, 5)), iterator.next());
        Assert.assertEquals(new StructuralDiff(DiffTypeEnum.ADD,
                new Range(5, 5), new Range(7, 10)), iterator.next());
    }
View Full Code Here

        Collection<StructuralDiff> columnDiffs = event.getColumnDiffs();
        Assert.assertNotNull(columnDiffs);
        Assert.assertEquals(3, columnDiffs.size());
        Iterator<StructuralDiff> iterator = columnDiffs.iterator();
        Assert.assertEquals(new StructuralDiff(DiffTypeEnum.ADD,
                new Range(2, 2), new Range(2, 3)), iterator.next());
        Assert.assertEquals(new StructuralDiff(DiffTypeEnum.ADD,
                new Range(3, 3), new Range(4, 5)), iterator.next());
        Assert.assertEquals(new StructuralDiff(DiffTypeEnum.ADD,
                new Range(5, 5), new Range(7, 10)), iterator.next());

        event.convertToLocal(viewportLayer);

        columnDiffs = event.getColumnDiffs();
        Assert.assertNotNull(columnDiffs);
        Assert.assertEquals(3, columnDiffs.size());
        iterator = columnDiffs.iterator();
        Assert.assertEquals(new StructuralDiff(DiffTypeEnum.ADD,
                new Range(0, 0), new Range(0, 1)), iterator.next());
        Assert.assertEquals(new StructuralDiff(DiffTypeEnum.ADD,
                new Range(1, 1), new Range(2, 3)), iterator.next());
        Assert.assertEquals(new StructuralDiff(DiffTypeEnum.ADD,
                new Range(3, 3), new Range(5, 8)), iterator.next());
    }
View Full Code Here

        assertEquals(40, this.viewportLayer.getMinimumOrigin().getY());

        // since the RowHideShowLayer is involved in the current composition
        // the number of rows is cached and we need to update this before reset
        this.rowCount = 5;
        this.dataLayer.fireLayerEvent(new RowInsertEvent(this.dataLayer, new Range(0, 2)));
        reset();
    }
View Full Code Here

TOP

Related Classes of org.eclipse.nebula.widgets.nattable.coordinate.Range

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.