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.
Sorry nobody has replied; maybe nobody knows. Please supply more details; those projects an classes may be unfamiliar to us all.
posted 1 week ago
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.
posted 1 week ago
Thank you for the additional info; I shall try duplicating your question in another forum in the hope of attracting more attention.