|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectinfo.aduna.gee.spectacle.gee.SectionRenderer
public abstract class SectionRenderer
Class SectionRenderer provides a mechanism to fully realize NavigationSpecification. The NavigationSpecification is instantiated occurding to a set of Entities and this results in a NavigationTree. The NavigationTree is rendered in a Channel.
| Field Summary | |
|---|---|
protected Channel |
_channel
|
protected EntityContext |
_context
|
protected int |
_maxDepth
The maximum depth allowed for the navigation, i.e. |
protected int |
_minBranchEntities
The minimum number of Entities required to calculate deeper branches. |
protected int |
_recordOccurringLabels
Do you need a set of Occurring labels at each node ? Either ALL, NONE or SOME. |
protected Set |
_recordTheseOccurringLabels
The restricted set of Occurring labels at each node in case of SOME. |
protected char |
_slash
The default character that replaces '/' in tree node names. |
protected NavigationTree |
_theTree
|
static int |
ALL
|
static int |
NONE
|
static int |
SOME
|
| Constructor Summary | |
|---|---|
SectionRenderer()
|
|
| Method Summary | |
|---|---|
protected abstract void |
_render(String path,
NavigationTree tree)
Perform the actual rendering of a node in the tree. |
protected void |
_setTreeRoot(NavigationTree tree)
Set the root of the tree currently rendered. |
Channel |
getChannel()
|
int |
getMaxDepth()
|
int |
getMinBranchEntities()
|
int |
getRecordOccurringLabels()
|
Set |
getRecordTheseOccurringLabels()
|
char |
getSlash()
|
NavigationTree |
getTreeRoot()
Get the root of the tree currently rendered (or null otherwise). |
void |
render(NavigationSpecification navigationSpec,
EntityContext context,
Channel channel)
Perform the actual rendering. |
void |
setMaxDepth(int max)
Set the maximum depth allowed for the navigation, i.e. |
void |
setMinBranchEntities(int min)
Most applications stop the navigation when e.g. |
void |
setRecordEntities(int value)
Deprecated. the call is totally ignored |
void |
setRecordOccurringLabels(int value,
Set labels)
This method exists for memory or CPU tuning only. |
void |
setSlash(char slash)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int NONE
public static final int SOME
public static final int ALL
protected EntityContext _context
protected Channel _channel
protected NavigationTree _theTree
protected int _minBranchEntities
protected int _maxDepth
protected char _slash
protected int _recordOccurringLabels
protected Set _recordTheseOccurringLabels
| Constructor Detail |
|---|
public SectionRenderer()
| Method Detail |
|---|
public int getMinBranchEntities()
public void setMinBranchEntities(int min)
min - the minimum number (inclusive) of Entities required to
offer further subnavigationpublic int getMaxDepth()
public void setMaxDepth(int max)
max - the maximum number (inclusive) of navigation stepspublic char getSlash()
public void setSlash(char slash)
slash - the character that replaces '/' in each navigation steppublic void setRecordEntities(int value)
public int getRecordOccurringLabels()
public Set getRecordTheseOccurringLabels()
public void setRecordOccurringLabels(int value,
Set labels)
value - one of ALL, NONE, SOMElabels - the set to record (if value equals SOME) or null
public void render(NavigationSpecification navigationSpec,
EntityContext context,
Channel channel)
throws ChannelException
navigationSpec - the NavigationSpecification to rendercontext - the EntityContext that provides the Entitieschannel - the Channel in which to render the sections
ChannelException
protected abstract void _render(String path,
NavigationTree tree)
throws ChannelException
path - the current path in the NavigationTree, i.e. the
name of the Section to rendertree - the node in the NavigationTree to render
ChannelExceptionpublic Channel getChannel()
public NavigationTree getTreeRoot()
protected void _setTreeRoot(NavigationTree tree)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||