if (string == null) SWT.error (SWT.ERROR_NULL_ARGUMENT);
return list.indexOf (string, start);
}
void initAccessible() {
AccessibleAdapter accessibleAdapter = new AccessibleAdapter () {
public void getName (AccessibleEvent e) {
String name = null;
Label label = getAssociatedLabel ();
if (label != null) {
name = stripMnemonic (label.getText());
}
e.result = name;
}
public void getKeyboardShortcut(AccessibleEvent e) {
String shortcut = null;
Label label = getAssociatedLabel ();
if (label != null) {
String text = label.getText ();
if (text != null) {
char mnemonic = _findMnemonic (text);
if (mnemonic != '\0') {
shortcut = "Alt+"+mnemonic; //$NON-NLS-1$
}
}
}
e.result = shortcut;
}
public void getHelp (AccessibleEvent e) {
e.result = getToolTipText ();
}
};
getAccessible ().addAccessibleListener (accessibleAdapter);
text.getAccessible ().addAccessibleListener (accessibleAdapter);
list.getAccessible ().addAccessibleListener (accessibleAdapter);
arrow.getAccessible ().addAccessibleListener (new AccessibleAdapter() {
public void getName (AccessibleEvent e) {
e.result = isDropped () ? SWT.getMessage ("SWT_Close") : SWT.getMessage ("SWT_Open"); //$NON-NLS-1$ //$NON-NLS-2$
}
public void getKeyboardShortcut (AccessibleEvent e) {
e.result = "Alt+Down Arrow"; //$NON-NLS-1$