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);
        underlyingLayer.fireLayerEvent(new ColumnDeleteEvent(underlyingLayer,
                new Range(1, 3)));

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


            selectionLayer.selectCell(0, rowPosition, withShiftMask,
                    withControlMask);
            selectionLayer.selectRegion(0, rowPosition,
                    selectionLayer.getColumnCount(), rowCount);
            changedRowRanges
                    .add(new Range(rowPosition, rowPosition + rowCount));
        } else if (isControlOnly(withShiftMask, withControlMask)) {
            changedRowRanges.add(selectRowWithCtrlKey(columnPosition,
                    rowPosition, rowCount));
        } else if (isShiftOnly(withShiftMask, withControlMask)) {
            changedRowRanges.add(selectRowWithShiftKey(columnPosition,
View Full Code Here

            }
            selectionLayer.selectRegion(0, rowPosition,
                    selectionLayer.getColumnCount(), rowCount);
        }

        return new Range(rowPosition, rowPosition + 1);
    }
View Full Code Here

                    i = ObjectUtils.getLastElement(rowPositions);
                }
            }

        }
        return new Range(rowPosition, rowPosition + 1);
    }
View Full Code Here

            // layer.
            // Without that fix a bunch of ranges of kind Range [-1, 180] which
            // causes strange behaviour in Freeze- and other Layers were
            // returned.
            if (startColumnPosition > -1) {
                localColumnPositionRanges.add(new Range(startColumnPosition,
                        endColumnPosition));
            }
        }

        return localColumnPositionRanges;
View Full Code Here

import org.eclipse.nebula.widgets.nattable.layer.event.ColumnVisualChangeEvent;

public class ColumnHeaderSelectionEvent extends ColumnVisualChangeEvent {

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

            // layer.
            // Without that fix a bunch of ranges of kind Range [-1, 180] which
            // causes strange behaviour in Freeze- and other Layers were
            // returned.
            if (startRowPosition > -1) {
                localRowPositionRanges.add(new Range(startRowPosition,
                        endRowPosition));
            }
        }

        return localRowPositionRanges;
View Full Code Here

    public void shouldClearSelectionIfListIsCleared() {
        selectionModel.addSelection(3, 4);

        SelectionLayerStructuralChangeEventHandler handler = new SelectionLayerStructuralChangeEventHandler(
                selectionLayer);
        handler.handleLayerEvent(new RowDeleteEvent(dataLayer, new Range(0, 9)));

        Assert.assertTrue(selectionModel.isEmpty());
    }
View Full Code Here

                .toString());
        assertEquals("B Ford Motor", getSelected().getSecurity_description());
    }

    private RowDataFixture getSelected() {
        Range selection = selectionLayer.getSelectedRowPositions().iterator()
                .next();
        return listFixture.get(selection.start);
    }
View Full Code Here

        Collection<StructuralDiff> columnDiffs = event.getColumnDiffs();
        Assert.assertNotNull(columnDiffs);
        Assert.assertEquals(2, columnDiffs.size());
        Iterator<StructuralDiff> iterator = columnDiffs.iterator();
        Assert.assertEquals(new StructuralDiff(DiffTypeEnum.DELETE, new Range(
                2, 5), new Range(2, 2)), iterator.next());
        Assert.assertEquals(new StructuralDiff(DiffTypeEnum.ADD,
                new Range(7, 7), new Range(4, 7)), iterator.next());
    }
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.