This week's book giveaway is in the Go forum.
We're giving away four copies of Head First Go and have Jay McGavren on-line!
See this thread for details.
Win a copy of Head First Go this week in the Go forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Devaka Cooray
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Tim Holloway
  • Claude Moore
  • Stephan van Hulst
Bartenders:
  • Winston Gutkowski
  • Carey Brown
  • Frits Walraven

Custom component accessibility help  RSS feed

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there,

I'm a newbie to Java for the most part, trying to get my feet wet by working on the Megamek project, making it accessible to the blind, including myself.

I'm struggling with the PMSimpleLabel class. It's suposed to be a JLabel equivalent that can be drawn directly on the Megamek custom PicMap widget. I want to make it accessible and allow it to be associated with other controls, much in the manner of a JLabel. I'm not sure quite how to do this.

The other programmer working on this has basically re-implemented a lot of the methods from the JLabel.AccessibleJLabel class, but the accessibility association isn't working as I'd expect. I'm 98% sure I'm missing something obvious, and owuld love to be pointed in the right direction.

In particular, I'm confused by the AccessibleRelationSet, and how it relates to accessibility properties. Am I meant to manipulate one or both directly?

This is a very simple control, and I feel like if I can get it sorted I'll be in a much better position to understand how to make the rest of this project accessible.

Thanks for any advice.
 
Marshal
Posts: 63496
207
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch

Sorry nobody has replied; maybe nobody knows. Please supply more details; those projects an classes may be unfamiliar to us all.
 
Zack Kline
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As far as I know, PicMap and PMSimpleLabel are custom classes, designed by the original authors of the project. Picmap is away to draw with layers, and the label is literally a string of text which can be positioned arbitrarily.

WHere I'm running into trouble is the integration of these custom classes with the Java accessibility framework, javax.accessibility. This has some API documentation but the bulk of the practical info on how to use it  seems to be in the Swing classes themselves, such as JLabel and JComponent.

I'm just trying to get equivalent behavior for the jLabel.setLabelFor() method. It's proving harder than I expected.
 
Campbell Ritchie
Marshal
Posts: 63496
207
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you for the additional info; I shall try duplicating your question in another forum in the hope of attracting more attention.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!