protected void renderItemIcon ( AbstractRenderAppender writer , TreeElement node , AttributeRenderer attrs , InheritableState state ) { renderItemIconPrefix ( writer , node ) ; // There should always be one unless the tree turns off default // icons by setting the useDefaultIcons attribute to false. String icon = node . getIcon ( ) ; if ( icon == null ) { icon = state . getIconRoot ( ) + "/" + state . getItemIcon ( ) ; } else { icon = state . getIconRoot ( ) + "/" + icon ; } // write out the icon if ( icon != null ) { _imgState . clear ( ) ; _imgState . src = icon ; _imgState . style = "vertical-align:text-top" ; String alt = null ; String label = node . getLabel ( ) ; if ( label != null && node . isLabelLegalAsAlt ( ) ) alt = label ; else alt = node . getTitle ( ) ; if ( alt == null ) alt = Bundle . getString ( "Tags_TreeAltText" , null ) ; _imgState . registerAttribute ( AbstractHtmlState . ATTR_GENERAL , ALT , alt , false ) ; _imgState . registerAttribute ( AbstractHtmlState . ATTR_GENERAL , BORDER , "0" ) ; // set the inheritted attributes attrs . renderIconImage ( _imgState , node ) ; _imageRenderer . doStartTag ( writer , _imgState ) ; _imageRenderer . doEndTag ( writer ) ; renderItemIconSuffix ( writer , node ) ; } }
Render the icon for this node .