1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-07 17:56:01 +02:00

fix for bug 189326 - manually add labels to controls for accessibility

This commit is contained in:
Vivian Kong 2007-05-30 19:51:43 +00:00
parent 257295f752
commit df40b25a13

View file

@ -7,6 +7,7 @@
* *
* Contributors: * Contributors:
* Nokia - initial API and implementation * Nokia - initial API and implementation
* IBM Corporation
*******************************************************************************/ *******************************************************************************/
package org.eclipse.cdt.debug.ui.importexecutable; package org.eclipse.cdt.debug.ui.importexecutable;
@ -38,6 +39,8 @@ import org.eclipse.jface.viewers.LabelProvider;
import org.eclipse.jface.viewers.Viewer; import org.eclipse.jface.viewers.Viewer;
import org.eclipse.jface.wizard.WizardPage; import org.eclipse.jface.wizard.WizardPage;
import org.eclipse.swt.SWT; import org.eclipse.swt.SWT;
import org.eclipse.swt.accessibility.AccessibleAdapter;
import org.eclipse.swt.accessibility.AccessibleEvent;
import org.eclipse.swt.events.FocusAdapter; import org.eclipse.swt.events.FocusAdapter;
import org.eclipse.swt.events.FocusEvent; import org.eclipse.swt.events.FocusEvent;
import org.eclipse.swt.events.ModifyEvent; import org.eclipse.swt.events.ModifyEvent;
@ -261,6 +264,13 @@ public class ImportExecutablePageOne extends WizardPage {
}); });
executablesViewer.setInput(this); executablesViewer.setInput(this);
executablesViewer.getTree().getAccessible().addAccessibleListener(
new AccessibleAdapter() {
public void getName(AccessibleEvent e) {
e.result = wizard.getExecutableListLabel();
}
}
);
createSelectionButtons(listComposite); createSelectionButtons(listComposite);
} }
@ -287,7 +297,13 @@ public class ImportExecutablePageOne extends WizardPage {
// project location entry field // project location entry field
this.multipleExecutablePathField = new Text(workArea, SWT.BORDER); this.multipleExecutablePathField = new Text(workArea, SWT.BORDER);
multipleExecutablePathField.getAccessible().addAccessibleListener(
new AccessibleAdapter() {
public void getName(AccessibleEvent e) {
e.result = Messages.ImportExecutablePageOne_SearchDirectory;
}
}
);
this.multipleExecutablePathField.setLayoutData(new GridData( this.multipleExecutablePathField.setLayoutData(new GridData(
GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL)); GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL));
selectMultipleBrowseButton = new Button(workArea, SWT.PUSH); selectMultipleBrowseButton = new Button(workArea, SWT.PUSH);
@ -401,6 +417,13 @@ public class ImportExecutablePageOne extends WizardPage {
// project location entry field // project location entry field
this.singleExecutablePathField = new Text(workArea, SWT.BORDER); this.singleExecutablePathField = new Text(workArea, SWT.BORDER);
singleExecutablePathField.getAccessible().addAccessibleListener(
new AccessibleAdapter() {
public void getName(AccessibleEvent e) {
e.result = Messages.ImportExecutablePageOne_SelectExecutable;
}
}
);
// Set the data name field so Abbot based tests can find it. // Set the data name field so Abbot based tests can find it.
singleExecutablePathField.setData("name", "singleExecutablePathField"); singleExecutablePathField.setData("name", "singleExecutablePathField");
singleExecutablePathField.addModifyListener(new ModifyListener() { singleExecutablePathField.addModifyListener(new ModifyListener() {