|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.openide.awt.Mnemonics
Support class for setting button, menu, and label text strings with mnemonics.
| Method Summary | |
static int |
findMnemonicAmpersand(String text)
Searches for an ampersand in a string which indicates a mnemonic. |
static void |
setLocalizedText(AbstractButton item,
String text)
Sets the text for a menu item or other subclass of AbstractButton. |
static void |
setLocalizedText(JLabel item,
String text)
Sets the text for the label or other subclass of JLabel. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public static void setLocalizedText(AbstractButton item, String text)
Examples:
| Input String | View under JDK 1.3 | View under JDK 1.4 or later |
|---|---|---|
Save &As | Save As | Save As |
Rock & Roll | Rock & Roll | Rock & Roll |
Drag & &Drop | Drag & Drop | Drag & Drop |
&Файл | Файл (F) | Файл |
item - a button whose text will be changedtext - new labelpublic static void setLocalizedText(JLabel item, String text)
setLocalizedText(AbstractButton, String).
item - a label whose text will be settext - new labelpublic static int findMnemonicAmpersand(String text)
text - text to search
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||