예제 #1
0
 /**
  * Convenience method to create a key mask for menu's.
  *
  * @param aKeyStroke the key stroke to create a menu key mask for;
  * @param aMasks the (optional) mask modifiers to use.
  * @return a keystroke instance.
  */
 public static final KeyStroke createMenuKeyMask(final int aKeyStroke, final int... aMasks) {
   int modifiers = getMenuShortcutKeyMask();
   for (int aMask : aMasks) {
     modifiers |= aMask;
   }
   return KeyStroke.getKeyStroke(aKeyStroke, modifiers);
 }
예제 #2
0
 /**
  * Convenience method to create a key mask.
  *
  * @param aKeyStroke the key stroke to create a key mask for;
  * @param aMasks the (optional) mask modifiers to use.
  * @return a keystroke instance.
  */
 public static final KeyStroke createKeyMask(final int aKeyStroke, final int... aMasks) {
   int modifiers = 0;
   for (int aMask : aMasks) {
     modifiers |= aMask;
   }
   return KeyStroke.getKeyStroke(aKeyStroke, modifiers);
 }