Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.gui > #5148
| From | Jeff Higgins <jeff@invalid.invalid> |
|---|---|
| Newsgroups | comp.lang.java.gui |
| Subject | Re: Where is the actual menu key processing in Swing or the LaF? |
| Date | 2012-05-27 18:12 -0400 |
| Organization | A noiseless patient Spider |
| Message-ID | <jpu8sm$qpj$1@dont-email.me> (permalink) |
| References | <menu-20120525135656@ram.dialup.fu-berlin.de> <jpo4aq$ngr$1@dont-email.me> <menu-20120525181856@ram.dialup.fu-berlin.de> |
On 05/25/2012 12:21 PM, Stefan Ram wrote: > Jeff Higgins<jeff@invalid.invalid> writes: >> Have you looked about Focus Traversal Policy? > > In javax.swing.plaf.basic.BasicPopupMenuUI.java, there is > the method selectParentChild(boolean), and at the end of > this method, there is a new menu path selected that ends with > the popup menu. > > It seems as if I need to overwrite this and extend the path > so as to also include the first popup menu entry, but only > if this selectParentChild(boolean) is called in response to > an arrow key (not in the case of a mouse action). > > »Overwriting« something in a LaF also is not obvious: I want > my program to use a new LaF that is just a copy of Oracle's > Windows LaF but with this small change. > > After all, I will give up for now. I also tried a web search > to see if someone has done this before, but to no avail. > Yep, I see I flubbed this one. Being the point and clicky type I hadn't noticed the behavior you describe in the Swing menu UI. All of the native applications I've since looked at, both in linux-gtk and windows, implement the behavior you hope for. I'm surprised. After a good bit of reading on the subject since your post, I find your statement: "»Overwriting« something in a LaF also is not obvious" remarkably mild. I ran across an article, "Enhancing Swing Applications", located here: <http://today.java.net/pub/a/today/2006/10/03/enhancing-swing-applications.html> that I hope to pursue further after my holiday weekend. The project described in the article seems to have changed homes, it is now located here: <http://insubstantial.github.com/insubstantial/laf-widget/> the links to documentation and etc. in the article still point to the old home. Kirill Grouchnikov seems to have a very good grasp of the PLAF system and writes a lot about it, worth a look.
Back to comp.lang.java.gui | Previous | Next — Previous in thread | Next in thread | Find similar
Re: Where is the actual menu key processing in Swing or the LaF? Jeff Higgins <jeff@invalid.invalid> - 2012-05-25 10:18 -0400
Re: Where is the actual menu key processing in Swing or the LaF? Jeff Higgins <jeff@invalid.invalid> - 2012-05-27 18:12 -0400
Re: Where is the actual menu key processing in Swing or the LaF? Jeff Higgins <jeff@invalid.invalid> - 2012-05-27 19:11 -0400
Re: Where is the actual menu key processing in Swing or the LaF? Jeff Higgins <jeff@invalid.invalid> - 2012-05-27 19:33 -0400
Re: Where is the actual menu key processing in Swing or the LaF? Jeff Higgins <jeff@invalid.invalid> - 2012-05-27 21:20 -0400
csiph-web