code: 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);
          }
      }
docs: Render the icon for this node.
  @param writer the appender where the tree markup is appended
  @param node the node to render
  @param attrs renderer for supported attributes
  @param state the set of tree properties that are used to render the tree markup