[Blindmath] Question on keyboard control of an SWT Scale object

Richard Baldwin baldwin at dickbaldwin.com
Thu Feb 16 18:14:21 UTC 2012


I am using an SWT Scale object in the GUI for my latest generation of
blind-oriented software tools. Here is an excerpt of the configuration code:

    Label scaleLabel = new Label(shell,SWT.CENTER);
    scaleLabel.setText("Slide to adjust threshold.");

    //Place a Scale object (slider) on the GUI
    scale = new Scale(shell, SWT.HORIZONTAL);
    scale.setBounds(0, 0, 40, 200);
    scale.setMaximum(100);
    scale.setMinimum(0);
    scale.setIncrement(1);
    scale.setPageIncrement(1);

I would like to find a way to make it possible for a blind user to move the
slider on the scale in both large steps and small steps while maintaining a
reasonable control strategy for mouse users.

As configured, the arrow keys cause the slider to move in one-unit
increments. Also clicking the mouse in the track causes the slider to move
one unit.

Increasing the value of the setPageIncrement parameter has no effect on
movement using the arrow keys. However, it does increase the distance that
the slider moves when the mouse is clicked in the track.

The value of the setIncrement parameter doesn't seem to have any effect for
either keyboard users or mouse users.

Holding down the shift key or the control key while pressing an arrow key
doesn't seem to have any effect.

If anyone knows how to configure the Scale object to make it possible for a
blind user to move the slider on the scale in both large steps and small
steps while maintaining a reasonable control strategy for mouse users,
please let me know.

Or, if there is a different slider-like SWT control that would be better to
use in such an application, I would like to hear about it also. By the way,
before using the Scale object, I looked into the Slider object and found it
unacceptable for my purpose.

Dick Baldwin

-- 
Richard G. Baldwin (Dick Baldwin)
Home of Baldwin's on-line Java Tutorials
http://www.DickBaldwin.com

Professor of Computer Information Technology
Austin Community College
(512) 223-4758
mailto:Baldwin at DickBaldwin.com
http://www.austincc.edu/baldwin/



More information about the BlindMath mailing list