/** * Gets a DefaultMutableTreeNode representing the * information in this view instance. * * The default implementation parses the data in the URL, but a subclass may * override this method and provide a different implemenation. For example, * it may create the tree programatically. */ public DefaultMutableTreeNode getDataAsTree() { HelpSet hs = getHelpSet(); debug("helpSet in "+this+hs.toString()); Hashtable params = getParameters(); URL url; if (params == null || (params != null && !params.containsKey("data"))) { DefaultMutableTreeNode node = new DefaultMutableTreeNode(); return node; } try { url = new URL(hs.getHelpSetURL(), (String) params.get("data")); } catch (Exception ex) { throw new Error("Trouble getting URL to Index data; "+ex); } debug("url,hs: "+url.toString()+";"+hs.toString()); return parse(url, hs, hs.getLocale(), new DefaultIndexFactory()); }
Locale locale = view.getHelpSet().getLocale(); addSubHelpSets(view.getHelpSet()); return Boolean.TRUE;
private void initialize() { if (view == null) { return; } topNode = view.getDataAsTree(); treeEnum = topNode.preorderEnumeration(); String mergeType = view.getMergeType(); HelpSet hs = view.getHelpSet(); Locale locale = hs.getLocale(); // Make sure the children are all handled correctly MergeHelpUtilities.mergeNodeChildren(mergeType, topNode); // add all the subhelpsets addSubHelpSets(hs); }