|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.doolin.gui.swing.MnemonicInfo
public class MnemonicInfo
Computing of mnemonic information (character and index) from an encoded text.
The mnemonic is indicated by a & character in the text. For example,
E&xit defines x as a mnemonic for the
Exit text.
| Constructor Summary | |
|---|---|
MnemonicInfo(String name)
Constructor |
|
| Method Summary | |
|---|---|
void |
configureAction(Action action)
Configures an action with this mnemonic information |
void |
configureButton(AbstractButton button)
Configures a button with the mnemonic |
void |
configureLabel(JLabel label)
Configures a label with this mnemonic information |
char |
getMnemonic()
Returns the mnemonic character |
int |
getMnemonicIndex()
Returns the mnemonic index |
protected int |
getMnemonicIndex(String name)
Returns the position of a valid & character. |
String |
getText()
Text stripped from its mnemonic information |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MnemonicInfo(String name)
name - Text| Method Detail |
|---|
public void configureAction(Action action)
action - Action to configureAction.putValue(String, Object),
Action.NAME,
Action.MNEMONIC_KEY,
Action.DISPLAYED_MNEMONIC_INDEX_KEYpublic void configureButton(AbstractButton button)
button - Button to configureAbstractButton.setText(String),
AbstractButton.setMnemonic(char),
AbstractButton.setDisplayedMnemonicIndex(int)public void configureLabel(JLabel label)
label - Label to configureJLabel.setText(String),
JLabel.setDisplayedMnemonicIndex(int)public char getMnemonic()
public int getMnemonicIndex()
public String getText()
protected int getMnemonicIndex(String name)
name - Text
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||