Package javax.swing

Examples of javax.swing.InputMap.allKeys()


  {
    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 void test(TestHarness harness) {
          InputMap map = new InputMap();
          if (map.keys() != null)
            harness.fail("New InputMap should return null for keys()");
          if (map.allKeys() != null)
            harness.fail("New ActionMap should return null for allKeys()");
  }

}
View Full Code Here

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

  {
    InputMap m = new InputMap();
    harness.check(m.allKeys(), null);
    KeyStroke ks1 = KeyStroke.getKeyStroke('a');
    m.put(ks1, "AAA");
    KeyStroke[] keys = m.allKeys();
    harness.check(keys.length, 1);
    harness.check(keys[0], ks1);
   
    InputMap p = new InputMap();
    m.setParent(p);
View Full Code Here

        UIManager.getDefaults().put(key, new Object[] { "shift ESCAPE", "showSystemMenu" });
        ui.setupMenuOpenKey();
        final InputMap uiInputMap = SwingUtilities.getUIInputMap(frame,
                JComponent.WHEN_IN_FOCUSED_WINDOW);
        assertNotNull("inputMap installed", uiInputMap);
        assertEquals(1, uiInputMap.allKeys().length);
       
        // Regression test for HARMONY-2709
        try {
            new BasicInternalFrameUI(null).setupMenuOpenKey();
            fail("NPE expected");
View Full Code Here

        UIManager.getDefaults().put(key, new Object[] { "shift ESCAPE", "showSystemMenu" });
        ui.setupMenuOpenKey();
        final InputMap uiInputMap = SwingUtilities.getUIInputMap(frame,
                JComponent.WHEN_IN_FOCUSED_WINDOW);
        assertNotNull("inputMap installed", uiInputMap);
        assertEquals(1, uiInputMap.allKeys().length);
       
        // Regression test for HARMONY-2709
        try {
            new BasicInternalFrameUI(null).setupMenuOpenKey();
            fail("NPE expected");
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.