@Override public void changing(LocationEvent event) { String url = event.location; if (url == null) return; URLParser parser = new URLParser(url); if (parser.isValidURI()) { // stop URL first. event.doit = false; // execute the action embedded in the IntroURL parser.runURL(); } }
public void changed(LocationEvent event) { if (object == null) { return; } log.info(event.getSource()); String newUrl = browser.getUrl(); String name = newUrl.substring(newUrl.lastIndexOf(File.separator) + 1, newUrl.length() - 5); log.info(name); if (name.startsWith("mod_")) { name = name.substring(4); } ICoverageObject newObj; if ((newObj = object.treeSearch(name)) != null) { // TODO -> findChild setObject(newObj); if (object.getParent() == null) { up.setEnabled(false); next.setEnabled(false); prev.setEnabled(false); } else { up.setEnabled(true); if (object.getParent().getNextSiblingTo(object.getLabel()) == null) { next.setEnabled(false); } else { next.setEnabled(true); } if (object.getParent().getPrevSiblingTo(object.getLabel()) == null) { prev.setEnabled(false); } else { prev.setEnabled(true); } } } }