Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Accessibility for custom SWT widgets
Accessibility for custom SWT widgets [message #461144] Sat, 17 September 2005 00:51 Go to next message
Bo Majewski is currently offline Bo MajewskiFriend
Messages: 17
Registered: July 2009
Junior Member
I am building a custom SWT widget. It supports "open" and "close"
operations (toggle) when clicked. I need it to support the same with
appropriate key combinations (say close and open with <- and -> arrows
and space bar for toggle). What is the proper way of implementing this? My
component extends Composite, so I can getAccessible() on it. It seems that
AccessibleControlListener is what I need, but how do I code "invoke
close() operation when you see <-"? Thanks in advance for any help.
Re: Accessibility for custom SWT widgets [message #461196 is a reply to message #461144] Mon, 19 September 2005 13:26 Go to previous messageGo to next message
Grant Gayed is currently offline Grant GayedFriend
Messages: 2150
Registered: July 2009
Senior Member
Hi Bo,

Actually the accessibility listeners are for specifying/modifying
information that's provided to screen readers and magnifiers, such as
gnopernicus. Unless I'm misreading your question, I think this falls
outside of what you're trying to do.

You can just use a KeyDown listener to listen for arrow keys and space, and
whenever they're pressed while your widget has focus then you'll be notified
and can act accordingly. For a good article on writing custom widgets see
http://eclipse.org/articles/Article-Writing%20Your%20Own%20W idget/Writing%20Your%20Own%20Widget.htm .

Please follow up if I haven't quite addressed what you're trying to do,
thanks.

Grant

"Bo Majewski" <bo@n0spam.majewski.com> wrote in message
news:pan.2005.09.17.00.51.41.869966@n0spam.majewski.com...
> I am building a custom SWT widget. It supports "open" and "close"
> operations (toggle) when clicked. I need it to support the same with
> appropriate key combinations (say close and open with <- and -> arrows
> and space bar for toggle). What is the proper way of implementing this? My
> component extends Composite, so I can getAccessible() on it. It seems that
> AccessibleControlListener is what I need, but how do I code "invoke
> close() operation when you see <-"? Thanks in advance for any help.
Re: Accessibility for custom SWT widgets [message #461261 is a reply to message #461196] Mon, 19 September 2005 20:20 Go to previous message
Bo Majewski is currently offline Bo MajewskiFriend
Messages: 17
Registered: July 2009
Junior Member
On Mon, 19 Sep 2005 09:26:34 -0400, Grant Gayed wrote:

> Actually the accessibility listeners are for specifying/modifying
> information that's provided to screen readers and magnifiers, such as
> gnopernicus.

Thanks for the explanation. I guess I will stick with what I was doing and
what you suggested as a solution: using key listeners to provide keyboard
equivalents to mouse actions.
Previous Topic:Word OLE : Open document
Next Topic:Can I handle the Properties Window event in the AWT with the SWT_AWT bridge?
Goto Forum:
  


Current Time: Wed Apr 24 17:41:09 GMT 2024

Powered by FUDForum. Page generated in 0.02925 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top