|
Eclipse Platform Release 3.1 |
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.jface.bindings.keys.formatting.AbstractKeyFormatter
An abstract implementation of a key formatter that provides a lot of common
key formatting functionality. It is recommended that implementations of
IKeyFormatter
subclass from here, rather than
implementing IKeyFormatter
directly.
Field Summary | |
---|---|
protected static String |
KEY_DELIMITER_KEY
The key for the delimiter between keys. |
protected static String |
KEY_STROKE_DELIMITER_KEY
The key for the delimiter between key strokes. |
protected static int[] |
NO_MODIFIER_KEYS
An empty integer array that can be used in sortModifierKeys(int) . |
Constructor Summary | |
---|---|
AbstractKeyFormatter()
|
Method Summary | |
---|---|
String |
format(int 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. |
protected abstract String |
getKeyDelimiter()
An accessor for the delimiter you wish to use between keys. |
protected abstract String |
getKeyStrokeDelimiter()
An accessor for the delimiter you wish to use between key strokes. |
protected abstract int[] |
sortModifierKeys(int modifierKeys)
Separates the modifier keys from each other, and then places them in an array in some sorted order. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static final String KEY_DELIMITER_KEY
protected static final String KEY_STROKE_DELIMITER_KEY
protected static final int[] NO_MODIFIER_KEYS
sortModifierKeys(int)
.
Constructor Detail |
public AbstractKeyFormatter()
Method Detail |
public String format(int key)
IKeyFormatter
format
in interface IKeyFormatter
key
- The key to format.
null
.public String format(KeySequence keySequence)
IKeyFormatter
format
in interface IKeyFormatter
keySequence
- The key sequence to convert; must not be null
.
null
.public String format(KeyStroke keyStroke)
IKeyFormatter
format
in interface IKeyFormatter
keyStroke
- The key stroke to convert; must not be null
.
null
protected abstract String getKeyDelimiter()
null
.protected abstract String getKeyStrokeDelimiter()
null
.protected abstract int[] sortModifierKeys(int modifierKeys)
modifierKeys
- The modifier keys from the key stroke.
KeyStroke.NO_KEY
should be ignored.
|
Eclipse Platform Release 3.1 |
|||||||||||
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, 2005. All rights reserved.