net.sf.tacos.demo.pages.ajax
Class TreeExample

java.lang.Object
  extended by org.apache.hivemind.impl.BaseLocatable
      extended by org.apache.tapestry.AbstractComponent
          extended by org.apache.tapestry.BaseComponent
              extended by org.apache.tapestry.AbstractPage
                  extended by org.apache.tapestry.html.BasePage
                      extended by net.sf.tacos.demo.pages.ajax.TreeExample
All Implemented Interfaces:
Locatable, LocationHolder, org.apache.tapestry.IComponent, org.apache.tapestry.IPage, org.apache.tapestry.IRender, org.apache.tapestry.ITemplateComponent

public abstract class TreeExample
extends org.apache.tapestry.html.BasePage

Author:
phraktle

Constructor Summary
TreeExample()
           
 
Method Summary
 void collapseAll(org.apache.tapestry.IRequestCycle cycle)
          Collapses all nodes
 void expandAll(org.apache.tapestry.IRequestCycle cycle)
          Makes all nodes visible
abstract  AjaxWebRequest getAjaxWebRequest()
          Injected ajax request
 ITreeContentProvider getContentProvider()
          Gets the content provider
abstract  Set getFileState()
          the tree state
protected  File getIntersectingParent(File f1, File f2)
          If specified files are both contained by a parent file, that isn't the file returned from getRootPath() this method returns that file.
 IKeyProvider getKeyProvider()
          Gets the key provider
abstract  File getSelectedFile()
          get file
 ITreeManager getTreeManager()
          The tree manager
 void revealSelected(org.apache.tapestry.IRequestCycle cycle)
          Reveals a particular node
 void select(org.apache.tapestry.IRequestCycle cycle)
          Selects a file
abstract  void setSelectedFile(File file)
          sets file
 
Methods inherited from class org.apache.tapestry.html.BasePage
getResponseContentType
 
Methods inherited from class org.apache.tapestry.AbstractPage
addPageAttachListener, addPageBeginRenderListener, addPageDetachListener, addPageEndRenderListener, addPageRenderListener, addPageValidateListener, attach, beginPageRender, beginResponse, detach, endPageRender, firePageAttached, firePageBeginRender, firePageDetached, firePageEndRender, firePageValidate, getChangeObserver, getEngine, getExtendedId, getGlobal, getIdPath, getLocale, getNestedComponent, getOutputEncoding, getPageName, getRequestCycle, getVisit, initialize, removePageAttachListener, removePageBeginRenderListener, removePageDetachListener, removePageEndRenderListener, removePageRenderListener, removePageValidateListener, renderPage, setChangeObserver, setLocale, setPageName, validate
 
Methods inherited from class org.apache.tapestry.BaseComponent
addOuter, finishLoad, renderComponent
 
Methods inherited from class org.apache.tapestry.AbstractComponent
addAsset, addBody, addComponent, checkActiveLock, cleanupAfterRender, enterActiveState, finishLoad, format, format, format, format, getAsset, getAssets, getBeans, getBinding, getBindingNames, getBindings, getBody, getBodyCount, getComponent, getComponents, getContainedComponent, getContainer, getId, getListeners, getMessage, getMessages, getNamespace, getPage, getProperty, getSpecification, isInActiveState, isParameterBound, isRendering, pageEndRender, prepareForRender, render, renderBody, renderInformalParameters, setBinding, setContainedComponent, setContainer, setId, setNamespace, setPage, setProperty, toString
 
Methods inherited from class org.apache.hivemind.impl.BaseLocatable
getLocation, setLocation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.tapestry.IComponent
addAsset, addBody, addComponent, enterActiveState, finishLoad, getAsset, getAssets, getBeans, getBinding, getBindingNames, getBindings, getComponent, getComponents, getContainedComponent, getContainer, getId, getListeners, getMessage, getMessages, getNamespace, getPage, getProperty, getSpecification, isRendering, renderBody, setBinding, setContainedComponent, setContainer, setId, setNamespace, setPage, setProperty
 
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
 

Constructor Detail

TreeExample

public TreeExample()
Method Detail

getContentProvider

public ITreeContentProvider getContentProvider()
Gets the content provider

Returns:

getKeyProvider

public IKeyProvider getKeyProvider()
Gets the key provider

Returns:

select

public void select(org.apache.tapestry.IRequestCycle cycle)
Selects a file

Parameters:
cycle -

getIntersectingParent

protected File getIntersectingParent(File f1,
                                     File f2)
If specified files are both contained by a parent file, that isn't the file returned from getRootPath() this method returns that file.

Parameters:
f1 -
f2 -
Returns:
The nearest intersecting parent node, if any.

expandAll

public void expandAll(org.apache.tapestry.IRequestCycle cycle)
Makes all nodes visible

Parameters:
cycle -

collapseAll

public void collapseAll(org.apache.tapestry.IRequestCycle cycle)
Collapses all nodes

Parameters:
cycle -

revealSelected

public void revealSelected(org.apache.tapestry.IRequestCycle cycle)
Reveals a particular node

Parameters:
cycle -

getTreeManager

public ITreeManager getTreeManager()
The tree manager

Returns:

getSelectedFile

public abstract File getSelectedFile()
get file


setSelectedFile

public abstract void setSelectedFile(File file)
sets file


getFileState

public abstract Set getFileState()
the tree state


getAjaxWebRequest

public abstract AjaxWebRequest getAjaxWebRequest()
Injected ajax request