|
Eclipse Platform Release 3.0 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.ui.keys.KeySequence
A KeySequence is defined as a list of zero or more KeyStrokes, with the stipulation that all KeyStroke objects must be complete, save for the last one, whose completeness is optional. A KeySequence is said to be complete if all of its KeyStroke objects are complete.
All KeySequence objects have a formal string representation available via the toString() method. There are a number of methods to get instances of KeySequence objects, including one which can parse this formal string representation.
All KeySequence objects, via the format() method, provide a version of their formal string representation translated by platform and locale, suitable for display to a user.
KeySequence objects are immutable. Clients are not permitted to extend this class.
Field Summary | |
static String | KEY_STROKE_DELIMITER
The delimiter between multiple key strokes in a single key sequence -- expressed in the formal key stroke grammar. |
static String | KEY_STROKE_DELIMITERS
The set of delimiters for KeyStroke objects allowed during parsing of the formal string representation. |
Method Summary | |
int | compareTo(Object object)
|
boolean | endsWith(KeySequence keySequence,
boolean equals)
Returns whether or not this key sequence ends with the given key sequence. |
boolean | equals(Object object)
|
String | format()
Formats this key sequence into the current default look. |
static KeySequence | getInstance()
Gets an instance of KeySequence. |
static KeySequence | getInstance(KeySequence keySequence,
KeyStroke keyStroke)
Gets an instance of KeySequence given a key sequence and a key stroke. |
static KeySequence | getInstance(KeyStroke keyStroke)
Gets an instance of KeySequence given a single key stroke. |
static KeySequence | getInstance(KeyStroke[] keyStrokes)
Gets an instance of KeySequence given an array of key strokes. |
static KeySequence | getInstance(List keyStrokes)
Gets an instance of KeySequence given a list of key strokes. |
static KeySequence | getInstance(String string)
Gets an instance of KeySequence by parsing a given a formal string representation. |
List | getKeyStrokes()
Returns the list of key strokes for this key sequence. |
int | hashCode()
|
boolean | isComplete()
Returns whether or not this key sequence is complete. |
boolean | isEmpty()
Returns whether or not this key sequence is empty. |
boolean | startsWith(KeySequence keySequence,
boolean equals)
Returns whether or not this key sequence starts with the given key sequence. |
String | toString()
Returns the formal string representation for this key sequence. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final String KEY_STROKE_DELIMITER
public static final String KEY_STROKE_DELIMITERS
Method Detail |
public static KeySequence getInstance()
public static KeySequence getInstance(KeySequence keySequence, KeyStroke keyStroke)
public static KeySequence getInstance(KeyStroke keyStroke)
public static KeySequence getInstance(KeyStroke[] keyStrokes)
public static KeySequence getInstance(List keyStrokes)
public static KeySequence getInstance(String string) throws ParseException
public int compareTo(Object object)
public boolean endsWith(KeySequence keySequence, boolean equals)
public boolean equals(Object object)
public String format()
public List getKeyStrokes()
public int hashCode()
public boolean isComplete()
public boolean isEmpty()
public boolean startsWith(KeySequence keySequence, boolean equals)
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.