org.apache.myfaces.custom.tree.renderkit.html

Class HtmlTreeRenderer


public class HtmlTreeRenderer
extends HtmlTableRendererBase

Version:
$Revision: 239380 $ $Date: 2005-08-23 11:11:59 +0200 (Tue, 23 Aug 2005) $
Author:
Oliver Rossmueller

Field Summary

Fields inherited from class org.apache.myfaces.renderkit.html.HtmlTableRendererBase

FOOTER_FACET_NAME, HEADER_FACET_NAME

Method Summary

void
encodeBegin(FacesContext facesContext, UIComponent uiComponent)
void
encodeChildren(FacesContext facesContext, UIComponent component)
void
encodeEnd(FacesContext facesContext, UIComponent component)
protected String
getLayoutImage(HtmlTree tree, int state)
boolean
getRendersChildren()
protected void
renderChildren(FacesContext facesContext, ResponseWriter writer, HtmlTree tree, List children, int maxLevel, IconProvider iconProvider, UIComponent component)
Renders the children.
protected void
renderChildren(FacesContext facesContext, ResponseWriter writer, HtmlTree tree, List children, int maxLevel, IconProvider iconProvider, int rowClassIndex, UIComponent component)
Renders the children given the rowClassIndex.
protected void
renderColumnFooterRow(FacesContext facesContext, ResponseWriter writer, UIComponent component, String footerStyleClass, int maxLevel)
protected void
renderColumnHeaderRow(FacesContext facesContext, ResponseWriter writer, UIComponent component, String headerStyleClass, int maxLevel)
protected void
renderFacet(FacesContext facesContext, ResponseWriter writer, UIComponent component, boolean header, int maxLevel)
Overrides super renderFacet to render the HtmlTree facets.
protected void
renderTreeColumnChild(FacesContext facesContext, ResponseWriter writer, UIComponent component, HtmlTree tree, HtmlTreeNode child, int maxLevel, IconProvider iconProvider)
Render the column where the tree is displayed.

Methods inherited from class org.apache.myfaces.renderkit.html.HtmlTableRendererBase

afterRow, afterTable, beforeRow, beforeTable, decode, determineChildColSpan, encodeBegin, encodeChildren, encodeColumnChild, encodeEnd, encodeInnerHtml, getFooterClass, getHeaderClass, getRendersChildren, hasFacet, renderColumnBody, renderColumnChildHeaderOrFooterRow, renderColumnFooterCell, renderColumnFooterCell, renderColumnFooterRow, renderColumnHeaderCell, renderColumnHeaderCell, renderColumnHeaderRow, renderFacet, renderRowEnd, renderRowStart, renderRowStyle, renderTableFooterRow, renderTableHeaderRow

Methods inherited from class org.apache.myfaces.renderkit.html.HtmlRenderer

encodeChildren

Method Details

encodeBegin

public void encodeBegin(FacesContext facesContext,
                        UIComponent uiComponent)
            throws IOException
Overrides:
encodeBegin in interface HtmlTableRendererBase
See Also:
javax.faces.render.Renderer.encodeBegin(FacesContext, UIComponent)

encodeChildren

public void encodeChildren(FacesContext facesContext,
                           UIComponent component)
            throws IOException
Overrides:
encodeChildren in interface HtmlTableRendererBase
See Also:
javax.faces.render.Renderer.encodeChildren(FacesContext, UIComponent)

encodeEnd

public void encodeEnd(FacesContext facesContext,
                      UIComponent component)
            throws IOException
Overrides:
encodeEnd in interface HtmlTableRendererBase
See Also:
javax.faces.render.Renderer.encodeEnd(FacesContext, UIComponent)

getLayoutImage

protected String getLayoutImage(HtmlTree tree,
                                int state)

getRendersChildren

public boolean getRendersChildren()
Overrides:
getRendersChildren in interface HtmlTableRendererBase
See Also:
javax.faces.render.Renderer.getRendersChildren()

renderChildren

protected void renderChildren(FacesContext facesContext,
                              ResponseWriter writer,
                              HtmlTree tree,
                              List children,
                              int maxLevel,
                              IconProvider iconProvider,
                              UIComponent component)
            throws IOException
Renders the children.
Parameters:
facesContext - The facesContext.
writer - The writer.
tree - The tree component.
children - The children to render.
maxLevel - The maximum level.
iconProvider - The icon provider.

renderChildren

protected void renderChildren(FacesContext facesContext,
                              ResponseWriter writer,
                              HtmlTree tree,
                              List children,
                              int maxLevel,
                              IconProvider iconProvider,
                              int rowClassIndex,
                              UIComponent component)
            throws IOException
Renders the children given the rowClassIndex.
Parameters:
facesContext - The facesContext.
writer - The writer.
tree - The tree component.
children - The children to render.
maxLevel - The maximum level.
iconProvider - The icon provider.
rowClassIndex - The row class index.

renderColumnFooterRow

protected void renderColumnFooterRow(FacesContext facesContext,
                                     ResponseWriter writer,
                                     UIComponent component,
                                     String footerStyleClass,
                                     int maxLevel)
            throws IOException

renderColumnHeaderRow

protected void renderColumnHeaderRow(FacesContext facesContext,
                                     ResponseWriter writer,
                                     UIComponent component,
                                     String headerStyleClass,
                                     int maxLevel)
            throws IOException

renderFacet

protected void renderFacet(FacesContext facesContext,
                           ResponseWriter writer,
                           UIComponent component,
                           boolean header,
                           int maxLevel)
            throws IOException
Parameters:
facesContext - The facesContext
writer - The writer.
component - The component.
header - Whether there is a header.
maxLevel - The max level for the rendered tree.

renderTreeColumnChild

protected void renderTreeColumnChild(FacesContext facesContext,
                                     ResponseWriter writer,
                                     UIComponent component,
                                     HtmlTree tree,
                                     HtmlTreeNode child,
                                     int maxLevel,
                                     IconProvider iconProvider)
            throws IOException
Render the column where the tree is displayed.
Parameters:
facesContext - The facesContext.
writer - The writer.
component - The component that will contain the tree. Null for default tree or HtmlTreeColumnfor table rendering.
tree - The tree,
child - The tree node child.
maxLevel - The max number of levels.
iconProvider - The iconProvider.