Class KeyUtils

java.lang.Object
nz.ac.waikato.cms.gui.core.KeyUtils

public class KeyUtils extends Object
A helper class for key events.
Version:
$Revision: 4584 $
Author:
fracpete (fracpete at waikato dot ac dot nz)
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static boolean
    Checks whether the key event was a "copy to clipboard" combination (Ctrl+C or Ctrl+Ins).
    static boolean
    Checks whether the key event was a "cut to clipboard" combination (Ctrl+X or Shift+Delete).
    static boolean
    Checks whether the key event was a "insert from clipboard" combination (Ctrl+V or Shift+Ins).

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • KeyUtils

      public KeyUtils()
  • Method Details

    • isCopy

      public static boolean isCopy(KeyEvent e)
      Checks whether the key event was a "copy to clipboard" combination (Ctrl+C or Ctrl+Ins).
      Parameters:
      e - the event
      Returns:
      true if a "copy" event
    • isCut

      public static boolean isCut(KeyEvent e)
      Checks whether the key event was a "cut to clipboard" combination (Ctrl+X or Shift+Delete).
      Parameters:
      e - the event
      Returns:
      true if a "cut" event
    • isPaste

      public static boolean isPaste(KeyEvent e)
      Checks whether the key event was a "insert from clipboard" combination (Ctrl+V or Shift+Ins).
      Parameters:
      e - the event
      Returns:
      true if a "paste" event