getBrowser().setFocus();
boolean found;
// Move to the start of page
KeyboardModifiers ctrl = new KeyboardModifiers(KeyboardModifier.ControlModifier.value());
QKeyEvent home = new QKeyEvent(Type.KeyPress, Key.Key_Home.value(), ctrl);
browser.keyPressEvent(home);
getBrowser().setFocus();
tokenizer = new StringWordTokenizer(content);
String word;
while(tokenizer.hasMoreWords()) {
word = tokenizer.nextWord();
found = getBrowser().page().findText(word);
if (found && !spellListener.abortSpellCheck) {
spellChecker.checkSpelling(new StringWordTokenizer(word));
getBrowser().setFocus();
}
}
// Go to the end of the document & finish up.
home = new QKeyEvent(Type.KeyPress, Key.Key_End.value(), ctrl);
browser.keyPressEvent(home);
if (!spellListener.errorsFound)
QMessageBox.information(this, tr("Spell Check Complete"),
tr("No Errors Found"));