Package org.eclipse.nebula.widgets.nattable.ui.matcher

Examples of org.eclipse.nebula.widgets.nattable.ui.matcher.CellLabelMouseEventMatcher.matches()


    @Test
    public void shouldMatchCellsWithCustomLabels() throws Exception {
        CellLabelMouseEventMatcher matcher = new CellLabelMouseEventMatcher(
                GridRegion.BODY, MouseEventMatcher.LEFT_BUTTON, TEST_LABEL);

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

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


    public void shouldTakeTheRegionIntoAccountWhileMatching() throws Exception {
        CellLabelMouseEventMatcher matcher = new CellLabelMouseEventMatcher(
                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

    @Test
    public void shouldTakeTheButtomIntoAccountWhileMatching() throws Exception {
        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

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.