|
Extension SDK 10.1.2 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object oracle.ide.keyboard.KeyUtil
Some generic methods related to KeyEvents and KeyStrokes.
Constructor Summary | |
KeyUtil()
|
Method Summary | |
static java.lang.String |
buildTooltip(int cmdID)
Builds a tooltip for a command in the form of cmd-name[ " (" accelerator ")" ] |
static java.lang.String |
getAcceleratorTooltip(int cmdID)
|
static java.lang.String |
getAcceleratorTooltip(KeyStrokeMap keyMap,
int cmdID)
|
static javax.swing.KeyStroke |
getBestAccelerator(KeyStrokeMap ksm,
int nCmdID)
Return the 'best' accelerator found in the map for the specified command ID. |
static boolean |
isActionKey(javax.swing.KeyStroke ks)
Only the KeyEvent knows what is an action key, the KeyStroke does not. |
static boolean |
isModifierKey(int keyCode)
Determines if the key is a modifier (Ctrl, Shift, ...) |
static boolean |
isModifierKey(javax.swing.KeyStroke keyStroke)
Determines if the key is a modifier (Ctrl, Shift, ...) |
static void |
removeCtrlTabFromTraversalKeys(java.awt.Component component)
Removes the Ctrl+Tab and Ctrl+Shift+Tab from the focusTraversalKeys |
static void |
removeKeyStrokesFromInputMap(javax.swing.JComponent component,
javax.swing.KeyStroke[] keyStrokes,
int mapType)
|
static void |
removeKeyStrokesFromInputMaps(javax.swing.JComponent component,
javax.swing.KeyStroke[] keyStrokes)
|
static java.lang.String |
toString(javax.swing.KeyStroke ks)
Returns a user readable version of the keystroke like "Ctrl+K". |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public KeyUtil()
Method Detail |
public static java.lang.String toString(javax.swing.KeyStroke ks)
ks
- the keystroke
public static boolean isActionKey(javax.swing.KeyStroke ks)
public static boolean isModifierKey(int keyCode)
public static boolean isModifierKey(javax.swing.KeyStroke keyStroke)
public static void removeKeyStrokesFromInputMaps(javax.swing.JComponent component, javax.swing.KeyStroke[] keyStrokes)
{@link SwingUtils#removeKeyStrokesFromInputMaps(JComponent,KeyStroke[])}
public static void removeKeyStrokesFromInputMap(javax.swing.JComponent component, javax.swing.KeyStroke[] keyStrokes, int mapType)
{@link SwingUtils#removeKeyStrokesFromInputMap(JComponent,KeyStroke[],int)}
public static java.lang.String getAcceleratorTooltip(int cmdID)
cmdID
- the ID of a command present in the global keymap
public static java.lang.String getAcceleratorTooltip(KeyStrokeMap keyMap, int cmdID)
public static java.lang.String buildTooltip(int cmdID)
cmd-name[ " (" accelerator ")" ]
- Parameters:
cmdID
-
- Returns:
- the tooltip
public static void removeCtrlTabFromTraversalKeys(java.awt.Component component)
component
- public static javax.swing.KeyStroke getBestAccelerator(KeyStrokeMap ksm, int nCmdID)
ksm
- nCmdID
-
|
Extension SDK | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 1997, 2004, Oracle. All rights reserved.