info.aduna.gee.spectacle.gee
Class RenderUtil

java.lang.Object
  extended by info.aduna.gee.spectacle.gee.RenderUtil

public class RenderUtil
extends Object

A RenderUtil is the object that contains the shared intelligence underlying DefaultSectionRenderer and DefaultJitSectionRenderer. It is the RenderUtil that (by calling NavigationTree's getBranches()) controls the expansion of the NavigationTree. The only difference in how DefaultSectionRenderer and DefaultJitSectionRenderer use the RenderUtil is in the last argument of the renderNode() call. As a result, the DefaultSectionRenderer expands the full NavigationTree, DefaultJitSectionRenderer only expands a single node at a time.


Field Summary
protected  String _cover
           
protected  EntryRenderer _intermediateRenderer
           
protected  String _interTemplateID
           
protected  String _labelStub
           
protected  EntryRenderer _leafRenderer
           
protected  String _leafTemplateID
           
protected  String _metaDesign
           
protected  int _metaDesignLimit
           
protected  String _templateSource
           
 
Constructor Summary
RenderUtil()
          To be used by Serialization only.
RenderUtil(String source, String intermediateID, String leafID, String labelStub, String cover, String metaDesignName, int maxMetaOnPage)
           
 
Method Summary
 String getCover()
           
 void renderNode(SectionRenderer renderer, String path, NavigationTree tree, boolean renderBranches)
          Render a node and optionally, render its children.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_templateSource

protected String _templateSource

_interTemplateID

protected String _interTemplateID

_leafTemplateID

protected String _leafTemplateID

_labelStub

protected String _labelStub

_cover

protected String _cover

_metaDesignLimit

protected int _metaDesignLimit

_metaDesign

protected String _metaDesign

_intermediateRenderer

protected EntryRenderer _intermediateRenderer

_leafRenderer

protected EntryRenderer _leafRenderer
Constructor Detail

RenderUtil

public RenderUtil()
To be used by Serialization only.


RenderUtil

public RenderUtil(String source,
                  String intermediateID,
                  String leafID,
                  String labelStub,
                  String cover,
                  String metaDesignName,
                  int maxMetaOnPage)
Parameters:
source - the channel containing the templates
intermediateID - the id of the template to use for intermediate sections
leafID - the id of the template to use for leaf sections
labelStub - the template stub that represents the label selection
cover - the name of the cover or null
metaDesignName - the cover design for meta pages or null
maxMetaOnPage - the maximum (inclusive) number of meta's for which the meta design is used
Method Detail

renderNode

public void renderNode(SectionRenderer renderer,
                       String path,
                       NavigationTree tree,
                       boolean renderBranches)
                throws ChannelException
Render a node and optionally, render its children.

Parameters:
renderer - the renderer that initiated this call; it is passed for two properties only, the channel in which it is (currently!) rendering and the shared cache of identical subtrees.
path - the path to the current node
tree - the navigation tree at the current node
renderBranches - if true, render branches, otherwise only render this node (and AVOID looking forward)
Throws:
ChannelException
See Also:
SectionRenderer.getChannel(), NavigationTree.getBranches()

getCover

public String getCover()
Returns:
the name of cover


Copyright © 1997-2008 Aduna. All Rights Reserved.