Java Doc for TreeBuffer.java in  » J2EE » Sofia » com » salmonllc » html » treeControl » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » J2EE » Sofia » com.salmonllc.html.treeControl 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.salmonllc.html.treeControl.TreeBuffer

TreeBuffer
public class TreeBuffer implements java.io.Serializable(Code)
This class stores the internal state of an HtmlTreeControl.


Field Summary
final public static  intMODE_LINK
    
final public static  intMODE_SUBMIT
    
final public static  intSELECT_MANY
    
final public static  intSELECT_NONE
    
final public static  intSELECT_ONE
    
final public static  intSORT_ANY
    
final public static  intSORT_ASC
    
final public static  intSORT_DES
    
 int_count
    
 Vector_headers
    
 Vector_images
    
 Vector_list
    
 int_mode
    
 Integer_nextListItem
    
 Vector_nodeComponents
    
 TreeNode_root_current
    
 int_scrollTo
    
 int_selectMode
    
 int_selected
    
 boolean_showRoot
    
 TreeTraversalCallBack_ttcb
    


Method Summary
public  intaddAdditionalImage(int imageNo, String text, String url)
     This method places an image after the text of the current tree node.
public  intaddChild(String text, String URL, int image, int expImage, String imageURL, Object key)
     This method adds an item to the tree under the current item.
public  voidaddHeaderComponent(HtmlComponent comp)
     Add header components to the tree.
public  voidaddHeaderComponent(HtmlComponent comp, String align, String width)
     Add header components to the tree.
public  intaddImage(String URL)
     This method adds an image to the list of images used by the tree.
public  voidaddNodeComponent(HtmlComponent comp)
     Add node components to the tree.
public  booleanareChildrenLoaded()
     This method returns true if the current node has any children.
public  booleancanSortOnColumn(int colNo)
    
public  voidclearAdditionalImages()
     This method removes any images that appear after the text.
public  voidclearSelections()
     This method will clear all selected items in the tree.
public  voidclearVisibleSelections()
     This method will clear all selected items in the tree.
public  voiddeleteChildren(boolean deleteParent)
     This method removes all the children of the current node from the tree.
public  voiddump()
     This method writes the contents of the tree to System.error.
public  StringgetAdditionalImage(int index)
     This method returns the URL of the additional images in the node.
public  intgetAdditionalImageCount()
     This method returns the number of additional images attached to this tree node.
public  StringgetAdditionalText(int index)
     This method returns the text of the additional images in the node.
public  StringgetAdditionalURL(int index)
     This method returns the URL that the user will go to for the additional image in the node.
public  intgetCount()
     This method returns the value of an internal counter in the class.
public  EnumerationgetElements()
     This method returns the a list of all the nodes in the tree.
public  intgetHandle()
     This method returns the handle of the current tree node.
public  StringgetHeaderAlign(int index)
    
public  HtmlComponentgetHeaderComponent(int index)
    
public  intgetHeaderCount()
    
public  StringgetHeaderWidth(int index)
    
public  StringgetImage()
     This method returns the URL of the image associated with the current tree node.
public  StringgetImageURL()
     This method returns the URL that the user will go to if they click on in the current node.
public  ObjectgetKey()
     This method returns the user data Object associated with the current node.
public  intgetLevel()
     This method returns the level of indentation for the current node.
public  intgetMode()
     This method gets the expand / contract mode for the tree.
 TreeNodegetNode()
    
public  VectorgetNodeComponents()
    
public  intgetRow()
    
public  intgetScrollTo()
     This method will return the tree node that will be scrolled to the next time the page is loaded.
public  intgetSelectMode()
     This method returns the select mode for the tree.
public  booleangetSelectable()
     This method returns whether the current node will be selectable.
public  intgetSelected()
     This method returns the handle of the currently selected node.
public  booleangetSelected(int handle)
     If select mode is MODE_MANY, this will return whether the item is selected or not.
public  booleangetShowRoot()
     This method returns whether or not the root of the tree is visible.
public  StringgetText()
     This method returns the text associated with the current tree node.
public  StringgetURL()
     This method returns the URL for the current node in the tree.
public  booleangotoChild()
     This method positions the current node to the first child of the current one.
public  booleangotoItem(int item)
     This method positions the current node to a particular item (handle) on the tree.
public  booleangotoLastChild()
     This method positions the current node to the last child of the current one.
public  booleangotoNext()
     This method positions the current node to the next node on the same level.
public  booleangotoParent()
     This method positions the current node to the parent of the current.
public  booleangotoPrior()
     This method positions the current node to the prior node on the same level.
public  booleangotoRoot()
     This method positions the current node to the root node.
public  booleanhasChildren()
     This method returns true if the current node has children.
public  booleanisCurrentRoot()
     This method returns true if the current node is the root node.
public  booleanisEmpty()
     This method returns true if the tree is empty.
public  booleanisExpanded()
     This method returns true if the current item on the tree is expanded.
public  booleanisItemVisible()
     This method returns true if the current item on the tree is visible.
public  booleanitemExists(int item)
     This method returns true if a node with the specified handle exists in the tree.
public  StringreplaceUno(String st)
     This method replace the value of the string "$UNO$" in the passed string with a number unique for the life of this tree buffer.
public  voidresetHeaders()
    
public  voidresetNodeComponents()
    
public  voidsetCount(int count)
     Seeds an internal counter in the tree.
public  voidsetExpanded(boolean expanded)
     This method expands or contracts the current tree node.
public  voidsetHasChildren(boolean hasChildren)
     This method tells the tree whether the tree has children nodes.
public  voidsetImages(int image, int expandedImage)
    
public  voidsetKey(Object key)
     This sets key information associated with the current tree node.
public  voidsetMode(int mode)
     This method sets the expand / contract mode for the tree.
public  voidsetRow(int rowNo)
     For Trees with node components, you must specify a row in the datastore that corresponds to the items for the current node.
public  voidsetScrollTo(int handle)
     This method returns the tree item that will be scrolled to the next time the tree is displayed in the browser.
public  voidsetSelectMode(int selectMode)
     This method sets the select mode for the tree.
public  voidsetSelectable(boolean sel)
     This method returns whether the current node will be selectable.
public  voidsetSelected(int handle)
     This method sets the currently selected node.
public  voidsetSelected(int handle, boolean trueFalse)
     If select mode is MODE_MANY, this will set the item to either selected or not.
public  voidsetShowRoot(boolean show)
     This method shows or hides the root tree node.
public  voidsetText(String text)
     This method sets the text associated with the current tree node.
public  voidsetURL(String url)
     This method sets the URL associated with the current tree node.
public synchronized  voidsort(int column, int pathDir, int dir)
    
public  voidtraverse(TreeTraversalCallBack cb, PrintWriter p)
     Use this method to traverse the tree.
public  voidtraverse(TreeTraversalCallBack cb, PrintWriter p, boolean onlyExpanded)
     Use this method to traverse the tree.

Field Detail
MODE_LINK
final public static int MODE_LINK(Code)



MODE_SUBMIT
final public static int MODE_SUBMIT(Code)



SELECT_MANY
final public static int SELECT_MANY(Code)



SELECT_NONE
final public static int SELECT_NONE(Code)



SELECT_ONE
final public static int SELECT_ONE(Code)



SORT_ANY
final public static int SORT_ANY(Code)



SORT_ASC
final public static int SORT_ASC(Code)



SORT_DES
final public static int SORT_DES(Code)



_count
int _count(Code)



_headers
Vector _headers(Code)



_images
Vector _images(Code)



_list
Vector _list(Code)



_mode
int _mode(Code)



_nextListItem
Integer _nextListItem(Code)



_nodeComponents
Vector _nodeComponents(Code)



_root_current
TreeNode _root_current(Code)



_scrollTo
int _scrollTo(Code)



_selectMode
int _selectMode(Code)



_selected
int _selected(Code)



_showRoot
boolean _showRoot(Code)



_ttcb
TreeTraversalCallBack _ttcb(Code)





Method Detail
addAdditionalImage
public int addAdditionalImage(int imageNo, String text, String url)(Code)
This method places an image after the text of the current tree node.
Parameters:
  imageNo - The number of the image to use (images are set using the addImage) method.
Parameters:
  text - The tooltip for the image.
Parameters:
  url - The url to go to when the user clicks on this image.



addChild
public int addChild(String text, String URL, int image, int expImage, String imageURL, Object key)(Code)
This method adds an item to the tree under the current item.
Parameters:
  text - The text to show on the line
Parameters:
  URL - The URL to go to if the user clicks on the text.
Parameters:
  image - The number of the image to use if the item is contracted (images are set using the addImage) method.
Parameters:
  image - The number of the image to use if the item is expanded (images are set using the addImage) method.
Parameters:
  imageURL - The url to go to when the user clicks on the image.
Parameters:
  key - An object attached to the tree node containing any information that needs to be attached to this node.



addHeaderComponent
public void addHeaderComponent(HtmlComponent comp)(Code)
Add header components to the tree. The components will appear above the tree columns



addHeaderComponent
public void addHeaderComponent(HtmlComponent comp, String align, String width)(Code)
Add header components to the tree. The components will appear above the tree columns



addImage
public int addImage(String URL)(Code)
This method adds an image to the list of images used by the tree.
Parameters:
  URL - The URL of the image file.



addNodeComponent
public void addNodeComponent(HtmlComponent comp)(Code)
Add node components to the tree. The components will in new TDs after each node. Note, if you add nodes to trees with headers, the first header goes over the tree node, so the number of node components should number of headers - 1.



areChildrenLoaded
public boolean areChildrenLoaded()(Code)
This method returns true if the current node has any children.



canSortOnColumn
public boolean canSortOnColumn(int colNo)(Code)



clearAdditionalImages
public void clearAdditionalImages()(Code)
This method removes any images that appear after the text.



clearSelections
public void clearSelections()(Code)
This method will clear all selected items in the tree.



clearVisibleSelections
public void clearVisibleSelections()(Code)
This method will clear all selected items in the tree.



deleteChildren
public void deleteChildren(boolean deleteParent)(Code)
This method removes all the children of the current node from the tree.
Parameters:
  deleteParent - true to remove the current node as well as its children.



dump
public void dump()(Code)
This method writes the contents of the tree to System.error. It is useful for debugging.



getAdditionalImage
public String getAdditionalImage(int index)(Code)
This method returns the URL of the additional images in the node.



getAdditionalImageCount
public int getAdditionalImageCount()(Code)
This method returns the number of additional images attached to this tree node.



getAdditionalText
public String getAdditionalText(int index)(Code)
This method returns the text of the additional images in the node.



getAdditionalURL
public String getAdditionalURL(int index)(Code)
This method returns the URL that the user will go to for the additional image in the node.



getCount
public int getCount()(Code)
This method returns the value of an internal counter in the class. The counter will be incremented each time the method is called



getElements
public Enumeration getElements()(Code)
This method returns the a list of all the nodes in the tree.



getHandle
public int getHandle()(Code)
This method returns the handle of the current tree node.



getHeaderAlign
public String getHeaderAlign(int index)(Code)
the header alignment at a specific position



getHeaderComponent
public HtmlComponent getHeaderComponent(int index)(Code)
the header component at a specific position



getHeaderCount
public int getHeaderCount()(Code)



getHeaderWidth
public String getHeaderWidth(int index)(Code)
the header width at a specific position



getImage
public String getImage()(Code)
This method returns the URL of the image associated with the current tree node.



getImageURL
public String getImageURL()(Code)
This method returns the URL that the user will go to if they click on in the current node.



getKey
public Object getKey()(Code)
This method returns the user data Object associated with the current node.



getLevel
public int getLevel()(Code)
This method returns the level of indentation for the current node.



getMode
public int getMode()(Code)
This method gets the expand / contract mode for the tree. Valid Values are MODE_SUBMIT (use submit images to expand, contract tree items) or MODE_LINK (use html links and javascript to expand / contract the tree).



getNode
TreeNode getNode()(Code)



getNodeComponents
public Vector getNodeComponents()(Code)
a vector of HTML components that will appear after each node.



getRow
public int getRow()(Code)
For Trees with node components, the datastore row associated with each component
Parameters:
  rowNo -



getScrollTo
public int getScrollTo()(Code)
This method will return the tree node that will be scrolled to the next time the page is loaded.



getSelectMode
public int getSelectMode()(Code)
This method returns the select mode for the tree. Valid values are SELECT_NONE or SELECT_ONE.



getSelectable
public boolean getSelectable()(Code)
This method returns whether the current node will be selectable.



getSelected
public int getSelected()(Code)
This method returns the handle of the currently selected node.



getSelected
public boolean getSelected(int handle)(Code)
If select mode is MODE_MANY, this will return whether the item is selected or not.



getShowRoot
public boolean getShowRoot()(Code)
This method returns whether or not the root of the tree is visible.



getText
public String getText()(Code)
This method returns the text associated with the current tree node.



getURL
public String getURL()(Code)
This method returns the URL for the current node in the tree.



gotoChild
public boolean gotoChild()(Code)
This method positions the current node to the first child of the current one. It will return false if the current node doesn't have a child.



gotoItem
public boolean gotoItem(int item)(Code)
This method positions the current node to a particular item (handle) on the tree. It will return false an node with the specified handle doesn't exist.if the current node doesn't have a child.



gotoLastChild
public boolean gotoLastChild()(Code)
This method positions the current node to the last child of the current one. It will return false if the current node doesn't have a child.



gotoNext
public boolean gotoNext()(Code)
This method positions the current node to the next node on the same level. It will return false if the current node is the last one on the branch.doesn't have a child.



gotoParent
public boolean gotoParent()(Code)
This method positions the current node to the parent of the current. It will return false if the current node is the root.



gotoPrior
public boolean gotoPrior()(Code)
This method positions the current node to the prior node on the same level. It will return false if the current node is the parent of the one on the branch.



gotoRoot
public boolean gotoRoot()(Code)
This method positions the current node to the root node. It will return false if the tree is empty.



hasChildren
public boolean hasChildren()(Code)
This method returns true if the current node has children.



isCurrentRoot
public boolean isCurrentRoot()(Code)
This method returns true if the current node is the root node.



isEmpty
public boolean isEmpty()(Code)
This method returns true if the tree is empty.



isExpanded
public boolean isExpanded()(Code)
This method returns true if the current item on the tree is expanded.



isItemVisible
public boolean isItemVisible()(Code)
This method returns true if the current item on the tree is visible.



itemExists
public boolean itemExists(int item)(Code)
This method returns true if a node with the specified handle exists in the tree.



replaceUno
public String replaceUno(String st)(Code)
This method replace the value of the string "$UNO$" in the passed string with a number unique for the life of this tree buffer. It can be used to add uniqueness to URLs to defeat browser caching for pages that should not be cached.



resetHeaders
public void resetHeaders()(Code)
remove all header components from the tree



resetNodeComponents
public void resetNodeComponents()(Code)
remove all node components from the tree



setCount
public void setCount(int count)(Code)
Seeds an internal counter in the tree.



setExpanded
public void setExpanded(boolean expanded)(Code)
This method expands or contracts the current tree node.



setHasChildren
public void setHasChildren(boolean hasChildren)(Code)
This method tells the tree whether the tree has children nodes. It will place an expand icon on the tree node even if the children aren't loaded yet.



setImages
public void setImages(int image, int expandedImage)(Code)
Changes the images used by the node



setKey
public void setKey(Object key)(Code)
This sets key information associated with the current tree node.



setMode
public void setMode(int mode)(Code)
This method sets the expand / contract mode for the tree. Valid Values are MODE_SUBMIT (use submit images to expand, contract tree items) or MODE_LINK (use html links and javascript to expand / contract the tree).



setRow
public void setRow(int rowNo)(Code)
For Trees with node components, you must specify a row in the datastore that corresponds to the items for the current node.
Parameters:
  rowNo -



setScrollTo
public void setScrollTo(int handle)(Code)
This method returns the tree item that will be scrolled to the next time the tree is displayed in the browser.



setSelectMode
public void setSelectMode(int selectMode)(Code)
This method sets the select mode for the tree. Valid Values are SELET_ONE, SELECT_NONE and SELECT_MANY.



setSelectable
public void setSelectable(boolean sel)(Code)
This method returns whether the current node will be selectable.



setSelected
public void setSelected(int handle)(Code)
This method sets the currently selected node.



setSelected
public void setSelected(int handle, boolean trueFalse)(Code)
If select mode is MODE_MANY, this will set the item to either selected or not.



setShowRoot
public void setShowRoot(boolean show)(Code)
This method shows or hides the root tree node.



setText
public void setText(String text)(Code)
This method sets the text associated with the current tree node.



setURL
public void setURL(String url)(Code)
This method sets the URL associated with the current tree node.



sort
public synchronized void sort(int column, int pathDir, int dir)(Code)
Sort the tree
Parameters:
  column - the number of the header column to sort on (0 for path name only sort)
Parameters:
  pathDir - the sort direction for the tree path (first column) to sort on SORT_ASC, SORT_DES or SORT_ANY to ignore the path sort
Parameters:
  dir - the direction to sort the specified column on SORT_ASC or SORT_DES if column is not zero



traverse
public void traverse(TreeTraversalCallBack cb, PrintWriter p)(Code)
Use this method to traverse the tree. When each node is visited in the traversal the callback method in the TreeTraversalCallBack object will be invoked and passed the PrintWriter.
See Also:   TreeTraversalCallBack.callback



traverse
public void traverse(TreeTraversalCallBack cb, PrintWriter p, boolean onlyExpanded)(Code)
Use this method to traverse the tree. When each node is visited in the traversal the callback method in the TreeTraversalCallBack object will be invoked and passed the PrintWriter.
See Also:   TreeTraversalCallBack.callback



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.