|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK 11g Release 2 (11.1.2.3.0) E17493-04 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.ide.keyboard.KeyUtil
public final class KeyUtil
Some generic methods related to KeyEvents and KeyStrokes.
Constructor Summary | |
---|---|
KeyUtil() |
Method Summary | |
---|---|
static java.lang.String |
buildToolTip(IdeAction ideAction) Builds a tooltip for an IdeAction in the form of cmd-name[ " (" accelerator ")" ] |
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 keystrokepublic 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)
SwingUtils#removeKeyStrokesFromInputMaps(JComponent,KeyStroke[])}
public static void removeKeyStrokesFromInputMap(javax.swing.JComponent component, javax.swing.KeyStroke[] keyStrokes, int mapType)
SwingUtils#removeKeyStrokesFromInputMap(JComponent,KeyStroke[],int)}
public static java.lang.String getAcceleratorTooltip(int cmdID)
cmdID
- the ID of a command present in the global keymappublic static java.lang.String getAcceleratorTooltip(KeyStrokeMap keyMap, int cmdID)
public static java.lang.String buildTooltip(int cmdID)
cmd-name[ " (" accelerator ")" ]
Parameters:
cmdID
- the command ID of the IdeAction
public static java.lang.String buildToolTip(IdeAction ideAction)
IdeAction
in the form of cmd-name[ " (" accelerator ")" ]
Parameters:
ideAction
- the action whose properties are used to generate the tip text
public static void removeCtrlTabFromTraversalKeys(java.awt.Component component)
component
-public static javax.swing.KeyStroke getBestAccelerator(KeyStrokeMap ksm, int nCmdID)
ksm
-nCmdID
-
|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK 11g Release 2 (11.1.2.3.0) E17493-04 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |