Package org.eclipse.nebula.widgets.nattable.layer

Examples of org.eclipse.nebula.widgets.nattable.layer.LabelStack


                GridRegion.COLUMN_HEADER, MouseEventMatcher.LEFT_BUTTON,
                TEST_LABEL);

        boolean match = matcher.matches(natTableFixture, new MouseEvent(
                SWTUtils.getLeftClickEvent(100, 100, 0, natTableFixture)),
                new LabelStack(GridRegion.BODY));

        Assert.assertFalse(match);
    }
View Full Code Here


        CellLabelMouseEventMatcher matcher = new CellLabelMouseEventMatcher(
                GridRegion.BODY, MouseEventMatcher.RIGHT_BUTTON, TEST_LABEL);

        boolean match = matcher.matches(natTableFixture, new MouseEvent(
                SWTUtils.getLeftClickEvent(100, 100, 0, natTableFixture)),
                new LabelStack(GridRegion.BODY));

        Assert.assertFalse(match);
    }
View Full Code Here

    public void shouldReturnTheBlinkConfigTypeWhenARowIsUpdated()
            throws Exception {
        layerUnderTest.setBlinkDurationInMilis(100);

        dataList.get(0).setAsk_price(100);
        LabelStack blinkLabels = layerUnderTest.getConfigLabelsByPosition(6, 0);

        // Blink started
        assertEquals(1, blinkLabels.getLabels().size());
        assertEquals(BLINKING_LABEL, blinkLabels.getLabels().get(0));

        // After 50 ms
        Thread.sleep(50);
        blinkLabels = layerUnderTest.getConfigLabelsByPosition(6, 0);
        assertEquals(1, blinkLabels.getLabels().size());

        // Wait for blink to elapse
        Thread.sleep(110);
        // Force running the event queue to ensure any Display.asyncExecs are
        // run.
        while (display.readAndDispatch())
            ;

        blinkLabels = layerUnderTest.getConfigLabelsByPosition(6, 0);
        assertEquals(0, blinkLabels.getLabels().size());
    }
View Full Code Here

        });

        layerUnderTest.setBlinkDurationInMilis(100);

        dataList.get(0).setAsk_price(100);
        LabelStack blinkLabels = layerUnderTest.getConfigLabelsByPosition(6, 0);

        // Blink started
        assertEquals(2, blinkLabels.getLabels().size());
        assertEquals(BLINKING_LABEL, blinkLabels.getLabels().get(0));
        assertEquals(TEST_LABEL, blinkLabels.getLabels().get(1));

        // After 50 ms
        Thread.sleep(50);
        blinkLabels = layerUnderTest.getConfigLabelsByPosition(6, 0);
        assertEquals(2, blinkLabels.getLabels().size());

        // Wait for blink to elapse
        Thread.sleep(110);
        // Force running the event queue to ensure any Display.asyncExecs are
        // run.
        while (display.readAndDispatch())
            ;

        blinkLabels = layerUnderTest.getConfigLabelsByPosition(6, 0);
        assertEquals(1, blinkLabels.getLabels().size());
        assertEquals(TEST_LABEL, blinkLabels.getLabels().get(0));
    }
View Full Code Here

                .getChildLayerByLayoutCoordinate(1, 0);

        // Since I selected using grid coordinates, the column position should
        // be 1 rather than 2
        int columnPosition = gridLayer.localToUnderlyingColumnPosition(2);
        final LabelStack labelStack = columnHeaderLayer
                .getConfigLabelsByPosition(columnPosition, 0);

        Assert.assertTrue(labelStack
                .hasLabel(SelectionStyleLabels.COLUMN_FULLY_SELECTED_STYLE));

        columnPosition = gridLayer.localToUnderlyingColumnPosition(3);
        Assert.assertFalse(SelectionStyleLabels.COLUMN_FULLY_SELECTED_STYLE
                .equals(labelStack));
View Full Code Here

TOP

Related Classes of org.eclipse.nebula.widgets.nattable.layer.LabelStack

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.