Examples of ViewportLayerFixture


Examples of org.eclipse.nebula.widgets.nattable.test.fixture.layer.ViewportLayerFixture

                .getStartYOfRowPosition(10)));
    }

    @Test
    public void adjustColOrigin() throws Exception {
        this.viewportLayer = new ViewportLayerFixture(10, 20, 50, 20);
        // Default client area: width 200, height 100
        assertEquals(4, this.viewportLayer.getColumnCount());

        this.viewportLayer.setOriginX(this.viewportLayer.getStartXOfColumnPosition(4));
        assertEquals(4, this.viewportLayer.getColumnIndexByPosition(0));
View Full Code Here

Examples of org.eclipse.nebula.widgets.nattable.test.fixture.layer.ViewportLayerFixture

    private VerticalScrollBarHandler scrollHandler;
    private ScrollBar scrollBar;

    @Before
    public void init() {
        viewport = new ViewportLayerFixture();
        scrollBar = ViewportLayerFixture.DEFAULT_SCROLLABLE.getVerticalBar();
        scrollHandler = new VerticalScrollBarHandler(viewport, scrollBar);

        assertEquals(0, viewport.getRowIndexByPosition(0));
        assertEquals(1, viewport.getRowIndexByPosition(1));
View Full Code Here

Examples of org.eclipse.nebula.widgets.nattable.test.fixture.layer.ViewportLayerFixture

        assertEquals(1, viewport.getRowIndexByPosition(0));
    }

    @Test
    public void verticalScrollbarThumbSize() throws Exception {
        viewport = new ViewportLayerFixture(new Rectangle(0, 0, 250, 100));
        scrollHandler = new VerticalScrollBarHandler(viewport, scrollBar);

        assertEquals(250, viewport.getWidth());
        scrollHandler.recalculateScrollBarSize();
View Full Code Here

Examples of org.eclipse.nebula.widgets.nattable.test.fixture.layer.ViewportLayerFixture

    }

    @Test
    public void verticalScrollbarThumbSizeCalcNoScrollingNeeded()
            throws Exception {
        viewport = new ViewportLayerFixture(new Rectangle(0, 0, 500, 500));
        scrollHandler = new VerticalScrollBarHandler(viewport, scrollBar);

        assertEquals(465, viewport.getWidth());
        assertEquals(465, viewport.getWidth());
View Full Code Here

Examples of org.eclipse.nebula.widgets.nattable.test.fixture.layer.ViewportLayerFixture

    private ScrollBar scrollBar;
    private HorizontalScrollBarHandler scrollHandler;

    @Before
    public void init() {
        viewport = new ViewportLayerFixture();
        scrollBar = ViewportLayerFixture.DEFAULT_SCROLLABLE.getHorizontalBar();
        scrollHandler = new HorizontalScrollBarHandler(viewport, scrollBar);

        assertEquals(0, viewport.getColumnIndexByPosition(0));
        assertEquals(1, viewport.getColumnIndexByPosition(1));
View Full Code Here

Examples of org.eclipse.nebula.widgets.nattable.test.fixture.layer.ViewportLayerFixture

     *
     * COLUMNS 0 1 |------|------| 250 250
     */
    @Test
    public void issueNTBL99MoveByColumn() throws Exception {
        viewport = new ViewportLayerFixture(2, 1, 250, 40);
        scrollHandler = new HorizontalScrollBarHandler(viewport, scrollBar);

        assertEquals(200, viewport.getClientAreaWidth());
        assertEquals(1, viewport.getColumnCount());

View Full Code Here

Examples of org.eclipse.nebula.widgets.nattable.test.fixture.layer.ViewportLayerFixture

        assertEquals(1, viewport.getColumnIndexByPosition(0));
    }

    @Test
    public void issueNTBL99MoveByPage() throws Exception {
        viewport = new ViewportLayerFixture(2, 1, 250, 40);
        scrollHandler = new HorizontalScrollBarHandler(viewport, scrollBar);

        assertEquals(200, viewport.getClientAreaWidth());
        assertEquals(1, viewport.getColumnCount());
View Full Code Here

Examples of org.eclipse.nebula.widgets.nattable.test.fixture.layer.ViewportLayerFixture

        assertEquals(0, viewport.getColumnIndexByPosition(0));
    }

    @Test
    public void horizontalScrollbarThumbSize() throws Exception {
        viewport = new ViewportLayerFixture(new Rectangle(0, 0, 250, 100));
        scrollHandler = new HorizontalScrollBarHandler(viewport, scrollBar);

        assertEquals(250, viewport.getWidth());
        scrollHandler.recalculateScrollBarSize();
View Full Code Here

Examples of org.eclipse.nebula.widgets.nattable.test.fixture.layer.ViewportLayerFixture

    }

    @Test
    public void horizontalScrollbarThumbSizeCalcNoScrollingNeeded()
            throws Exception {
        viewport = new ViewportLayerFixture(new Rectangle(0, 0, 500, 500));
        scrollHandler = new HorizontalScrollBarHandler(viewport, scrollBar);

        scrollHandler.recalculateScrollBarSize();
        assertEquals(465, viewport.getWidth());
View Full Code Here

Examples of org.eclipse.nebula.widgets.nattable.test.fixture.layer.ViewportLayerFixture

    protected ViewportLayer viewportLayer;
    protected LayerListenerFixture layerListener;

    @Before
    public void setup() {
        this.viewportLayer = new ViewportLayerFixture();
        this.layerListener = new LayerListenerFixture();
    }
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.