Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 202414 | Differences between
and this patch

Collapse All | Expand All

(-)Eclipse SWT/win32/org/eclipse/swt/widgets/Link.java (+29 lines)
Lines 412-417 Link Here
412
	return text;
412
	return text;
413
}
413
}
414
414
415
boolean mnemonicHit (char key) {
416
	Composite control = this.parent;
417
	while (control != null) {
418
		Control [] children = control._getChildren ();
419
		int index = 0;
420
		while (index < children.length) {
421
			if (children [index] == this) break;
422
			index++;
423
		}
424
		index++;
425
		if (index < children.length) {
426
			if (children [index].setFocus ()) return true;
427
		}
428
		control = control.parent;
429
	}
430
	return false;
431
}
432
433
boolean mnemonicMatch (char key) {
434
	String parsed = parse (text);
435
	for (int i = 0; i < mnemonics.length; i++) {
436
		int mnemonic  = mnemonics [i];
437
		if (mnemonic != -1) {
438
			return Character.toUpperCase (key) == Character.toUpperCase (parsed.charAt (mnemonic));
439
		}
440
	}
441
	return false;
442
}
443
415
String parse (String string) {
444
String parse (String string) {
416
	int length = string.length ();
445
	int length = string.length ();
417
	offsets = new Point [length / 4];
446
	offsets = new Point [length / 4];

Return to bug 202414