org.apache.batik.apps.svgbrowser

Class DOMViewer.Panel.NodeRenderer

protected class DOMViewer.Panel.NodeRenderer extends DefaultTreeCellRenderer

To render the tree nodes.
Field Summary
protected ImageIconcommentIcon
The icon used to represent comments.
protected ImageIconelementIcon
The icon used to represent elements.
protected ImageIconpiIcon
The icon used to represent processing instructions.
protected ImageIcontextIcon
The icon used to represent text.
Constructor Summary
NodeRenderer()
Creates a new NodeRenderer object.
Method Summary
protected shortgetNodeType(Object value)
Returns the DOM type of the given object.
ComponentgetTreeCellRendererComponent(JTree tree, Object value, boolean sel, boolean expanded, boolean leaf, int row, boolean hasFocus)
Sets the value of the current tree cell.

Field Detail

commentIcon

protected ImageIcon commentIcon
The icon used to represent comments.

elementIcon

protected ImageIcon elementIcon
The icon used to represent elements.

piIcon

protected ImageIcon piIcon
The icon used to represent processing instructions.

textIcon

protected ImageIcon textIcon
The icon used to represent text.

Constructor Detail

NodeRenderer

public NodeRenderer()
Creates a new NodeRenderer object.

Method Detail

getNodeType

protected short getNodeType(Object value)
Returns the DOM type of the given object.

Returns: the type or -1.

getTreeCellRendererComponent

public Component getTreeCellRendererComponent(JTree tree, Object value, boolean sel, boolean expanded, boolean leaf, int row, boolean hasFocus)
Sets the value of the current tree cell.
Copyright B) 2008 Apache Software Foundation. All Rights Reserved.