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

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


public class DefaultPrintBindings extends AbstractUiBindingConfiguration {

    @Override
    public void configureUiBindings(UiBindingRegistry uiBindingRegistry) {
        uiBindingRegistry.registerKeyBinding(
                new KeyEventMatcher(SWT.CTRL, 'p'), new PrintAction());
    }
View Full Code Here


public class KeyEventMatcherTest {

    @Test
    public void testEquals() {
        IKeyEventMatcher matcher1 = new KeyEventMatcher(12, 101);
        IKeyEventMatcher matcher2 = new KeyEventMatcher(12, 101);
        Assert.assertEquals(matcher1, matcher2);
    }
View Full Code Here

        Assert.assertEquals(matcher1, matcher2);
    }

    @Test
    public void testNotEqual() {
        IKeyEventMatcher matcher = new KeyEventMatcher(12, 101);

        Assert.assertFalse(matcher.equals(new KeyEventMatcher(11, 101)));
        Assert.assertFalse(matcher.equals(new KeyEventMatcher(12, 102)));

        Assert.assertFalse(matcher.equals(new KeyEventMatcher(11, 102)));
    }
View Full Code Here

    }

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

TOP

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

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.