Examples of HideColumnPositionsEvent


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

        ILayerEvent event;
        if (wasCollapsed) {
            event = new ShowColumnPositionsEvent(
                    columnGroupExpandCollapseLayer, columnIndexes);
        } else {
            event = new HideColumnPositionsEvent(
                    columnGroupExpandCollapseLayer, columnIndexes);
        }

        columnGroupExpandCollapseLayer.fireLayerEvent(event);
View Full Code Here

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

                            .valueOf(getColumnIndexByPosition(columnPosition
                                    .intValue())));
        }
        hiddenColumnIndexes.addAll(columnIndexes);
        invalidateCache();
        fireLayerEvent(new HideColumnPositionsEvent(this, columnPositions));
    }
View Full Code Here

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

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

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

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

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

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

        natTable.doCommand(new ColumnHideCommand(natTable, 6));

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

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

        // View port adjusted origin to move an extra column in
        Range hiddenRange = hideEvent.getColumnPositionRanges().iterator()
                .next();
        assertEquals(7, hiddenRange.start);
        assertEquals(8, 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.