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


Groups > comp.lang.java.gui > #909 > unrolled thread

Efficient way to capture

Started by"Timasmith" <timasmith@THRWHITE.remove-dii-this>
First post2011-04-27 15:30 +0000
Last post2011-04-27 15:30 +0000
Articles 6 — 4 participants

Back to article view | Back to comp.lang.java.gui


Contents

  Efficient way to capture "Timasmith" <timasmith@THRWHITE.remove-dii-this> - 2011-04-27 15:30 +0000
    Re: Efficient way to capt "Fred Kleinschmidt" <fred.kleinschmidt@THRWHITE.remove-dii-this> - 2011-04-27 15:30 +0000
      Re: Efficient way to capt "Timasmith" <timasmith@THRWHITE.remove-dii-this> - 2011-04-27 15:30 +0000
        Re: Efficient way to capt "Larry Barowski" <larry.barowski@THRWHITE.remove-dii-this> - 2011-04-27 15:30 +0000
          Re: Efficient way to capt "Timasmith" <timasmith@THRWHITE.remove-dii-this> - 2011-04-27 15:30 +0000
    Re: Efficient way to capt "liang.spark" <liang.spark@THRWHITE.remove-dii-this> - 2011-04-27 15:30 +0000

#909 — Efficient way to capture

From"Timasmith" <timasmith@THRWHITE.remove-dii-this>
Date2011-04-27 15:30 +0000
SubjectEfficient way to capture
Message-ID<1171249260.891333.276690@j27g2000cwj.googlegroups.com>
  To: comp.lang.java.gui,comp.l
Hi,

I have a frame with several splitpanes or panels.  In general those
are navigation orientated - tab, arrow up, arrow down, click etc.

Whenever a user starts typing letters I want to place focus into a
particular (default) field.  Of course if you are already in a text
field I would ignore it.

What is the most efficient way to do this without bogging down every
keystroke with overhead?

thanks

Tim

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

[toc] | [next] | [standalone]


#912 — Re: Efficient way to capt

From"Fred Kleinschmidt" <fred.kleinschmidt@THRWHITE.remove-dii-this>
Date2011-04-27 15:30 +0000
SubjectRe: Efficient way to capt
Message-ID<JDDHwM.AyF@news.boeing.com>
In reply to#909
  To: comp.lang.java.gui,comp.l

"Timasmith" <timasmith@hotmail.com> wrote in message 
news:1171249260.891333.276690@j27g2000cwj.googlegroups.com...
> Hi,
>
> I have a frame with several splitpanes or panels.  In general those
> are navigation orientated - tab, arrow up, arrow down, click etc.
>
> Whenever a user starts typing letters I want to place focus into a
> particular (default) field.  Of course if you are already in a text
> field I would ignore it.
>
> What is the most efficient way to do this without bogging down every
> keystroke with overhead?
>
> thanks
>
> Tim
>
I think you need to clarify (to yourself and to us) what you
really mean to accomplish. The user is navigating around for
a purpose - usually to get the focus to a particular field.

You are going to cause the user a lot of grief if she then starts typing,
only to have the text go into a different field than she has
just navigated to. So she clicks in the desired field and then
starts typing. But no! you said that when she starts typing letters,
the input goes to the default field, not the one she is trying
to type into! She tries again, and again to no avail. Now she is
really angry, and finally just discards the entire app and goes to
a different vendor.
-- 
Fred L. Kleinschmidt
Boeing Associate Technical Fellow
Technical Architect, Software Reuse Project

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

[toc] | [prev] | [next] | [standalone]


#913 — Re: Efficient way to capt

From"Timasmith" <timasmith@THRWHITE.remove-dii-this>
Date2011-04-27 15:30 +0000
SubjectRe: Efficient way to capt
Message-ID<1171326690.832366.175810@l53g2000cwa.googlegroups.com>
In reply to#912
  To: comp.lang.java.gui,comp.l
On Feb 12, 6:14 pm, "Fred Kleinschmidt"
<fred.l.kleinmschm...@boeing.com> wrote:
> "Timasmith" <timasm...@hotmail.com> wrote in message
>
> news:1171249260.891333.276690@j27g2000cwj.googlegroups.com...
>
>
>
> > Hi,
>
> > I have a frame with several splitpanes or panels.  In general those
> > are navigation orientated - tab, arrow up, arrow down, click etc.
>
> > Whenever a user starts typing letters I want to place focus into a
> > particular (default) field.  Of course if you are already in a text
> > field I would ignore it.
>
> > What is the most efficient way to do this without bogging down every
> > keystroke with overhead?
>
> > thanks
>
> > Tim
>
> I think you need to clarify (to yourself and to us) what you
> really mean to accomplish. The user is navigating around for
> a purpose - usually to get the focus to a particular field.
>
> You are going to cause the user a lot of grief if she then starts typing,
> only to have the text go into a different field than she has
> just navigated to. So she clicks in the desired field and then
> starts typing. But no! you said that when she starts typing letters,
> the input goes to the default field, not the one she is trying
> to type into! She tries again, and again to no avail. Now she is
> really angry, and finally just discards the entire app and goes to
> a different vendor.
> --
> Fred L. Kleinschmidt
> Boeing Associate Technical Fellow
> Technical Architect, Software Reuse Project- Hide quoted text -
>
> - Show quoted text -

If you anywhere on the (tab/frame) which is not a text field then
pressing a letter would take you do the default text field.

Most commonly in this application you would be in a table or a list,
when you start to type it takes you to the default text field.

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

[toc] | [prev] | [next] | [standalone]


#914 — Re: Efficient way to capt

From"Larry Barowski" <larry.barowski@THRWHITE.remove-dii-this>
Date2011-04-27 15:30 +0000
SubjectRe: Efficient way to capt
Message-ID<pYSdnc_TZooEZEzYnZ2dnUVZ_u2mnZ2d@comcast.com>
In reply to#913
  To: comp.lang.java.gui,comp.l

> If you anywhere on the (tab/frame) which is not a text field then
> pressing a letter would take you do the default text field.
>
> Most commonly in this application you would be in a table or a list,
> when you start to type it takes you to the default text field.

You are aware that JList has keyboard navigation using
"letter" keys, right?

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

[toc] | [prev] | [next] | [standalone]


#939 — Re: Efficient way to capt

From"Timasmith" <timasmith@THRWHITE.remove-dii-this>
Date2011-04-27 15:30 +0000
SubjectRe: Efficient way to capt
Message-ID<1171513029.632671.124530@v33g2000cwv.googlegroups.com>
In reply to#914
  To: comp.lang.java.gui,comp.l
On Feb 13, 12:47 pm, "Larry Barowski" <MElarrybar-AT-
eng_DOT_auburnANOTHERDOTeduEND> wrote:
> > If you anywhere on the (tab/frame) which is not a text field then
> > pressing a letter would take you do the default text field.
>
> > Most commonly in this application you would be in a table or a list,
> > when you start to type it takes you to the default text field.
>
> You are aware that JList has keyboard navigation using
> "letter" keys, right?

Yes, but I never use a JList - I only ever use JTable as I always end
up adding columns to a list.

Keyboard navigation by letter is not useful if your list items, a
subset of the results, primarily all begin with the same letter.

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

[toc] | [prev] | [next] | [standalone]


#930 — Re: Efficient way to capt

From"liang.spark" <liang.spark@THRWHITE.remove-dii-this>
Date2011-04-27 15:30 +0000
SubjectRe: Efficient way to capt
Message-ID<1171465370.065226.167690@s48g2000cws.googlegroups.com>
In reply to#909
  To: comp.lang.java.gui,comp.l
On 2月12日, 上午11时01分, "Timasmith" <timasm...@hotmail.com> wrote:
> Hi,
>
> I have a frame with several splitpanes or panels.  In general those
> are navigation orientated - tab, arrow up, arrow down, click etc.
>
> Whenever a user starts typing letters I want to place focus into a
> particular (default) field.  Of course if you are already in a text
> field I would ignore it.
>
> What is the most efficient way to do this without bogging down every
> keystroke with overhead?
>
> thanks
>
> Tim

try this:

KeyStroke enter= KeyStroke.getKeyStroke(KeyEvent.VK_ENTER,0,false); //
define a key stroke for "enter"
Action keyAction = new AbstractAction() {
   public void actionPerformed(Event e){
      System.out.println("Enter is pressed!");
   }
};
JPanel c=(JPanel) getContentPane(); // c is the top JComponent on your
main frame.
c.getInputMap(JComponent.WHEN_FOCUSED_WINDOW).put(enter,"enter");
c.getActionMap().put("enter",keyAction);

put above code into your Frame initialized mothed.

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.java.gui


csiph-web