Java Doc for Mnemonic.java in  » Testing » abbot-1.0.1 » abbot » editor » widgets » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Testing » abbot 1.0.1 » abbot.editor.widgets 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   abbot.editor.widgets.Mnemonic

Mnemonic
public class Mnemonic (Code)
Provide access to mnemonics appropriate for the current platform and locale. Encapsulates displayed text, a KeyEvent.VK_ constant, and a displayed mnemonic index. All instances are obtained through the factory method, Mnemonic.getMnemonic(String) .
See Also:   java.awt.event.KeyEvent
See Also:   javax.swing.AbstractButton.setMnemonic(int)
See Also:   javax.swing.AbstractButton.setDisplayedMnemonicIndex(int)
See Also:   javax.swing.JLabel.setDisplayedMnemonic(int)
See Also:   javax.swing.JLabel.setDisplayedMnemonicIndex(int)
See Also:   javax.swing.Action.MNEMONIC_KEY


Field Summary
public  intindex
     The index to use as an argument to AbstractButton.setDisplayedMnemonicIndex(int) .
public  intkeycode
     The keycode to use as an argument to AbstractButton.setMnemonic(int) .
public  Stringtext
     The unencoded text.


Method Summary
public static  MnemonicgetMnemonic(String input)
     Create a Mnemonic instance with the mnemonic information from the given encoded String.
public static  voidsetDisplayedMnemonicIndex(Component c, int index)
     Set the displayed mnemonic index, if doing so is supported.
public  voidsetMnemonic(AbstractButton button)
     Apply this mnemonic to the given AbstractButton.
public  voidsetMnemonic(JLabel label)
     Apply this mnemonic to the given JLabel.
public  voidsetMnemonic(JTabbedPane tabbedPane, int tabIndex)
     Apply this mnemonic to the given JLabel.
public  voidsetMnemonic(Action action)
     Apply this mnemonic to the given Action.
public  StringtoString()
    
public static  booleanuseMnemonics()
    

Field Detail
index
public int index(Code)
The index to use as an argument to AbstractButton.setDisplayedMnemonicIndex(int) . Returns -1 if the default value should be used.



keycode
public int keycode(Code)
The keycode to use as an argument to AbstractButton.setMnemonic(int) . Returns KeyEvent.VK_UNDEFINED if no mnemonic was found.



text
public String text(Code)
The unencoded text. For example "&File" results in "File".





Method Detail
getMnemonic
public static Mnemonic getMnemonic(String input)(Code)
Create a Mnemonic instance with the mnemonic information from the given encoded String. Unencoded text, the mnemonic keycode, and the display index are encapsulated in the returned Mnemonic object. Encoding consists of placing an ampersand (&) prior to the character designated as the mnemonic.

Mnemonics may be encoded as follows:
Original TextVisible TextMnemonic
&FileFileVK_F
Save &As...Save As...VK_A second instance
Me&&&YouMe&YouVK_Y ambiguous ampersands must be escaped
Sugar & SpiceSugar & SpiceNone ampersand is unambiguous, whitespace is not allowed as a mnemonic

Swing restricts mnemonics to available KeyEvent VK_ constants, so there must exist a mapping between text characters and said constants. If the obvious mappings (A-Z, a-z, 0-9) don't hold, lookup falls back to other methods. Whitespace, quotes, and ampersand are disallowed as mnemonics.

Mappings from arbitrary characters to mnemonic keys may be defined by providing a property MNEMONIC_{unicode char}={KeyEvent.VK_ constant name} within a bundle accessible by abbot.i18n.Strings. If no such mapping is defined, a VK_ code is guessed by checking if there can be found a keystroke mapping for the original character.


See Also:   abbot.tester.KeyStrokeMap
See Also:   abbot.i18n.Strings




setDisplayedMnemonicIndex
public static void setDisplayedMnemonicIndex(Component c, int index)(Code)
Set the displayed mnemonic index, if doing so is supported.



setMnemonic
public void setMnemonic(AbstractButton button)(Code)
Apply this mnemonic to the given AbstractButton.



setMnemonic
public void setMnemonic(JLabel label)(Code)
Apply this mnemonic to the given JLabel.



setMnemonic
public void setMnemonic(JTabbedPane tabbedPane, int tabIndex)(Code)
Apply this mnemonic to the given JLabel.



setMnemonic
public void setMnemonic(Action action)(Code)
Apply this mnemonic to the given Action.



toString
public String toString()(Code)



useMnemonics
public static boolean useMnemonics()(Code)



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.