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

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


    @Override
    public Collection<StructuralDiff> getColumnDiffs() {
        Collection<StructuralDiff> columnDiffs = new ArrayList<StructuralDiff>();

        for (Range range : getColumnPositionRanges()) {
            columnDiffs.add(new StructuralDiff(DiffTypeEnum.ADD, new Range(
                    range.start, range.start), range));
        }

        return columnDiffs;
    }
View Full Code Here


import org.eclipse.nebula.widgets.nattable.layer.ILayer;

public class RowUpdateEvent extends RowVisualChangeEvent {

    public RowUpdateEvent(ILayer layer, int rowPosition) {
        this(layer, new Range(rowPosition, rowPosition + 1));
    }
View Full Code Here

     *            The ILayer to which the given row position matches.
     * @param rowPosition
     *            The row position of the row that was inserted.
     */
    public RowInsertEvent(ILayer layer, int rowPosition) {
        this(layer, new Range(rowPosition, rowPosition + 1));
    }
View Full Code Here

    @Override
    public Collection<StructuralDiff> getRowDiffs() {
        Collection<StructuralDiff> rowDiffs = new ArrayList<StructuralDiff>();

        for (Range range : getRowPositionRanges()) {
            rowDiffs.add(new StructuralDiff(DiffTypeEnum.ADD, new Range(
                    range.start, range.start), range));
        }

        return rowDiffs;
    }
View Full Code Here

     *            The ILayer to which the given row position matches.
     * @param rowPosition
     *            The row position of the row that was deleted.
     */
    public RowDeleteEvent(ILayer layer, int rowPosition) {
        this(layer, new Range(rowPosition, rowPosition + 1));
    }
View Full Code Here

    public Collection<StructuralDiff> getRowDiffs() {
        Collection<StructuralDiff> rowDiffs = new ArrayList<StructuralDiff>();

        for (Range range : getRowPositionRanges()) {
            rowDiffs.add(new StructuralDiff(DiffTypeEnum.DELETE, range,
                    new Range(range.start, range.start)));
        }

        return rowDiffs;
    }
View Full Code Here

        model.addSelection(new Rectangle(10, 50, 5, 10));

        List<Range> selectedRows = ObjectUtils.asList(model
                .getSelectedRowPositions());

        assertTrue(selectedRows.contains(new Range(1, 3)));
        assertTrue(selectedRows.contains(new Range(7, 8)));
        assertTrue(selectedRows.contains(new Range(50, 60)));
    }
View Full Code Here

        List<Range> selectedRows = ObjectUtils.asList(model
                .getSelectedRowPositions());
        assertEquals(2, selectedRows.size());

        assertTrue(selectedRows.contains(new Range(3, 14)));
        assertTrue(selectedRows.contains(new Range(20, 30)));
    }
View Full Code Here

        List<Range> selectedRows = ObjectUtils.asList(model
                .getSelectedRowPositions());
        assertEquals(1, selectedRows.size());

        assertTrue(selectedRows.contains(new Range(1, 100)));
    }
View Full Code Here

        // delete rows in the middle
        contents.remove(1);
        contents.remove(1);
        underlyingLayer.fireLayerEvent(new RowDeleteEvent(underlyingLayer,
                new Range(1, 3)));

        assertEquals(2, rowReorderLayer.getRowCount());
        assertEquals(1, rowReorderLayer.getRowIndexByPosition(0));
        assertEquals(0, rowReorderLayer.getRowIndexByPosition(1));
        assertEquals(-1, rowReorderLayer.getRowIndexByPosition(2));
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.