|
Eclipse Platform Release 3.0 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.ui.keys.KeyStroke
A KeyStroke is defined as an optional set of modifier keys followed optionally by a natural key. A KeyStroke is said to be complete if it contains a natural key. A natural key is any Unicode character (e.g., "backspace", etc.), any character belonging to a natural language (e.g., "A", "1", "[", etc.), or any special control character specific to computers (e.g., "F10", "PageUp", etc.).
All KeyStroke objects have a formal string representation available via the toString() method. There are a number of methods to get instances of KeyStroke objects, including one which can parse this formal string representation.
All KeyStroke objects, via the format() method, provide a version of their formal string representation translated by platform and locale, suitable for display to a user.
KeyStroke objects are immutable. Clients are not permitted to extend this class.
Field Summary | |
static String | KEY_DELIMITER
The delimiter between multiple keys in a single key strokes -- expressed in the formal key stroke grammar. |
static String | KEY_DELIMITERS
The set of delimiters for Key objects allowed during parsing of the formal string representation. |
Method Summary | |
int | compareTo(Object object)
|
boolean | equals(Object object)
|
String | format()
Formats this key stroke into the current default look. |
static KeyStroke | getInstance(ModifierKey[] modifierKeys,
NaturalKey naturalKey)
Gets an instance of KeyStroke given an array of modifier keys and a natural key. |
static KeyStroke | getInstance(ModifierKey modifierKey,
NaturalKey naturalKey)
Gets an instance of KeyStroke given a single modifier key and a natural key. |
static KeyStroke | getInstance(NaturalKey naturalKey)
Gets an instance of KeyStroke given a natural key. |
static KeyStroke | getInstance(SortedSet modifierKeys,
NaturalKey naturalKey)
Gets an instance of KeyStroke given a set of modifier keys and a natural key. |
static KeyStroke | getInstance(String string)
Gets an instance of KeyStroke by parsing a given a formal string representation. |
Set | getModifierKeys()
Returns the set of modifier keys for this key stroke. |
NaturalKey | getNaturalKey()
Returns the natural key for this key stroke. |
int | hashCode()
|
boolean | isComplete()
Returns whether or not this key stroke is complete. |
String | toString()
Returns the formal string representation for this key stroke. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final String KEY_DELIMITER
public static final String KEY_DELIMITERS
Method Detail |
public static KeyStroke getInstance(ModifierKey modifierKey, NaturalKey naturalKey)
public static KeyStroke getInstance(ModifierKey[] modifierKeys, NaturalKey naturalKey)
public static KeyStroke getInstance(NaturalKey naturalKey)
public static KeyStroke getInstance(SortedSet modifierKeys, NaturalKey naturalKey)
public static KeyStroke getInstance(String string) throws ParseException
public int compareTo(Object object)
public boolean equals(Object object)
public String format()
public Set getModifierKeys()
public NaturalKey getNaturalKey()
public int hashCode()
public boolean isComplete()
public String toString()
|
Eclipse Platform Release 3.0 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp. and others 2000, 2004. All rights reserved.