Class Key

  • All Implemented Interfaces:
    java.lang.Comparable
    Direct Known Subclasses:
    ModifierKey, NaturalKey

    @Deprecated
    public abstract class Key
    extends java.lang.Object
    implements java.lang.Comparable
    Deprecated.
    Please use org.eclipse.jface.bindings.keys.KeyStroke and org.eclipse.jface.bindings.keys.KeyLookupFactory

    Key is the abstract base class for all objects representing keys on the keyboard.

    All Key objects have a formal string representation, called the 'name' of the key, available via the toString() method.

    All Key objects, via the format() method, provide a version of their formal string representation translated by platform and locale, suitable for display to a user.

    Key objects are immutable. Clients are not permitted to extend this class.

    Since:
    3.0
    Restriction:
    This class is not intended to be subclassed by clients.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected int key
      Deprecated.
      The key from which this key was constructed.
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      int compareTo​(java.lang.Object object)
      Deprecated.
       
      boolean equals​(java.lang.Object object)
      Deprecated.
       
      int hashCode()
      Deprecated.
       
      java.lang.String toString()
      Deprecated.
      Returns the formal string representation for this key.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • key

        protected final int key
        Deprecated.
        The key from which this key was constructed. This value is defined by KeyLookupFactory.getDefault().
    • Method Detail

      • compareTo

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

        public final boolean equals​(java.lang.Object object)
        Deprecated.
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public final int hashCode()
        Deprecated.
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public final java.lang.String toString()
        Deprecated.
        Returns the formal string representation for this key.
        Overrides:
        toString in class java.lang.Object
        Returns:
        The formal string representation for this key. Guaranteed not to be null.