|Modifier and Type||Method and Description|
Returns the character, as an index, that the look and feel should provide decoration for as representing the mnemonic character.
Returns the keyboard mnemonic for this component.
Provides a hint to the look and feel as to which character in the text should be decorated to represent the mnemonic.
Sets the keyboard mnemonic on this component.
void setMnemonic(int mnemonic)
A mnemonic must correspond to a single key on the keyboard and should be
specified using one of the
VK_XXX keycodes defined in
java.awt.event.KeyEvent. Mnemonics are case-insensitive,
therefore a key event with the corresponding keycode would cause the
button to be activated whether or not the Shift modifier was pressed.
void setDisplayedMnemonicIndex(int index) throws IllegalArgumentException
The value of this is updated as the properties relating to the
mnemonic change (such as the mnemonic itself, the text...).
You should only ever have to call this if
you do not wish the default character to be underlined. For example, if
the text was 'Save As', with a mnemonic of 'a', and you wanted the 'A'
to be decorated, as 'Save As', you would have to invoke
setDisplayedMnemonicIndex(5) after invoking
WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses