public void navigateTo(String rawHref) { this.prevIndex = this.getIndex(); this.prevPos = this.getPosition(); // URLDecode the href, so it does not contain %20 etc. String href = URLDecoder.decode(StringUtil.substringBefore(rawHref, Constants.FRAGMENT_SEPARATOR_CHAR)); // Don't decode the anchor. String anchor = StringUtil.substringAfterLast(rawHref, Constants.FRAGMENT_SEPARATOR_CHAR); if (!"".equals(anchor)) { this.storedAnchor = anchor; } // Just an anchor and no href; resolve it on this page if (href.length() == 0) { restorePosition(); } else { this.strategy.clearText(); this.strategy.setPosition(0); if (this.spine.navigateByHref(href)) { loadText(); } else { executeTask(new LoadTextTask(), href); } } }
private void loadText(List<SearchTextTask.SearchResult> hightListResults) { executeTask(new LoadTextTask(hightListResults)); }
void loadText() { executeTask(new LoadTextTask()); }