Search in sources :

Example 1 with IKeyEventMatcher

use of org.eclipse.nebula.widgets.nattable.ui.matcher.IKeyEventMatcher in project nebula.widgets.nattable by eclipse.

the class KeyEventMatcherTest method testMap.

@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());
}
Also used : KeyEventMatcher(org.eclipse.nebula.widgets.nattable.ui.matcher.KeyEventMatcher) IKeyEventMatcher(org.eclipse.nebula.widgets.nattable.ui.matcher.IKeyEventMatcher) IKeyEventMatcher(org.eclipse.nebula.widgets.nattable.ui.matcher.IKeyEventMatcher) HashMap(java.util.HashMap) Test(org.junit.Test)

Example 2 with IKeyEventMatcher

use of org.eclipse.nebula.widgets.nattable.ui.matcher.IKeyEventMatcher in project nebula.widgets.nattable by eclipse.

the class KeyEventMatcherTest method testNotEqual.

@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)));
}
Also used : KeyEventMatcher(org.eclipse.nebula.widgets.nattable.ui.matcher.KeyEventMatcher) IKeyEventMatcher(org.eclipse.nebula.widgets.nattable.ui.matcher.IKeyEventMatcher) IKeyEventMatcher(org.eclipse.nebula.widgets.nattable.ui.matcher.IKeyEventMatcher) Test(org.junit.Test)

Example 3 with IKeyEventMatcher

use of org.eclipse.nebula.widgets.nattable.ui.matcher.IKeyEventMatcher in project nebula.widgets.nattable by eclipse.

the class KeyEventMatcherTest method testEquals.

@Test
public void testEquals() {
    IKeyEventMatcher matcher1 = new KeyEventMatcher(12, 101);
    IKeyEventMatcher matcher2 = new KeyEventMatcher(12, 101);
    Assert.assertEquals(matcher1, matcher2);
}
Also used : KeyEventMatcher(org.eclipse.nebula.widgets.nattable.ui.matcher.KeyEventMatcher) IKeyEventMatcher(org.eclipse.nebula.widgets.nattable.ui.matcher.IKeyEventMatcher) IKeyEventMatcher(org.eclipse.nebula.widgets.nattable.ui.matcher.IKeyEventMatcher) Test(org.junit.Test)

Aggregations

IKeyEventMatcher (org.eclipse.nebula.widgets.nattable.ui.matcher.IKeyEventMatcher)3 KeyEventMatcher (org.eclipse.nebula.widgets.nattable.ui.matcher.KeyEventMatcher)3 Test (org.junit.Test)3 HashMap (java.util.HashMap)1