Examples of usesShiftModifier()


Examples of java.awt.MenuShortcut.usesShiftModifier()

  public void test(TestHarness harness)
  {
    MenuShortcut m = new MenuShortcut(KeyEvent.VK_ENTER);
    harness.check(m.toString(), "Ctrl+Enter");
    harness.check(m.usesShiftModifier(), false);
   
    m = new MenuShortcut(KeyEvent.VK_BACK_SPACE, true);
    harness.check(m.toString(), "Ctrl+Shift+Backspace");
    harness.check(m.usesShiftModifier(), true);
   
View Full Code Here

Examples of java.awt.MenuShortcut.usesShiftModifier()

    harness.check(m.toString(), "Ctrl+Enter");
    harness.check(m.usesShiftModifier(), false);
   
    m = new MenuShortcut(KeyEvent.VK_BACK_SPACE, true);
    harness.check(m.toString(), "Ctrl+Shift+Backspace");
    harness.check(m.usesShiftModifier(), true);
   
    m = new MenuShortcut(KeyEvent.VK_TAB);
    harness.check(m.toString(), "Ctrl+Tab");
   
    m = new MenuShortcut(KeyEvent.VK_CANCEL);
View Full Code Here

Examples of java.awt.MenuShortcut.usesShiftModifier()

                    .hasMoreElements();) {
                MenuShortcut shortcut = shortcuts.nextElement();

                // is this keyPress the same as a menu accelerator?
                if ((shortcut.getKey() == ev.getKeyCode())
                        && (shortcut.usesShiftModifier() == ev.isShiftDown())) {
                    // fire off the menu action event if the menu is active
                    if (getShortcutMenuItem(shortcut).isEnabled()) {
                        actionPerformed(new ActionEvent(this, 1,
                                getShortcutMenuItem(shortcut)
                                        .getActionCommand()));
View Full Code Here

Examples of java.awt.MenuShortcut.usesShiftModifier()

    @Override
  @SuppressWarnings("boxing")
  protected Expression instantiate(Object oldInstance, Encoder enc) {
    MenuShortcut shortcut = (MenuShortcut) oldInstance;
    int keyCode = shortcut.getKey();
    boolean useShiftModifier = shortcut.usesShiftModifier();
    return new Expression(shortcut, shortcut.getClass(),
                Statement.CONSTRUCTOR_NAME, new Object[] {keyCode, useShiftModifier});
  }

}
View Full Code Here

Examples of java.awt.MenuShortcut.usesShiftModifier()

  @Override
  protected Expression instantiate(Object oldInstance, Encoder enc)
  {
    MenuShortcut shortcut = (MenuShortcut) oldInstance;
    int keyCode = shortcut.getKey();
    boolean useShiftModifier = shortcut.usesShiftModifier();
    return new Expression(shortcut, shortcut.getClass(), BeansUtils.NEW, new Object[] { keyCode, useShiftModifier });
  }
}
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.