Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

B. Component Actions

Appendix B. Component Actions

This appendix lists the various JComponent descendants and the Actions you can pull from their respective ActionMaps. If the action is bound to a keystroke via the component's InputMaps, those associations are listed for the Metal and Mac L&Fs. The Windows and Motif L&Fs are quite similar to the Metal L&F, but if you want the definitive list, you should also check out the API document on this topic (<yourJavaDocDir>/api/javax/swing/doc-files/Key-Index.html or the online copy of the docs (http://java.sun.com/j2se/1.4/docs/).

It's important to remember that there are three input maps associated with a component—one for each of three focus states. If you recall from Chapter 3, the possibilities are WHEN_FOCUSED, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, and WHEN_IN_FOCUSED_WINDOW. The titles of the tables indicate which state the table describes.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint