Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Eclipse Platform Release 3.0
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.eclipse.ui.keys
Interface IKeyFormatter

public interface IKeyFormatter

Any formatter capable of taking key sequence or a key stroke and converting it into a string. These formatters are used to produce the strings that the user sees in the keys preference page and the menus, as well as the strings that are used for persistent storage.

Since:
  3.0

Method Summary
`String` | `format(Key key)` Formats an individual key into a human readable format.
`String` | `format(KeySequence keySequence)` Format the given key sequence into a string.
`String` | `format(KeyStroke keyStroke)` Format the given key strokes into a string.

Method Detail

### format

    public String format(Key key)

  Formats an individual key into a human readable format. This uses an internationalization resource bundle to look up the key. This does not do any platform-specific formatting (e.g., Carbon's command character).

  Parameters:
    `key` - The key to format; must not be `null`.
  Returns:
    The key formatted as a string; should not be `null`.

### format

    public String format(KeySequence keySequence)

  Format the given key sequence into a string. The manner of the conversion is dependent on the formatter. It is required that unequal key seqeunces return unequal strings.

  Parameters:
    `keySequence` - The key sequence to convert; must not be `null`.
  Returns:
    A string representation of the key sequence; must not be `null`.

### format

    public String format(KeyStroke keyStroke)

  Format the given key strokes into a string. The manner of the conversion is dependent on the formatter. It is required that unequal key strokes return unequal strings.

  Parameters:
    `keyStroke` - The key stroke to convert; must not be `null`.
  Returns:
    A string representation of the key stroke; must not be `null`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| 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.