@Override
protected SpeechProcessor getKeyEventProcessor() {
if (slider == null || (getUberEvent().key.getKeyCode() != KeyEvent.VK_LEFT && getUberEvent().key.getKeyCode() != KeyEvent.VK_RIGHT))
return new NullProcessor();
SliderProcessor proc = new SliderProcessor();
proc.setKeyEvent(true);
//When a checkbox is selected using the space bar read "selected" followed by the name of the checkbox followed by "Check Box"
String name = slider.getAccessibleContext().getAccessibleName();
String desc = slider.getAccessibleContext().getAccessibleDescription();
if (name != null && !name.isEmpty()) {
proc.setText(name);
}
else if (desc != null && !desc.isEmpty()) {
proc.setText(desc);
}
else {
// No usable information...
proc.setText("slider");
}
proc.setValue(slider.getValue());
proc.setMinimum(slider.getMinimum());
proc.setMaximum(slider.getMaximum());
return proc;
}