Package org.eclipse.nebula.widgets.nattable.resize.event

Examples of org.eclipse.nebula.widgets.nattable.resize.event.ColumnResizeEvent


                    command.getColumnWidth(columnPosition), false);
        }

        List<Range> ranges = PositionUtil.getRanges(columnPositions);
        for (Range range : ranges) {
            dataLayer.fireLayerEvent(new ColumnResizeEvent(dataLayer, range));
        }

        return true;
    }
View Full Code Here


    public void setColumnWidthByPosition(int columnPosition, int width,
            boolean fireEvent) {
        this.columnWidthConfig.setSize(columnPosition, width);
        if (fireEvent)
            fireLayerEvent(new ColumnResizeEvent(this, columnPosition));
    }
View Full Code Here

            fireLayerEvent(new ColumnResizeEvent(this, columnPosition));
    }

    public void setColumnWidthPercentageByPosition(int columnPosition, int width) {
        this.columnWidthConfig.setPercentage(columnPosition, width);
        fireLayerEvent(new ColumnResizeEvent(this, columnPosition));
    }
View Full Code Here

            fireLayerEvent(new RowResizeEvent(this, rowPosition));
    }

    public void setRowHeightPercentageByPosition(int rowPosition, int height) {
        this.rowHeightConfig.setPercentage(rowPosition, height);
        fireLayerEvent(new ColumnResizeEvent(this, rowPosition));
    }
View Full Code Here

        dataLayer.addLayerListener(firstListener);
    }

    @Test
    public void testFireOriginalEventIfOnlyOneListener() {
        ILayerEvent event = new ColumnResizeEvent(dataLayer, 2);
        dataLayer.fireLayerEvent(event);

        List<ILayerEvent> receivedEvents = firstListener.getReceivedEvents();
        assertNotNull(receivedEvents);
        assertEquals(1, receivedEvents.size());
View Full Code Here

    @Test
    public void testFireClonedEventIfMultipleListeners() {
        LayerListenerFixture secondListener = new LayerListenerFixture();
        dataLayer.addLayerListener(secondListener);

        ILayerEvent event = new ColumnResizeEvent(dataLayer, 2);
        dataLayer.fireLayerEvent(event);

        List<ILayerEvent> receivedEvents = firstListener.getReceivedEvents();
        assertNotNull(receivedEvents);
        assertEquals(1, receivedEvents.size());
View Full Code Here

        layerListener = new LayerListenerFixture();
        dataLayer.addLayerListener(layerListener);
        dataLayer.setColumnWidthByPosition(2, 200);

        // This is the propagated event
        ColumnResizeEvent columnResizeEvent = (ColumnResizeEvent) layerListener
                .getReceivedEvents().get(0);
        Collection<Rectangle> actualRectangles = columnResizeEvent
                .getChangedPositionRectangles();

        // The affected region should have the following size
        Rectangle expectedRectangle = new Rectangle(2, 0, 3, 7);
        Assert.assertEquals(expectedRectangle, actualRectangles.iterator()
View Full Code Here

            }

        });
        viewportLayer.setOriginX(viewportLayer.getStartXOfColumnPosition(2));
        viewportLayer.setOriginY(viewportLayer.getStartYOfRowPosition(2));
        event = new ColumnResizeEvent(dataLayer, 2);
    }
View Full Code Here

TOP

Related Classes of org.eclipse.nebula.widgets.nattable.resize.event.ColumnResizeEvent

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.