Package javax.swing

Examples of javax.swing.InputMap.keys()


    InputMap m1 = mb.getInputMap(JComponent.WHEN_FOCUSED);
    harness.check(m1.keys(), null);
    InputMap m1p = m1.getParent();
    harness.check(m1p, null);
    InputMap m2 = mb.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);  
    harness.check(m2.keys(), null);
    harness.check(m2.getParent(), null);
    InputMap m3 = mb.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW);
    harness.check(m3.keys(), null);
    InputMap m3p = m3.getParent();
    harness.check(m3p.get(KeyStroke.getKeyStroke("pressed F10")), "takeFocus");
View Full Code Here


    harness.check(m1p, null);
    InputMap m2 = mb.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);  
    harness.check(m2.keys(), null);
    harness.check(m2.getParent(), null);
    InputMap m3 = mb.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW);
    harness.check(m3.keys(), null);
    InputMap m3p = m3.getParent();
    harness.check(m3p.get(KeyStroke.getKeyStroke("pressed F10")), "takeFocus");
  }
}
View Full Code Here

  public void test(TestHarness harness)
  {
    InputMap m = new InputMap();
    harness.check(m.size(), 0);
    harness.check(m.getParent(), null);
    harness.check(m.keys(), null);
    harness.check(m.allKeys(), null);
  }
}
View Full Code Here

public class keys implements Testlet
{
  public void test(TestHarness harness)
  {
    InputMap map = new InputMap();
    KeyStroke[] k = map.keys();
    harness.check(k, null);
    map.put(KeyStroke.getKeyStroke('a'), "AAA");
    k = map.keys();
    harness.check(k.length, 1);
    harness.check(k[0], KeyStroke.getKeyStroke('a'));
View Full Code Here

  {
    InputMap map = new InputMap();
    KeyStroke[] k = map.keys();
    harness.check(k, null);
    map.put(KeyStroke.getKeyStroke('a'), "AAA");
    k = map.keys();
    harness.check(k.length, 1);
    harness.check(k[0], KeyStroke.getKeyStroke('a'));
    map.put(KeyStroke.getKeyStroke('b'), "BBB");
    k = map.keys();
    harness.check(k.length, 2);
View Full Code Here

    map.put(KeyStroke.getKeyStroke('a'), "AAA");
    k = map.keys();
    harness.check(k.length, 1);
    harness.check(k[0], KeyStroke.getKeyStroke('a'));
    map.put(KeyStroke.getKeyStroke('b'), "BBB");
    k = map.keys();
    harness.check(k.length, 2);
    harness.check(k[1], KeyStroke.getKeyStroke('b'));
    map.put(KeyStroke.getKeyStroke('b'), null);
    k = map.keys();
    harness.check(k.length, 1);
View Full Code Here

    harness.check(m1p.get(KeyStroke.getKeyStroke("pressed PAGE_UP")),
            "scrollUp");
    harness.check(m1p.get(KeyStroke.getKeyStroke("pressed PASTE")), "paste");
    InputMap m2 = list.getInputMap(
            JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);  
    harness.check(m2.keys(), null);
    harness.check(m2.getParent(), null);
    InputMap m3 = list.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW);
    harness.check(m3.keys(), null);
    harness.check(m3.getParent(), null);
  }
View Full Code Here

    InputMap m2 = list.getInputMap(
            JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);  
    harness.check(m2.keys(), null);
    harness.check(m2.getParent(), null);
    InputMap m3 = list.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW);
    harness.check(m3.keys(), null);
    harness.check(m3.getParent(), null);
  }
}
View Full Code Here

    map.put(KeyStroke.getKeyStroke('b'), "BBB");
    k = map.keys();
    harness.check(k.length, 2);
    harness.check(k[1], KeyStroke.getKeyStroke('b'));
    map.put(KeyStroke.getKeyStroke('b'), null);
    k = map.keys();
    harness.check(k.length, 1);
    harness.check(k[0], KeyStroke.getKeyStroke('a'));   
    map.clear();
    k = map.keys();
    harness.check(k.length, 0);
View Full Code Here

    map.put(KeyStroke.getKeyStroke('b'), null);
    k = map.keys();
    harness.check(k.length, 1);
    harness.check(k[0], KeyStroke.getKeyStroke('a'));   
    map.clear();
    k = map.keys();
    harness.check(k.length, 0);
   
    // check that no keys from the parent are used
    InputMap p = new InputMap();
    p.put(KeyStroke.getKeyStroke('z'), "ZZZ");
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.