info.aduna.gee.spectacle.gee
Class DefaultSectionRenderer

java.lang.Object
  extended by info.aduna.gee.spectacle.gee.SectionRenderer
      extended by info.aduna.gee.spectacle.gee.DefaultSectionRenderer
All Implemented Interfaces:
CustomizingSectionRenderer

public class DefaultSectionRenderer
extends SectionRenderer
implements CustomizingSectionRenderer

DefaultSectionRenderer provides a flexible and powerful implementation of a SectionRenderer. Unless your goals differ too much from a lot of projects realized so far, there should be no need to build your own SectionRenderer. And if you must, you might subclass either DefaultSectionRenderer or (preferably) RenderUtil.


Field Summary
 
Fields inherited from class info.aduna.gee.spectacle.gee.SectionRenderer
_channel, _context, _maxDepth, _minBranchEntities, _recordOccurringLabels, _recordTheseOccurringLabels, _slash, _theTree, ALL, NONE, SOME
 
Constructor Summary
DefaultSectionRenderer(RenderUtil renderUtil)
          This constructor is useful when you want the default section renderer, combined with a slightly modified render utility.
DefaultSectionRenderer(String source, String intermediateID, String leafID, String labelStub, String cover, String metaDesignName, int maxMetaOnPage)
           
 
Method Summary
protected  void _render(String path, NavigationTree tree)
          Required by SectionRenderer.
 void customizeOverviewEntity(Entity overviewEntity, boolean isLeaf)
          Required by CustomizingSectionRenderer.
 boolean handleSection(String path, NavigationTree node, Entity overviewEntity)
          Required by CustomizingSectionRenderer.
 
Methods inherited from class info.aduna.gee.spectacle.gee.SectionRenderer
_setTreeRoot, getChannel, getMaxDepth, getMinBranchEntities, getRecordOccurringLabels, getRecordTheseOccurringLabels, getSlash, getTreeRoot, render, setMaxDepth, setMinBranchEntities, setRecordEntities, setRecordOccurringLabels, setSlash
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultSectionRenderer

public DefaultSectionRenderer(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

DefaultSectionRenderer

public DefaultSectionRenderer(RenderUtil renderUtil)
This constructor is useful when you want the default section renderer, combined with a slightly modified render utility. Subclass the renderUtil and feed an instance of that subclass to this constructor.

Parameters:
renderUtil - the actual renderer.
Method Detail

_render

protected void _render(String path,
                       NavigationTree tree)
                throws ChannelException
Required by SectionRenderer.

Specified by:
_render in class SectionRenderer
Parameters:
path - the current path in the NavigationTree, i.e. the name of the Section to render
tree - the node in the NavigationTree to render
Throws:
ChannelException
See Also:
SectionRenderer.render(info.aduna.gee.spectacle.gee.NavigationSpecification, info.aduna.gee.spectacle.gee.EntityContext, info.aduna.gee.spectacle.webserver.Channel)

handleSection

public boolean handleSection(String path,
                             NavigationTree node,
                             Entity overviewEntity)
Required by CustomizingSectionRenderer. It's empty and sub-classes may override it.

Specified by:
handleSection in interface CustomizingSectionRenderer
Parameters:
path - The path of the current section, including the current chunk.
node - The current spot in the NavigationTree.
overviewEntity - The (proposed) overview entity.
Returns:
false
See Also:
SectionRenderer.getChannel()

customizeOverviewEntity

public void customizeOverviewEntity(Entity overviewEntity,
                                    boolean isLeaf)
Required by CustomizingSectionRenderer. It's empty and sub-classes may override it.

Specified by:
customizeOverviewEntity in interface CustomizingSectionRenderer
Parameters:
overviewEntity - the overview entity to be rendered in a section
isLeaf - if true, the section is a leaf, otherwise the section will have subsections


Copyright © 1997-2008 Aduna. All Rights Reserved.