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
Answertopia.com

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

  




 

 


Eclipse Platform
Release 3.5

org.eclipse.ui.keys
Class KeySequence


java.lang.Object
  extended by 
org.eclipse.ui.keys.KeySequence
All Implemented Interfaces:
Comparable

Deprecated. Please use org.eclipse.jface.bindings.keys.KeySequence

public final class KeySequence
extends Object
implements Comparable

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.

Since:
3.0

Field Summary
static  String KEY_STROKE_DELIMITER
          Deprecated. The delimiter between multiple key strokes in a single key sequence -- expressed in the formal key stroke grammar.
static  String KEY_STROKE_DELIMITERS
          Deprecated. The set of delimiters for KeyStroke objects allowed during parsing of the formal string representation.
 
Method Summary
 int compareTo ( Object object)
          Deprecated.  
 boolean endsWith ( KeySequence keySequence, boolean equals)
          Deprecated. Returns whether or not this key sequence ends with the given key sequence.
 boolean equals ( Object object)
          Deprecated.  
  String format ()
          Deprecated. Formats this key sequence into the current default look.
static  KeySequence getInstance ()
          Deprecated. Gets an instance of KeySequence.
static  KeySequence getInstance ( KeySequence newKeySequence)
          Deprecated. Gets an instance of KeySequence given a new-style key sequence.
static  KeySequence getInstance ( KeySequence keySequence, KeyStroke keyStroke)
          Deprecated. Gets an instance of KeySequence given a key sequence and a key stroke.
static  KeySequence getInstance ( KeyStroke keyStroke)
          Deprecated. Gets an instance of KeySequence given a single key stroke.
static  KeySequence getInstance ( KeyStroke[] keyStrokes)
          Deprecated. Gets an instance of KeySequence given an array of key strokes.
static  KeySequence getInstance ( List keyStrokes)
          Deprecated. Gets an instance of KeySequence given a list of key strokes.
static  KeySequence getInstance ( String string)
          Deprecated. Gets an instance of KeySequence by parsing a given a formal string representation.
  List getKeyStrokes ()
          Deprecated. Returns the list of key strokes for this key sequence.
 int hashCode ()
          Deprecated.  
 boolean isComplete ()
          Deprecated. Returns whether or not this key sequence is complete.
 boolean isEmpty ()
          Deprecated. Returns whether or not this key sequence is empty.
 boolean startsWith ( KeySequence keySequence, boolean equals)
          Deprecated. Returns whether or not this key sequence starts with the given key sequence.
  String toString ()
          Deprecated. 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

KEY_STROKE_DELIMITER

public static final 
String KEY_STROKE_DELIMITER
Deprecated. 
The delimiter between multiple key strokes in a single key sequence -- expressed in the formal key stroke grammar. This is not to be displayed to the user. It is only intended as an internal representation.

See Also:
Constant Field Values

KEY_STROKE_DELIMITERS

public static final 
String KEY_STROKE_DELIMITERS
Deprecated. 
The set of delimiters for KeyStroke objects allowed during parsing of the formal string representation.

See Also:
Constant Field Values
Method Detail

getInstance

public static 
KeySequence getInstance()
Deprecated. 
Gets an instance of KeySequence.

Returns:
a key sequence. This key sequence will have no key strokes. Guaranteed not to be null.

getInstance

public static 
KeySequence getInstance(
KeySequence keySequence,
                                      
KeyStroke keyStroke)
Deprecated. 
Gets an instance of KeySequence given a key sequence and a key stroke.

Parameters:
keySequence - a key sequence. Must not be null.
keyStroke - a key stroke. Must not be null.
Returns:
a key sequence that is equal to the given key sequence with the given key stroke appended to the end. Guaranteed not to be null.

getInstance

public static 
KeySequence getInstance(
KeyStroke keyStroke)
Deprecated. 
Gets an instance of KeySequence given a single key stroke.

Parameters:
keyStroke - a single key stroke. Must not be null.
Returns:
a key sequence. Guaranteed not to be null.

getInstance

public static 
KeySequence getInstance(
KeyStroke[] keyStrokes)
Deprecated. 
Gets an instance of KeySequence given an array of key strokes.

Parameters:
keyStrokes - the array of key strokes. This array may be empty, but it must not be null. This array must not contain null elements.
Returns:
a key sequence. Guaranteed not to be null.

getInstance

public static 
KeySequence getInstance(
List keyStrokes)
Deprecated. 
Gets an instance of KeySequence given a list of key strokes.

Parameters:
keyStrokes - the list of key strokes. This list may be empty, but it must not be null. If this list is not empty, it must only contain instances of KeyStroke.
Returns:
a key sequence. Guaranteed not to be null.

getInstance

public static final 
KeySequence getInstance(
KeySequence newKeySequence)
Deprecated. 
Gets an instance of KeySequence given a new-style key sequence.

Parameters:
newKeySequence - The new-style key sequence to convert into a legacy key sequence; must not be null.
Returns:
a key sequence; never null.

getInstance

public static 
KeySequence getInstance(
String string)
                               throws 
ParseException
Deprecated. 
Gets an instance of KeySequence by parsing a given a formal string representation.

Parameters:
string - the formal string representation to parse.
Returns:
a key sequence. Guaranteed not to be null.
Throws:
ParseException - if the given formal string representation could not be parsed to a valid key sequence.

compareTo

public int compareTo(
Object object)
Deprecated. 
Specified by:
compareTo in interface Comparable
See Also:
Object.equals(java.lang.Object)

endsWith

public boolean endsWith(
KeySequence keySequence,
                        boolean equals)
Deprecated. 
Returns whether or not this key sequence ends with the given key sequence.

Parameters:
keySequence - a key sequence. Must not be null.
equals - whether or not an identical key sequence should be considered as a possible match.
Returns:
true, iff the given key sequence ends with this key sequence.

equals

public boolean equals(
Object object)
Deprecated. 
Overrides:
equals in class Object
See Also:
Object.equals(java.lang.Object)

format

public 
String format()
Deprecated. 
Formats this key sequence into the current default look.

Returns:
A string representation for this key sequence using the default look; never null.

getKeyStrokes

public 
List getKeyStrokes()
Deprecated. 
Returns the list of key strokes for this key sequence.

Returns:
the list of key strokes keys. This list may be empty, but is guaranteed not to be null. If this list is not empty, it is guaranteed to only contain instances of KeyStroke.

hashCode

public int hashCode()
Deprecated. 
Overrides:
hashCode in class Object
See Also:
Object.hashCode()

isComplete

public boolean isComplete()
Deprecated. 
Returns whether or not this key sequence is complete. Key sequences are complete iff all of their key strokes are complete.

Returns:
true, iff the key sequence is complete.

isEmpty

public boolean isEmpty()
Deprecated. 
Returns whether or not this key sequence is empty. Key sequences are complete iff they have no key strokes.

Returns:
true, iff the key sequence is empty.

startsWith

public boolean startsWith(
KeySequence keySequence,
                          boolean equals)
Deprecated. 
Returns whether or not this key sequence starts with the given key sequence.

Parameters:
keySequence - a key sequence. Must not be null.
equals - whether or not an identical key sequence should be considered as a possible match.
Returns:
true, iff the given key sequence starts with this key sequence.

toString

public 
String toString()
Deprecated. 
Returns the formal string representation for this key sequence.

Overrides:
toString in class Object
Returns:
The formal string representation for this key sequence. Guaranteed not to be null.
See Also:
Object.toString()

Eclipse Platform
Release 3.5

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.


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