Package org.eclipse.jface.bindings.keys.formatting

# Class KeyFormatterFactory

java.lang.Object
org.eclipse.jface.bindings.keys.formatting.KeyFormatterFactory

public final class KeyFormatterFactory extends Object

A cache for formatters. It keeps a few instances of pre-defined instances of `IKeyFormatter` available for use. It also allows the default formatter to be changed.

Since:
  3.1
See Also:
  - `IKeyFormatter`

## Method Summary

Modifier and Type
Method
Description
`static final IKeyFormatter`
`getDefault()`
An accessor for the current default key formatter.
`static final IKeyFormatter`
`getEmacsKeyFormatter()`
Provides an instance of `EmacsKeyFormatter`.
`static final IKeyFormatter`
`getFormalKeyFormatter()`
Provides an instance of `FormalKeyFormatter`.
`static final void`
`setDefault(IKeyFormatter defaultKeyFormatter)`
Sets the default key formatter.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Method Details

### getDefault

public static final IKeyFormatter getDefault()
An accessor for the current default key formatter.

Returns:
  The default formatter; never `null`.

### getEmacsKeyFormatter

public static final IKeyFormatter getEmacsKeyFormatter()
Provides an instance of `EmacsKeyFormatter`.

Returns:
  The Xemacs formatter; never `null`.

### getFormalKeyFormatter

public static final IKeyFormatter getFormalKeyFormatter()
Provides an instance of `FormalKeyFormatter`.

Returns:
  The formal formatter; never `null`.

### setDefault

public static final void setDefault(IKeyFormatter defaultKeyFormatter)
Sets the default key formatter.

Parameters:
  `defaultKeyFormatter` - the default key formatter. Must not be `null`.