|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectgui.run.ShortcutUtils
public class ShortcutUtils
| Field Summary | |
|---|---|
static char |
LEFT_BRACE
|
static char |
META_CHARACTER
|
static char |
RIGHT_BRACE
|
| Constructor Summary | |
|---|---|
ShortcutUtils()
|
|
| Method Summary | |
|---|---|
static void |
addAccelerator(javax.swing.JMenuItem jmi)
Accelerator strings are embedded in the label of a JMenuItem. |
static void |
addFocusAccelerator(java.lang.String label,
javax.swing.JTextField tf)
Adds the accelerator without altering textfield contents. |
static void |
addShortcut(javax.swing.AbstractButton ab)
"this is a shortcut [c" "this has no shortcut [" "this has no shortcut either" |
static void |
addShortcut(java.awt.Button ab)
"this is a shortcut [c" "this has no shortcut [" "this has no shortcut either" |
static void |
addShortcut(javax.swing.JLabel tf)
add a short cut to a label so that you can tab over to the corresponding text field. |
static void |
addShortcut(javax.swing.JTabbedPane jtp)
This was supposed to search the tab list and add mnemonics, but, for some reason, it does not work. |
static void |
addShortcut(javax.swing.JTextField tf)
add a short-cut to a text field so you can tab over to the field |
static void |
addShortcut(RunMenu menu)
|
static void |
addShortcut(RunMenuItem item)
|
static java.lang.String |
getAcceleratorString(java.lang.String s)
get the embedded keyboard accelerator string. |
static javax.swing.KeyStroke |
getKeyStroke(java.lang.String s)
get the key stroke that corresponds to the give keyboard accelerator. |
static char |
getMnemonicChar(java.lang.String s)
return the char next to the '[' |
static boolean |
hasAccelerator(java.lang.String s)
|
static boolean |
hasShortcut(java.lang.String s)
|
static void |
main(java.lang.String[] args)
|
static java.lang.String |
stripAcceleratorString(java.lang.String s)
remote the left brace from the string and make upper case. |
static java.lang.String |
stripMnemonicMetaChar(java.lang.String s)
Strip the meta character '[' and return the remaining string |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final char META_CHARACTER
public static final char LEFT_BRACE
public static final char RIGHT_BRACE
| Constructor Detail |
|---|
public ShortcutUtils()
| Method Detail |
|---|
public static boolean hasAccelerator(java.lang.String s)
s -
public static boolean hasShortcut(java.lang.String s)
s -
public static char getMnemonicChar(java.lang.String s)
s -
public static java.lang.String getAcceleratorString(java.lang.String s)
s -
public static javax.swing.KeyStroke getKeyStroke(java.lang.String s)
s -
public static java.lang.String stripMnemonicMetaChar(java.lang.String s)
s -
public static java.lang.String stripAcceleratorString(java.lang.String s)
s -
public static void addShortcut(javax.swing.JTabbedPane jtp)
jtp - public static void addShortcut(java.awt.Button ab)
ab - public static void addShortcut(javax.swing.AbstractButton ab)
ab - public static void addShortcut(javax.swing.JTextField tf)
tf - public static void addShortcut(javax.swing.JLabel tf)
tf -
public static void addFocusAccelerator(java.lang.String label,
javax.swing.JTextField tf)
label is used as the tool tip
text.
label - label upon which accelerator is based.tf - textfield to which accelerator is to be added.public static void addAccelerator(javax.swing.JMenuItem jmi)
jmi - public static void main(java.lang.String[] args)
public static void addShortcut(RunMenuItem item)
public static void addShortcut(RunMenu menu)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||