Code example for URI

Methods: toString

0
	public Component getTreeCellRendererComponent(JTree tree, Object value, boolean sel, boolean expanded, boolean leaf, int row, boolean hasFocus) {
		Component c = super.getTreeCellRendererComponent(tree, value, sel, expanded, leaf,
				row, hasFocus);
		if (value instanceof URI) {
			URI uri = (URI) value;
			URI parent = UrlUtils.getParent(uri);
			if (parent != null) {
				setText(uri.toString().substring(parent.toString().length()));
			} 
		} 
		return c;
	} 
 
}