org.htmlparser.parserapplications.filterbuilder
Class HtmlTreeCellRenderer
DefaultTreeCellRenderer
org.htmlparser.parserapplications.filterbuilder.HtmlTreeCellRenderer
- TreeCellRenderer
public class HtmlTreeCellRenderer
extends DefaultTreeCellRenderer
implements TreeCellRenderer
Renderer for tree view of a NodeList.
Component | getTreeCellRendererComponent(JTree tree, Object value, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus) - Render the node for the tree cell.
|
String | toHtml(TagNode tag) - Render the tag as HTML.
|
String | toText(TextNode node) - Express this string node as a printable string
This is suitable for display in a debugger or output to a printout.
|
HtmlTreeCellRenderer
public HtmlTreeCellRenderer()
Create a new tree cell renderer for Nodes.
getTreeCellRendererComponent
public Component getTreeCellRendererComponent(JTree tree,
Object value,
boolean selected,
boolean expanded,
boolean leaf,
int row,
boolean hasFocus)
Render the node for the tree cell.
tree
- value
- selected
- expanded
- leaf
- row
- hasFocus
-
TreeCellRenderer.getTreeCellRendererComponent(JTree, Object, boolean, boolean, boolean, int, boolean)
toHtml
public String toHtml(TagNode tag)
Render the tag as HTML.
This is different from the tag's normal toHtml() method in that it
doesn't process children or end tags, just the initial tag, and
it also wraps the tag in html a label would expect.
tag
- The tag to convert to HTML.
- A string suitable for rendering the tag.
toText
public String toText(TextNode node)
Express this string node as a printable string
This is suitable for display in a debugger or output to a printout.
Control characters are replaced by their equivalent escape
sequence and contents is truncated to 80 characters.
node
- The node to render.
- A string representation of the string node.
| © 2005 Derrick Oswald Mai 08, 2008 |
HTML Parser is an open source library released under LGPL. |  |