[Blindmath] Using Java Draw2D in an SWT GUI

Carolyn MacLeod Carolyn_MacLeod at ca.ibm.com
Tue Jan 31 17:03:32 UTC 2012


Thank-you, Michael!
Carolyn



From:
"Michael Whapples" <mwhapples at aim.com>
To:
"Blind Math list for those interested in mathematics" 
<blindmath at nfbnet.org>
Date:
31/01/2012 11:30 AM
Subject:
Re: [Blindmath] Using Java Draw2D in an SWT GUI
Sent by:
blindmath-bounces at nfbnet.org



Hello,
Thanks for taking the time to do this. I know you have asked questions on 
the orca-list about improving accessibility in SWT and eclipse and its 
certainly appreciated. In my oppinion SWT is one of the few, if not the 
best, GUI toolkits for making accessible applications which are also 
cross-platform.

Regards

Michael whapples

-----Original Message----- 
From: Carolyn MacLeod
Sent: Tuesday, January 31, 2012 4:09 PM
To: blindmath at nfbnet.org
Subject: [Blindmath] Using Java Draw2D in an SWT GUI

Hello, list.

My name is Carolyn and I am on the Eclipse SWT Team.
I am the developer responsible for SWT Accessibility.

Ken Perry of Blinksoft asked me if I could help with an issue brought up
by Richard Baldwin regarding SWT being accessible but largely incompatible
with Swing/AWT.
I read several posts similar to this one:
http://host.nfbnet.org/pipermail/blindmath_nfbnet.org/2012-January/004693.html


I wrote an SWT Snippet that I hope you will find useful:
http://git.eclipse.org/c/platform/eclipse.platform.swt.git/tree/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet361.java

It shows how to host an AWT Canvas inside an SWT GUI, and use the GUI to
initiate Java2D operations within the Canvas.
I randomly chose rotation and translation of the image, but you should be
able to modify the snippet to do whatever Java2D operations you are
teaching.
The "Print Image" button uses SWT to take a screen snapshot of the Canvas
and print it to a printer.
I had not heard of a printer that embosses images before, and I think that
is really cool!

I tried this snippet on Windows (XP) with JAWS (13) and on Mac OSX
(Leopard) with VoiceOver, and on Linux (Ubuntu 10.04) with Orca and it
worked on all 3 platforms.
It should work with other platform versions and screen readers as well.
The only glitch I encountered was on Windows, if the user tabs into the
Canvas, they can't tab back out.
They need to use the button mnemonics to traverse out of the Canvas: alt+o
for Open, alt+x and alt+y for translating X and Y, alt+r for Rotate, and
alt+p for Print.
This was not an issue on Mac or Linux.

I cannot solve the deeper issues, like making SWT and AWT graphics
interchangeable without performance penalties (there are technical
issues),
or improving SWT's graphics support to the level of Java2D or more (we are
a very small and very busy team, and we simply do not have the manpower).
Hopefully this snippet will give you a work-around that is both accessible
and teaches the math you want to teach.

Carolyn
_______________________________________________
Blindmath mailing list
Blindmath at nfbnet.org
http://nfbnet.org/mailman/listinfo/blindmath_nfbnet.org
To unsubscribe, change your list options or get your account info for 
Blindmath:
http://nfbnet.org/mailman/options/blindmath_nfbnet.org/mwhapples%40aim.com 



_______________________________________________
Blindmath mailing list
Blindmath at nfbnet.org
http://nfbnet.org/mailman/listinfo/blindmath_nfbnet.org
To unsubscribe, change your list options or get your account info for 
Blindmath:
http://nfbnet.org/mailman/options/blindmath_nfbnet.org/carolyn_macleod%40ca.ibm.com







More information about the BlindMath mailing list