@Override public String getText(boolean selected) { // Strip out HTML tags return selected ? Util.stripHtml(text). replaceAll("<", "<").replaceAll(">", ">") : text; }
@Override public String getText(boolean selected) { // Strip out HTML tags return selected ? Util.stripHtml(text). replaceAll("<", "<").replaceAll(">", ">") : text; }
/** * Refreshes what children are visible in the tree. */ @SuppressWarnings({ "unchecked", "rawtypes" }) private void refreshVisibleChildren() { visibleChildren.clear(); if (children!=null) { visibleChildren.addAll(children); if (sortable && sorted) { Collections.sort((Vector)visibleChildren); } if (pattern!=null) { for (Iterator i=visibleChildren.iterator(); i.hasNext(); ) { TreeNode node = (TreeNode)i.next(); if (node.isLeaf()) { String text = node.toString(); text = Util.stripHtml(text); if (!pattern.matcher(text).find()) { //System.out.println(pattern + ": Removing tree node: " + text); i.remove(); } } } } } }