edu.umd.cs.findbugs.gui
Class AnnotatedString
java.lang.Object
edu.umd.cs.findbugs.gui.AnnotatedString
public class AnnotatedString
- extends java.lang.Object
Class to handle Strings annotated with embedded mnemonics
Note: Since the human interface guidelines for Mac OS X say never
to use mnemonics, this class behaves as if no mnemonics are set
when run on Mac OS X.
Method Summary |
private static void |
addButton(javax.swing.JFrame frame,
java.lang.String s)
|
int |
getMnemonic()
Return the appropriate mnemonic character for this string. |
int |
getMnemonicIndex()
|
static void |
main(java.lang.String[] args)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
MAC_OS_X
private static final boolean MAC_OS_X
myAnnotatedString
private final java.lang.String myAnnotatedString
AnnotatedString
public AnnotatedString(java.lang.String s)
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
getMnemonic
public int getMnemonic()
- Return the appropriate mnemonic character for this string. If no mnemonic
should be displayed, KeyEvent.VK_UNDEFINED is returned.
- Returns:
- the Mnemonic character, or VK_UNDEFINED if no mnemonic should
be set
getMnemonicIndex
public int getMnemonicIndex()
- Returns:
- the index in the plain string at which the mnemonic should be
displayed, or -1 if no mnemonic should be set
addButton
private static void addButton(javax.swing.JFrame frame,
java.lang.String s)
main
public static void main(java.lang.String[] args)