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

Examples of org.eclipse.nebula.widgets.nattable.ui.matcher.MouseEventMatcher


        // Mouse move - Show resize cursor
        uiBindingRegistry.registerFirstMouseMoveBinding(
                new ColumnResizeEventMatcher(SWT.NONE,
                        GridRegion.COLUMN_HEADER, 0),
                new ColumnResizeCursorAction());
        uiBindingRegistry.registerMouseMoveBinding(new MouseEventMatcher(),
                new ClearCursorAction());

        // Column resize
        uiBindingRegistry.registerFirstMouseDragMode(
                new ColumnResizeEventMatcher(SWT.NONE,
View Full Code Here


    public void configureUiBindings(UiBindingRegistry uiBindingRegistry) {
        // Mouse move - Show resize cursor
        uiBindingRegistry.registerFirstMouseMoveBinding(
                new RowResizeEventMatcher(SWT.NONE, 0),
                new RowResizeCursorAction());
        uiBindingRegistry.registerMouseMoveBinding(new MouseEventMatcher(),
                new ClearCursorAction());

        // Row resize
        uiBindingRegistry.registerFirstMouseDragMode(new RowResizeEventMatcher(
                SWT.NONE, 1), new RowResizeDragMode());
View Full Code Here

        natTable.addConfiguration(new AbstractUiBindingConfiguration() {
            @Override
            public void configureUiBindings(UiBindingRegistry uiBindingRegistry) {
                uiBindingRegistry.registerMouseMoveBinding(
                        new MouseEventMatcher(GridRegion.BODY),
                        new ClearHoverStylingAction());
            }
        });

        // add the style configuration for hover
View Full Code Here

        natTable.addConfiguration(new AbstractUiBindingConfiguration() {
            @Override
            public void configureUiBindings(UiBindingRegistry uiBindingRegistry) {
                uiBindingRegistry.registerFirstMouseDownBinding(
                        new MouseEventMatcher(SWT.NONE,
                                GridRegion.COLUMN_GROUP_HEADER,
                                MouseEventMatcher.RIGHT_BUTTON),
                        new PopupMenuAction(columnGroupHeaderMenu));
            }
        });
View Full Code Here

        natTable.addConfiguration(new AbstractUiBindingConfiguration() {
            @Override
            public void configureUiBindings(UiBindingRegistry uiBindingRegistry) {
                uiBindingRegistry.registerFirstMouseDownBinding(
                        new MouseEventMatcher(SWT.NONE,
                                GridRegion.COLUMN_GROUP_HEADER,
                                MouseEventMatcher.RIGHT_BUTTON),
                        new PopupMenuAction(columnGroupHeaderMenu));
            }
        });
View Full Code Here

        @Override
        public void configureUiBindings(UiBindingRegistry uiBindingRegistry) {
            if (this.bodyMenu != null) {
                uiBindingRegistry.registerMouseDownBinding(
                        new MouseEventMatcher(SWT.NONE, null,
                                MouseEventMatcher.RIGHT_BUTTON),
                        new PopupMenuAction(this.bodyMenu));
            }
        }
View Full Code Here

public class MouseEventMatcherTest {

    @Test
    public void testDefaultEquals() {
        IMouseEventMatcher matcher1 = new MouseEventMatcher();
        IMouseEventMatcher matcher2 = new MouseEventMatcher();
        Assert.assertEquals(matcher1, matcher2);
    }
View Full Code Here

        Assert.assertEquals(matcher1, matcher2);
    }

    @Test
    public void testFullConstructorEquals() {
        IMouseEventMatcher matcher1 = new MouseEventMatcher(5, "Test_Region", 1);
        IMouseEventMatcher matcher2 = new MouseEventMatcher(5, "Test_Region", 1);
        Assert.assertEquals(matcher1, matcher2);
    }
View Full Code Here

        Assert.assertEquals(matcher1, matcher2);
    }

    @Test
    public void testNotEqual() {
        IMouseEventMatcher matcher = new MouseEventMatcher(5, "Test_Region", 1);

        Assert.assertFalse(matcher.equals(new MouseEventMatcher(4,
                "Test_Region", 1)));
        Assert.assertFalse(matcher.equals(new MouseEventMatcher(5, "X_Region",
                1)));
        Assert.assertFalse(matcher.equals(new MouseEventMatcher(5,
                "Test_Region", 2)));

        Assert.assertFalse(matcher.equals(new MouseEventMatcher(4, "X_Region",
                2)));
    }
View Full Code Here

    }

    @Test
    public void testMap() {
        Map<IMouseEventMatcher, String> map = new HashMap<IMouseEventMatcher, String>();
        map.put(new MouseEventMatcher(), "ABC");
        Assert.assertEquals(1, map.size());
        map.remove(new MouseEventMatcher());
        Assert.assertEquals(0, map.size());
    }
View Full Code Here

TOP

Related Classes of org.eclipse.nebula.widgets.nattable.ui.matcher.MouseEventMatcher

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.