Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Visual cues to represent lost focus on tree, table, etc.

Reply
Thread Tools

Visual cues to represent lost focus on tree, table, etc.

 
 
B Young
Guest
Posts: n/a
 
      11-14-2003
Open most any native Windows app and deactivate the window or swap
between controls inside the app and you'll immediately notice that
when a component like a tree or table loses focus, the renderers
change from typically a dark blue background to a light grey
background, emphasizing the loss of focus. This has several usability
advantages.

JTable, JTree, etc. don't have this behavior by default. Their
renderers do have a boolean hasFocus parameter you can use to change
the background color yourself, but this falls apart in a multiple
selection environment since the hasFocus parameter is per renderer,
not per the whole tree or table.

I'm either missing something pretty obvious, or this is just going to
be a total focus subsystem nightmare to implement completely from
scratch.

Thanks
 
Reply With Quote
 
 
 
 
B Young
Guest
Posts: n/a
 
      11-16-2003
Hmm, perhaps I should have phrased this more as a question. But, I've
searched the net for several days and haven't found a single post with
anybody talking about this particular concern with Swing.

The importance of this feature becomes obvious with certain scenerios.
Assume you have a basic GUI with a toolbar, JTree and JTable. The
toolbar has a delete button. The delete button can be used against a
node in the tree, or a row in the table, depending upon which
component has focus. You are really going to mess with the user's
head if you can't show a visual cue to indicate which component (the
treel or table) has focus.

Any feedback on how to accomplish this in an elegant fashion would be
appreciated.

(B Young) wrote in message news:<. com>...
> Open most any native Windows app and deactivate the window or swap
> between controls inside the app and you'll immediately notice that
> when a component like a tree or table loses focus, the renderers
> change from typically a dark blue background to a light grey
> background, emphasizing the loss of focus. This has several usability
> advantages.
>
> JTable, JTree, etc. don't have this behavior by default. Their
> renderers do have a boolean hasFocus parameter you can use to change
> the background color yourself, but this falls apart in a multiple
> selection environment since the hasFocus parameter is per renderer,
> not per the whole tree or table.
>
> I'm either missing something pretty obvious, or this is just going to
> be a total focus subsystem nightmare to implement completely from
> scratch.
>
> Thanks

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Appropriate clues and cues timothytoe Javascript 2 03-14-2008 11:43 PM
this.window.focus() vs. window.focus() vs. this.focus() Roger Javascript 3 03-08-2007 08:53 PM
represent a perl script in binary Alex Lee Perl 5 05-19-2004 06:54 PM
how to represent the negative value in data sequence? lezah VHDL 0 02-04-2004 04:45 PM
how to represent this in an ACL Brian Bergin Cisco 6 11-23-2003 05:40 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57