net.sf.tacos.components.tree
Class Tree

java.lang.Object
  extended by org.apache.hivemind.impl.BaseLocatable
      extended by org.apache.tapestry.AbstractComponent
          extended by org.apache.tapestry.BaseComponent
              extended by net.sf.tacos.components.tree.Tree
All Implemented Interfaces:
Locatable, LocationHolder, org.apache.tapestry.IComponent, org.apache.tapestry.IDirect, org.apache.tapestry.IDirectEvent, org.apache.tapestry.IDynamicInvoker, org.apache.tapestry.internal.Component, org.apache.tapestry.IRender, org.apache.tapestry.ITemplateComponent

public abstract class Tree
extends org.apache.tapestry.BaseComponent
implements org.apache.tapestry.IDirect

Base component for providing Tree-like semantics for displaying data.

Author:
phraktle

Field Summary
 
Fields inherited from class org.apache.tapestry.AbstractComponent
_body, _bodyCount
 
Constructor Summary
Tree()
           
 
Method Summary
 void beforeRenderBody(org.apache.tapestry.IMarkupWriter writer, org.apache.tapestry.IRequestCycle cycle, Serializable partId, boolean isRendering)
          
 void contentExpansion(org.apache.tapestry.IRequestCycle cycle)
          Invoked by contentLinkToggle component, will invoke expansion(IRequestCycle) first before checking if the invoking component specified an IActionListener and any optional parameters it may need.
 void expansion(org.apache.tapestry.IRequestCycle cycle)
          Called to request the expansion of a tree node.
abstract  ITreeContentProvider getContentProvider()
          Injected content provider
 boolean getCurrentHasChildren()
          Used to pass self into PartialForeach.
 Serializable getCurrentKey()
           
 boolean getCurrentNotExpanded()
           
 String getCurrentOffset()
           
abstract  org.apache.tapestry.engine.IEngineService getDirectService()
          Injected ajax engine
 IKeyProvider getIdentityKeyProvider()
          The default IdentityKeyProvider.
abstract  IKeyProvider getKeyProvider()
          Injected key provider
abstract  org.apache.tapestry.IActionListener getLinkListener()
          Listener to invoke
abstract  org.apache.tapestry.listener.ListenerInvoker getListenerInvoker()
          For invoking linkToggleListener, if it exists
abstract  String getLoadElement()
          Delayed loading display element id
 ITreeManager getManager()
           
abstract  int getOffset()
          The offset in pixels for depth-indentation
abstract  String getPartialBlockClass()
          Partial block class
 org.apache.tapestry.IMarkupWriter getPartWriter(Serializable partId)
          
abstract  org.apache.tapestry.bean.EvenOdd getRowStyle()
          Optional EvenOdd component
abstract  org.apache.tapestry.IScript getScript()
          Injected script
abstract  Comparator getSorter()
          Injected sort Comparator
abstract  Set getState()
          Gets default/specified state
 TreeIterator getTreeIterator()
          The default TreeIterator provided if no other is specified.
abstract  Object getValue()
          Current value being rendered
 void incrementNonRenderBlock()
          
abstract  boolean isDelayedLoad()
          Delayed loading parameter
 boolean isExpanded(Object element)
           
abstract  boolean isRowStyleInOuterDiv()
          Where to apply the row style
 boolean isStateful()
          
protected  void renderComponent(org.apache.tapestry.IMarkupWriter writer, org.apache.tapestry.IRequestCycle cycle)
          
abstract  void setState(Set state)
          Saves tree state
 void trigger(org.apache.tapestry.IRequestCycle cycle)
          
 
Methods inherited from class org.apache.tapestry.BaseComponent
addOuter, finishLoad, getContainedRenderers, getInnerRenderers
 
Methods inherited from class org.apache.tapestry.AbstractComponent
addAsset, addBody, addComponent, checkActiveLock, cleanupAfterRender, enterActiveState, equals, finishLoad, generateClientId, getAsset, getAssets, getBeans, getBinding, getBindingNames, getBindings, getBody, getBodyCount, getBoundId, getClientId, getComponent, getComponents, getContainedComponent, getContainer, getEventInvoker, getExtendedId, getId, getIdPath, getListeners, getMessages, getNamespace, getPage, getRenderWorker, getSpecification, getSpecifiedId, getTemplateTagName, hasEvents, hashCode, isInActiveState, isParameterBound, isRendering, pageEndRender, peekClientId, prepareForRender, render, renderBody, renderIdAttribute, renderInformalParameters, setBinding, setClientId, setContainedComponent, setContainer, setHasEvents, setId, setNamespace, setPage, setTemplateTagName, toString, triggerEvent
 
Methods inherited from class org.apache.hivemind.impl.BaseLocatable
getLocation, setLocation
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.tapestry.IComponent
addAsset, addBody, addComponent, enterActiveState, finishLoad, getAsset, getAssets, getBeans, getBinding, getBindingNames, getBindings, getClientId, getComponent, getComponents, getContainedComponent, getContainer, getEventInvoker, getExtendedId, getId, getIdPath, getListeners, getMessages, getNamespace, getPage, getSpecification, getSpecifiedId, getTemplateTagName, isRendering, peekClientId, renderBody, setBinding, setClientId, setContainedComponent, setContainer, setId, setNamespace, setPage, setTemplateTagName
 
Methods inherited from interface org.apache.tapestry.IRender
render
 
Methods inherited from interface org.apache.hivemind.LocationHolder
setLocation
 
Methods inherited from interface org.apache.hivemind.Locatable
getLocation
 
Methods inherited from interface org.apache.tapestry.IDynamicInvoker
getUpdateComponents, isAsync, isJson
 

Constructor Detail

Tree

public Tree()
Method Detail

getIdentityKeyProvider

public IKeyProvider getIdentityKeyProvider()
The default IdentityKeyProvider.

Returns:
The default key provider.

getTreeIterator

public TreeIterator getTreeIterator()
The default TreeIterator provided if no other is specified.

Returns:
Instance of TreeIterator

renderComponent

protected void renderComponent(org.apache.tapestry.IMarkupWriter writer,
                               org.apache.tapestry.IRequestCycle cycle)

Overrides:
renderComponent in class org.apache.tapestry.BaseComponent

expansion

public void expansion(org.apache.tapestry.IRequestCycle cycle)
Called to request the expansion of a tree node.

Parameters:
cycle -

contentExpansion

public void contentExpansion(org.apache.tapestry.IRequestCycle cycle)
Invoked by contentLinkToggle component, will invoke expansion(IRequestCycle) first before checking if the invoking component specified an IActionListener and any optional parameters it may need.

Parameters:
cycle -

isExpanded

public boolean isExpanded(Object element)
Parameters:
element - to test expanded of
Returns:
True if element should be displayed/expanded.

getManager

public ITreeManager getManager()
Returns:
The ITreeManager for this tree.

beforeRenderBody

public void beforeRenderBody(org.apache.tapestry.IMarkupWriter writer,
                             org.apache.tapestry.IRequestCycle cycle,
                             Serializable partId,
                             boolean isRendering)


incrementNonRenderBlock

public void incrementNonRenderBlock()


getPartWriter

public org.apache.tapestry.IMarkupWriter getPartWriter(Serializable partId)


getCurrentHasChildren

public boolean getCurrentHasChildren()
Used to pass self into PartialForeach.

Returns:

getCurrentKey

public Serializable getCurrentKey()

getCurrentNotExpanded

public boolean getCurrentNotExpanded()

getCurrentOffset

public String getCurrentOffset()

isStateful

public boolean isStateful()

Specified by:
isStateful in interface org.apache.tapestry.IDirect
Specified by:
isStateful in interface org.apache.tapestry.IDirectEvent
Overrides:
isStateful in class org.apache.tapestry.AbstractComponent

trigger

public void trigger(org.apache.tapestry.IRequestCycle cycle)

Specified by:
trigger in interface org.apache.tapestry.IDirect

getScript

public abstract org.apache.tapestry.IScript getScript()
Injected script


getDirectService

public abstract org.apache.tapestry.engine.IEngineService getDirectService()
Injected ajax engine


getValue

public abstract Object getValue()
Current value being rendered


getState

public abstract Set getState()
Gets default/specified state


setState

public abstract void setState(Set state)
Saves tree state


getContentProvider

public abstract ITreeContentProvider getContentProvider()
Injected content provider


getKeyProvider

public abstract IKeyProvider getKeyProvider()
Injected key provider


getSorter

public abstract Comparator getSorter()
Injected sort Comparator


getRowStyle

public abstract org.apache.tapestry.bean.EvenOdd getRowStyle()
Optional EvenOdd component


getOffset

public abstract int getOffset()
The offset in pixels for depth-indentation


isRowStyleInOuterDiv

public abstract boolean isRowStyleInOuterDiv()
Where to apply the row style


getPartialBlockClass

public abstract String getPartialBlockClass()
Partial block class


getListenerInvoker

public abstract org.apache.tapestry.listener.ListenerInvoker getListenerInvoker()
For invoking linkToggleListener, if it exists


getLinkListener

public abstract org.apache.tapestry.IActionListener getLinkListener()
Listener to invoke


isDelayedLoad

public abstract boolean isDelayedLoad()
Delayed loading parameter


getLoadElement

public abstract String getLoadElement()
Delayed loading display element id



Copyright © 2005-2008 SourceForge.net. All Rights Reserved.