Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Eclipse GEF
3.3

org.eclipse.gef
Class KeyStroke

java.lang.Object
  extended by
org.eclipse.gef.KeyStroke

public class KeyStroke
extends java.lang.Object

Encapsulates a Keyboard gesture (press or release) from the User. A KeyStroke is matched to a KeyEvent based the KeyEvent#stateMask, KeyEvent#keyCode or KeyEvent#character, and whether that KeyEvent was dispatched as a result of a release or press by the User.


Method Summary
 boolean equals (java.lang.Object obj)
           
static  KeyStroke getPressed (char character, int stateMask)
          Constructs a KeyStroke that will match the given KeyEvent#character and KeyEvent#stateMask during a press event.
static  KeyStroke getPressed (char character, int keyCode, int stateMask)
          Constructs a KeyStroke that will match the given KeyEvent#character, KeyEvent#keyCode, and KeyEvent#stateMask during a press event.
static  KeyStroke getPressed (int keyCode, int stateMask)
          Constructs a KeyStroke that will match the given KeyEvent#keyCode and KeyEvent#stateMask during a press event.
static  KeyStroke getReleased (char character, int stateMask)
          Constructs a KeyStroke that will match the given KeyEvent#character and KeyEvent#stateMask during a release event.
static  KeyStroke getReleased (char character, int keyCode, int stateMask)
          Constructs a KeyStroke that will match the given KeyEvent#character, KeyEvent#keyCode, and KeyEvent#stateMask during a release event.
static  KeyStroke getReleased (int keyCode, int stateMask)
          Constructs a KeyStroke that will match the given KeyEvent#keyCode and KeyEvent#stateMask during a release event.
 int hashCode ()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getPressed

public static 
KeyStroke getPressed(char character,
                                   int stateMask)
Constructs a KeyStroke that will match the given KeyEvent#character and KeyEvent#stateMask during a press event.

Parameters:
character - the character to match
stateMask - the stateMask to match
Returns:
a new KeyStroke

getPressed

public static 
KeyStroke getPressed(int keyCode,
                                   int stateMask)
Constructs a KeyStroke that will match the given KeyEvent#keyCode and KeyEvent#stateMask during a press event.

Parameters:
keyCode - the keyCode to match
stateMask - the stateMask to match
Returns:
a new KeyStroke

getPressed

public static 
KeyStroke getPressed(char character,
                                   int keyCode,
                                   int stateMask)
Constructs a KeyStroke that will match the given KeyEvent#character, KeyEvent#keyCode, and KeyEvent#stateMask during a press event.

Parameters:
character - the character to match
keyCode - the keyCode to match
stateMask - the stateMask to match
Returns:
a new KeyStroke

getReleased

public static 
KeyStroke getReleased(char character,
                                    int stateMask)
Constructs a KeyStroke that will match the given KeyEvent#character and KeyEvent#stateMask during a release event.

Parameters:
character - the character to match
stateMask - the stateMask to match
Returns:
a new KeyStroke

getReleased

public static 
KeyStroke getReleased(int keyCode,
                                    int stateMask)
Constructs a KeyStroke that will match the given KeyEvent#keyCode and KeyEvent#stateMask during a release event.

Parameters:
keyCode - the keyCode to match
stateMask - the stateMask to match
Returns:
a new KeyStroke

getReleased

public static 
KeyStroke getReleased(char character,
                                    int keyCode,
                                    int stateMask)
Constructs a KeyStroke that will match the given KeyEvent#character, KeyEvent#keyCode, and KeyEvent#stateMask during a release event.

Parameters:
character - the character to match
keyCode - the keyCode to match
stateMask - the stateMask to match
Returns:
a new KeyStroke

equals

public boolean equals(java.lang.Object obj)
Parameters:
obj - the Object being compared
Returns:
true iff the Object is an equivalent KeyStroke

hashCode

public int hashCode()
See Also:
Object.hashCode()

Eclipse GEF
3.3

Copyright (c) IBM Corp. and others 2000, 2007. All Rights Reserved.

 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire