public final class NativeKeyFormatter extends AbstractKeyFormatter
Formats the key sequences and key strokes into the native human-readable format. This is typically what you would see on the menus for the given platform and locale.
KEY_DELIMITER_KEY, KEY_STROKE_DELIMITER_KEY, NO_MODIFIER_KEYS
Constructor and Description |
---|
NativeKeyFormatter() |
Modifier and Type | Method and Description |
---|---|
String |
format(int key)
Formats an individual key into a human readable format.
|
protected String |
getKeyDelimiter()
An accessor for the delimiter you wish to use between keys.
|
protected String |
getKeyStrokeDelimiter()
An accessor for the delimiter you wish to use between key strokes.
|
protected int[] |
sortModifierKeys(int modifierKeys)
Separates the modifier keys from each other, and then places them in an
array in some sorted order.
|
format, format
public final String format(int key)
format
in interface IKeyFormatter
format
in class AbstractKeyFormatter
key
- The key to format.null
.protected String getKeyDelimiter()
AbstractKeyFormatter
getKeyDelimiter
in class AbstractKeyFormatter
null
.protected String getKeyStrokeDelimiter()
AbstractKeyFormatter
getKeyStrokeDelimiter
in class AbstractKeyFormatter
null
.protected int[] sortModifierKeys(int modifierKeys)
AbstractKeyFormatter
sortModifierKeys
in class AbstractKeyFormatter
modifierKeys
- The modifier keys from the key stroke.KeyStroke.NO_KEY
should be ignored.
Copyright (c) 2000, 2015 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.