/** * Reloads data from new model, creates new search engine to search in new model if model contains * view with the same name */ private void reloadData(HelpModel model) { debug("reloadData using new model"); helpsearch = null; SearchView view = null; newHelpSet = model.getHelpSet(); SearchView oldView = (SearchView) searchnav.getNavigatorView(); String oldName = oldView.getName(); NavigatorView[] navViews = newHelpSet.getNavigatorViews(); for (int i = 0; i < navViews.length; i++) { if ((navViews[i].getName()).equals(oldName)) { NavigatorView tempView = navViews[i]; if (tempView instanceof SearchView) { view = (SearchView) tempView; break; } } } if (view == null) return; topNode.removeAllChildren(); searchnav.setSearchEngine(new MergingSearchEngine(view)); setCellRenderer(view, tree); // add all subhelpsets addSubHelpSets(newHelpSet); }
public BasicSearchNavigatorUI(JHelpSearchNavigator b) { ImageIcon icon = getImageIcon(b.getNavigatorView()); if (icon != null) { setIcon(icon); } else { setIcon(UIManager.getIcon("SearchNav.icon")); } }
/** Indicates that there is new search data to use. */ private void reloadData() { helpsearch = null; setCellRenderer(searchnav.getNavigatorView(), tree); // add all subhelpsets HelpModel model = searchnav.getModel(); if (model != null) { addSubHelpSets(model.getHelpSet()); } }