Examples of HideRowPositionsEvent


Examples of org.eclipse.nebula.widgets.nattable.hideshow.event.HideRowPositionsEvent

        ILayerEvent event;
        if (wasCollapsed) {
            event = new ShowRowPositionsEvent(rowGroupExpandCollapseLayer,
                    rowPositions);
        } else {
            event = new HideRowPositionsEvent(rowGroupExpandCollapseLayer,
                    rowPositions);
        }

        rowGroupExpandCollapseLayer.fireLayerEvent(event);
View Full Code Here

Examples of org.eclipse.nebula.widgets.nattable.hideshow.event.HideRowPositionsEvent

        for (Integer rowPosition : rowPositions) {
            rowIndexes.add(getRowIndexByPosition(rowPosition));
        }
        hiddenRowIndexes.addAll(rowIndexes);
        invalidateCache();
        fireLayerEvent(new HideRowPositionsEvent(this, rowPositions));
    }
View Full Code Here

Examples of org.eclipse.nebula.widgets.nattable.hideshow.event.HideRowPositionsEvent

        for (Integer rowIndex : rowIndexes) {
            rowPositions.add(getRowPositionByIndex(rowIndex));
        }
        hiddenRowIndexes.addAll(rowIndexes);
        invalidateCache();
        fireLayerEvent(new HideRowPositionsEvent(this, rowPositions));
    }
View Full Code Here

Examples of org.eclipse.nebula.widgets.nattable.hideshow.event.HideRowPositionsEvent

        rows.add(5);
        rows.add(6);
        rows.add(7);
        rows.add(8);
        rows.add(9);
        handler.handleLayerEvent(new HideRowPositionsEvent(dataLayer, rows));

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

Examples of org.eclipse.nebula.widgets.nattable.hideshow.event.HideRowPositionsEvent

                rowPositions.add(rowPos);
            }
        }
        this.hiddenRowIndexes.addAll(rowIndexes);
        invalidateCache();
        fireLayerEvent(new HideRowPositionsEvent(this, rowPositions));
    }
View Full Code Here

Examples of org.eclipse.nebula.widgets.nattable.hideshow.event.HideRowPositionsEvent

                rowPositions.add(rowPos);
            }
        }
        this.hiddenRowIndexes.addAll(rowIndexes);
        invalidateCache();
        fireLayerEvent(new HideRowPositionsEvent(this, rowPositions));
    }
View Full Code Here

Examples of org.eclipse.nebula.widgets.nattable.hideshow.event.HideRowPositionsEvent

        // Grid coordinates
        natTable.doCommand(new RowHideCommand(natTable, 5));

        assertEquals(1, listener.getReceivedEvents().size());
        HideRowPositionsEvent hideEvent = (HideRowPositionsEvent) listener
                .getReceivedEvents().get(0);

        Range range = hideEvent.getRowPositionRanges().iterator().next();
        assertEquals(5, range.start);
        assertEquals(6, range.end);

        // The range Before hide: 5 -> 6
        // The range After hide: 5 -> 5 (row is not there anymore)
        StructuralDiff rowDiff = hideEvent.getRowDiffs().iterator().next();
        assertEquals(5, rowDiff.getBeforePositionRange().start);
        assertEquals(6, rowDiff.getBeforePositionRange().end);
        assertEquals(5, rowDiff.getAfterPositionRange().start);
        assertEquals(5, rowDiff.getAfterPositionRange().end);
    }
View Full Code Here

Examples of org.eclipse.nebula.widgets.nattable.hideshow.event.HideRowPositionsEvent

        natTable.doCommand(new RowHideCommand(natTable, 5));

        // Assert event received
        assertNotNull(natTableListener
                .getReceivedEvent(HideRowPositionsEvent.class));
        HideRowPositionsEvent hideEvent = (HideRowPositionsEvent) natTableListener
                .getReceivedEvent(HideRowPositionsEvent.class);

        // When last row is hidden it is not carrying the following info
        assertEquals(1, hideEvent.getRowPositionRanges().size());

        // View port adjusted origin to move an extra row in
        Range hiddenRange = hideEvent.getRowPositionRanges().iterator().next();
        assertEquals(6, hiddenRange.start);
        assertEquals(7, hiddenRange.end);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.