Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.gui > #5148

Re: Where is the actual menu key processing in Swing or the LaF?

Path csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail
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 Sun, 27 May 2012 18:12:49 -0400
Organization A noiseless patient Spider
Lines 43
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>
Mime-Version 1.0
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 8bit
Injection-Date Sun, 27 May 2012 22:12:39 +0000 (UTC)
Injection-Info mx04.eternal-september.org; posting-host="lN5NBsxb/Hl+dKZczfqfVQ"; logging-data="27443"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX193HqwBXtQ/aoRGh2Y1DbVFgBRitqNZ6Hk="
User-Agent Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.16) Gecko/20120507 Icedove/3.0.11
In-Reply-To <menu-20120525181856@ram.dialup.fu-berlin.de>
Cancel-Lock sha1:iqZwVnGTUdXZrlJJ16qkF16SZYg=
Xref csiph.com comp.lang.java.gui:5148

Show key headers only | View raw


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 | NextPrevious in thread | Next in thread | Find similar


Thread

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