KeyStrokeUtils
or from Utilities
.@Deprecated public final class StorageSupport extends Object
Modifier and Type | Method and Description |
---|---|
static String |
getLocalizingBundleMessage(FileObject fo,
String key,
String defaultValue)
Deprecated.
|
static String |
keyStrokesToString(Collection<? extends KeyStroke> keys,
boolean emacsStyle)
Deprecated.
Use
KeyStrokeUtils.getKeyStrokesAsText(javax.swing.KeyStroke[], java.lang.String) or Utilities.keyToString(javax.swing.KeyStroke, boolean) |
static KeyStroke[] |
stringToKeyStrokes(String key,
boolean emacsStyle)
Deprecated.
use
KeyStrokeUtils.getKeyStrokes(java.lang.String) or Utilities.stringToKeys(java.lang.String) .
Note the differences in delimiter used by the two methods. |
public static String getLocalizingBundleMessage(FileObject fo, String key, String defaultValue)
public static String keyStrokesToString(Collection<? extends KeyStroke> keys, boolean emacsStyle)
KeyStrokeUtils.getKeyStrokesAsText(javax.swing.KeyStroke[], java.lang.String)
or Utilities.keyToString(javax.swing.KeyStroke, boolean)
KeyStroke
s to its textual representation. There
are two available formats for the textual representation:
KeyStroke
to
a string that looks like for example 'Ctrl+A' or 'Alt+Shift+M'.
KeyStroke
to
a string that's known from Emacs and that looks like for example 'C-A' or 'AS-M'.
It uses methods from org.openide.util.Utilities
, which take
care of Mac OS specifics and use 'D' and 'O' wildcards for encoding 'Ctrl'
and 'Alt' keys.
keys
- The KeyStrokes
to convert.emacsStyle
- If true
the returned string will be in so called
Emacs style, ortherwise it will be in human readable format.KeyStroke
s passed in.public static KeyStroke[] stringToKeyStrokes(String key, boolean emacsStyle)
KeyStrokeUtils.getKeyStrokes(java.lang.String)
or Utilities.stringToKeys(java.lang.String)
.
Note the differences in delimiter used by the two methods.KeyStroke
objects. Please see StorageSupport.keyStrokesToString(Collection, boolean)
ror details about the available formats.key
- The textual representation of keystorkes to convert. Its format
depends on the value of emacsStyle
parameter.emacsStyle
- If true
the key
string is expected to be
in so called emacs format, ortherwise it will be in human readable format.KeyStroke
s that were represented by the key
text or null
if the textual representation was malformed.