Java Doc for TreeElement.java in  » Library » Apache-beehive-1.0.2-src » org » apache » beehive » netui » tags » tree » 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 » Library » Apache beehive 1.0.2 src » org.apache.beehive.netui.tags.tree 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.beehive.netui.tags.tree.TreeElement

All known Subclasses:   org.apache.beehive.netui.tags.tree.TreeRootElement,
TreeElement
public class TreeElement implements IUrlParams,Serializable(Code)
An individual node of a Tree, and rendered by that Tree instance.


Field Summary
final public static  StringEXPAND_NODE
    
final public static  StringSELECTED_NODE
    
final public static  StringTREE_AJAX_COMMAND_PREFIX
    
final public static  StringTREE_AJAX_PARAMTER
    
final public static  StringTREE_ANCHOR
    
final public static  StringTREE_ANCHOR_ID
    
final public static  StringTREE_ANCHOR_INIT
    
final public static  StringTREE_COLLAPSE_IMAGE
    
final public static  StringTREE_COLLAPSE_STATE
    
final public static  StringTREE_EXPAND
    
final public static  StringTREE_EXPANDED
     Constant used to indicate that a tree node anchor should be set expanded.
final public static  StringTREE_EXPAND_IMAGE
    
final public static  StringTREE_EXPAND_PATH
    
final public static  StringTREE_EXPAND_STATE
    
final public static  StringTREE_ID
    
final public static  StringTREE_JAVASCRIPT_CLASS
    
final public static  StringTREE_LEVEL
    
final public static  StringTREE_NODE_LAST
    
public  ArrayList_attribute
    

Constructor Summary
public  TreeElement()
     Default constructor for creating a simple tree.
public  TreeElement(String label, boolean expanded)
     Construct a new TreeElement with the specified parameters.

Method Summary
public  voidaddAttribute(TreeHtmlAttributeInfo attr)
     This method is called by the children tags of the TreeItem.
public  voidaddChild(TreeElement child)
     Add a new child node to the end of the list.
public  voidaddChild(int offset, TreeElement child)
     Add a new child node at the specified position in the child list.
public  voidaddParameter(String name, Object value, String facet)
    
public  voidclearChildren()
    
public  TreeElementfindNode(String nodeName)
     Given a node, find the named child.
Parameters:
  nodeName - the name of the child to find.
public  StringgetAction()
     Gets the action invoked if this node is selected by the user.
public  ArrayListgetAttributeList()
     Return the list of attributes.
public  TreeElementgetChild(int index)
     Return the child node at the given zero-relative index.
public  TreeElement[]getChildren()
     Return the set of child nodes for this node.
public  StringgetClientAction()
     Gets the client action invoked if this node is selected by the user.
public  StringgetContent()
     Return the content.
public  StringgetHref()
     Gets the hyperlink to which control will be directed if this node is selected by the user.
public  StringgetIcon()
     Gets the pathname to the icon file displayed when this node is visible, relative to the image directory for the images.
public  InheritableStategetInheritableState()
    
public  StringgetLabel()
     Gets the label that will be displayed when this node is visible.
public  intgetLevel()
    
public  StringgetName()
     Returns the unique name of the node.
public  HashMapgetParams()
    
public  TreeElementgetParent()
     Gets the parent node of this node, or null if this is the root node.
public static  TreeElementgetRoot(TreeElement node)
     Gets the root node of this tree.
public  StringgetScope()
     Get the target scope for this node's URI.
public  StringgetTagId()
     Return the ID of the tag.
public  StringgetTarget()
     Gets the window target for the hyperlink identified by the action property, if this node is selected.
public  StringgetTitle()
     Set the title attribute for the node.
public  booleanisDisabled()
     Gets whether this node currently selected.
public  booleanisExpandOnServer()
     This method will return the state of the expand on server attribute.
public  booleanisExpanded()
     Gets if this node is currently expanded.
public  booleanisLabelLegalAsAlt()
    
public  booleanisLast()
     Gets whether or not this is the last node in the set of children for the parent node.
public  booleanisLeaf()
     Gets whether or not this a "leaf" node (i.e.
public  booleanisSelected()
     Gets whether this node currently selected.
public  voidonExpand(ServletRequest request, ServletResponse response)
     Code that runs when the node is expanded.
public  voidonSelect(ServletRequest request)
     Code that runs when the node is selected.
public  voidremoveChild(int offset)
     Remove the child node (and all children of that child) at the specified position in the child list.
public  voidremoveChild(TreeElement child)
     Remove the specified child node.
public  voidsetAction(String action)
     Set the action to be called when the node is selected.
public  voidsetClientAction(String clientAction)
     Set the client action to be called when the node is selected.
public  voidsetContent(String content)
     Set the content of the node.
public  voidsetDisabled(boolean disabled)
     Sets whether this node currently selected.
public  voidsetExpandOnServer(boolean expandOnServer)
     Set the value of the expandOnServer attribute.
public  voidsetExpanded(boolean expanded)
     Sets if this node is currently expanded.
public  voidsetHref(String href)
     Set the hyperlink which will be called when the node is selected.
public  voidsetIcon(String icon)
     Set the pathname to the icon to display when this node is visible.
public  voidsetInheritableState(InheritableState state)
    
public  voidsetLabel(String label)
     Set the text of the label associated with this node.
protected  voidsetName(String name)
     Set the unique name of the node.
protected  voidsetParent(TreeElement parent)
     Sets the parent node of this node.
public  voidsetScope(String scope)
     Set the target scope for this anchor's URI.
public  voidsetSelected(boolean selected)
     Sets whether this node currently selected.
public  voidsetTagId(String tagId)
     Set the ID of the tag.
public  voidsetTarget(String target)
     Set the window target for the hyperlink indentified by the action.
public  voidsetTitle(String title)
     Returns the current title attribute for the node.
public  intsize()
     This method will return the number of children of the node.
protected  voidupdateName(TreeElement parentNode, int index)
     This method will update the name of this node and all of the children node.

Field Detail
EXPAND_NODE
final public static String EXPAND_NODE(Code)



SELECTED_NODE
final public static String SELECTED_NODE(Code)



TREE_AJAX_COMMAND_PREFIX
final public static String TREE_AJAX_COMMAND_PREFIX(Code)



TREE_AJAX_PARAMTER
final public static String TREE_AJAX_PARAMTER(Code)



TREE_ANCHOR
final public static String TREE_ANCHOR(Code)
Constant used to indicate an anchor is an expand/collapse tree node



TREE_ANCHOR_ID
final public static String TREE_ANCHOR_ID(Code)



TREE_ANCHOR_INIT
final public static String TREE_ANCHOR_INIT(Code)



TREE_COLLAPSE_IMAGE
final public static String TREE_COLLAPSE_IMAGE(Code)



TREE_COLLAPSE_STATE
final public static String TREE_COLLAPSE_STATE(Code)



TREE_EXPAND
final public static String TREE_EXPAND(Code)



TREE_EXPANDED
final public static String TREE_EXPANDED(Code)
Constant used to indicate that a tree node anchor should be set expanded.



TREE_EXPAND_IMAGE
final public static String TREE_EXPAND_IMAGE(Code)



TREE_EXPAND_PATH
final public static String TREE_EXPAND_PATH(Code)



TREE_EXPAND_STATE
final public static String TREE_EXPAND_STATE(Code)



TREE_ID
final public static String TREE_ID(Code)



TREE_JAVASCRIPT_CLASS
final public static String TREE_JAVASCRIPT_CLASS(Code)



TREE_LEVEL
final public static String TREE_LEVEL(Code)



TREE_NODE_LAST
final public static String TREE_NODE_LAST(Code)



_attribute
public ArrayList _attribute(Code)




Constructor Detail
TreeElement
public TreeElement()(Code)
Default constructor for creating a simple tree.



TreeElement
public TreeElement(String label, boolean expanded)(Code)
Construct a new TreeElement with the specified parameters.
Parameters:
  expanded - Should this node be expanded?




Method Detail
addAttribute
public void addAttribute(TreeHtmlAttributeInfo attr)(Code)
This method is called by the children tags of the TreeItem. If there is a TreeHtmlAttribute it will set the attribute name and value.
Parameters:
  attr -



addChild
public void addChild(TreeElement child) throws IllegalArgumentException(Code)
Add a new child node to the end of the list.
Parameters:
  child - The new child node
throws:
  IllegalArgumentException - if the name of the new childnode is not unique



addChild
public void addChild(int offset, TreeElement child) throws IllegalArgumentException(Code)
Add a new child node at the specified position in the child list.
Parameters:
  offset - Zero-relative offset at which the new nodeshould be inserted
Parameters:
  child - The new child node
throws:
  IllegalArgumentException - if the name of the new childnode is not unique



addParameter
public void addParameter(String name, Object value, String facet)(Code)



clearChildren
public void clearChildren()(Code)



findNode
public TreeElement findNode(String nodeName)(Code)
Given a node, find the named child.
Parameters:
  nodeName - the name of the child to find. the node identified by the name



getAction
public String getAction()(Code)
Gets the action invoked if this node is selected by the user. the action



getAttributeList
public ArrayList getAttributeList()(Code)
Return the list of attributes. This method may return null if there are no elements. In addition, the map may be exist but be empty. a ArrayList of attribute values or null.



getChild
public TreeElement getChild(int index)(Code)
Return the child node at the given zero-relative index.
Parameters:
  index - The child node index the child node



getChildren
public TreeElement[] getChildren()(Code)
Return the set of child nodes for this node. the child node array



getClientAction
public String getClientAction()(Code)
Gets the client action invoked if this node is selected by the user. the action



getContent
public String getContent()(Code)
Return the content. The content is extra HTML that will be output to the right of the Nodes's label. the content



getHref
public String getHref()(Code)
Gets the hyperlink to which control will be directed if this node is selected by the user. the action



getIcon
public String getIcon()(Code)
Gets the pathname to the icon file displayed when this node is visible, relative to the image directory for the images. the icon pathname



getInheritableState
public InheritableState getInheritableState()(Code)



getLabel
public String getLabel()(Code)
Gets the label that will be displayed when this node is visible. the label



getLevel
public int getLevel()(Code)



getName
public String getName()(Code)
Returns the unique name of the node. The unique name is set when the child is added to the tree. The unique name of the node.



getParams
public HashMap getParams()(Code)



getParent
public TreeElement getParent()(Code)
Gets the parent node of this node, or null if this is the root node. the TreeElement parent



getRoot
public static TreeElement getRoot(TreeElement node)(Code)
Gets the root node of this tree.
Parameters:
  node - The TreeElement to start from The root node



getScope
public String getScope()(Code)
Get the target scope for this node's URI. a String that identifies the target scope for this node's URI.
See Also:   TreeElement.setScope



getTagId
public String getTagId()(Code)
Return the ID of the tag. The id may be rewritten by the container (such as a portal) to make sure it is unique. JavaScript may lookup the actual id of the element by looking it up in the netui_names table written into the HTML. the tagId.



getTarget
public String getTarget()(Code)
Gets the window target for the hyperlink identified by the action property, if this node is selected. the window target



getTitle
public String getTitle()(Code)
Set the title attribute for the node. String



isDisabled
public boolean isDisabled()(Code)
Gets whether this node currently selected. This is set by the tag render method. the selected state



isExpandOnServer
public boolean isExpandOnServer()(Code)
This method will return the state of the expand on server attribute. the boolean value of the expandOnServer attribute.



isExpanded
public boolean isExpanded()(Code)
Gets if this node is currently expanded. the expanded state



isLabelLegalAsAlt
public boolean isLabelLegalAsAlt()(Code)



isLast
public boolean isLast()(Code)
Gets whether or not this is the last node in the set of children for the parent node. if this is the last or not



isLeaf
public boolean isLeaf()(Code)
Gets whether or not this a "leaf" node (i.e. one with no children) if this is the last or not



isSelected
public boolean isSelected()(Code)
Gets whether this node currently selected. This is set by the tag render method. the selected state



onExpand
public void onExpand(ServletRequest request, ServletResponse response)(Code)
Code that runs when the node is expanded.



onSelect
public void onSelect(ServletRequest request)(Code)
Code that runs when the node is selected.



removeChild
public void removeChild(int offset)(Code)
Remove the child node (and all children of that child) at the specified position in the child list. If there are no children or the specified child position is too large, then this method just returns. (I.e. no runtime exception if the offset argument is too large)
Parameters:
  offset - Zero-relative offset at which the existingnode should be removed



removeChild
public void removeChild(TreeElement child)(Code)
Remove the specified child node. All of the children of this child node will also be removed.
Parameters:
  child - Child node to be removed



setAction
public void setAction(String action)(Code)
Set the action to be called when the node is selected. A tree node may only have a action or href or clientAction set but not both.
Parameters:
  action - an action in the page flow that will run when the node is selected.



setClientAction
public void setClientAction(String clientAction)(Code)
Set the client action to be called when the node is selected. A tree node may only have a action or href or clientAction set but not both.
Parameters:
  clientAction - an action in the page flow that will run when the node is selected.



setContent
public void setContent(String content)(Code)
Set the content of the node. The content will be output to the right of the Nodes label.
Parameters:
  content - The text of the tree node.



setDisabled
public void setDisabled(boolean disabled)(Code)
Sets whether this node currently selected.
Parameters:
  disabled - the selected state



setExpandOnServer
public void setExpandOnServer(boolean expandOnServer)(Code)
Set the value of the expandOnServer attribute. If the attribute is true and runAtClient is also true, then an expansion on this node will cause that to happen on the server. When runAtClient is false, all expansions will happen on the server.
Parameters:
  expandOnServer - boolean value indicating if the node should be expanded on the server.



setExpanded
public void setExpanded(boolean expanded)(Code)
Sets if this node is currently expanded.
Parameters:
  expanded - the expanded state



setHref
public void setHref(String href)(Code)
Set the hyperlink which will be called when the node is selected. A tree node may only have a action or href or clientAction set but not both.
Parameters:
  href - The hyperlink called when the node is selected.



setIcon
public void setIcon(String icon)(Code)
Set the pathname to the icon to display when this node is visible. The name is relative to the image directory.
Parameters:
  icon - The relative path to the icond.



setInheritableState
public void setInheritableState(InheritableState state)(Code)



setLabel
public void setLabel(String label)(Code)
Set the text of the label associated with this node.
Parameters:
  label - The text of the tree node.



setName
protected void setName(String name)(Code)
Set the unique name of the node. Uniqueness is not verified by this routine. This routine is protected because it is only called during add and remove of children.
Parameters:
  name - the name of the node.



setParent
protected void setParent(TreeElement parent)(Code)
Sets the parent node of this node. This node will set the width value (which is really the depth in the tree of the node).
Parameters:
  parent - the TreeElement parent



setScope
public void setScope(String scope)(Code)
Set the target scope for this anchor's URI. Any page flow that handles the URI will be made active within the given scope. Scopes allow multiple page flows to be active within the same user session; page flows in different scopes do not in general interact with each other. This attribute is commonly used in conjunction with the target attribute to invoke a new page flow in a separate window.
Parameters:
  scope - a String that identifies the scope in which the target page flow will be made active.



setSelected
public void setSelected(boolean selected)(Code)
Sets whether this node currently selected.
Parameters:
  selected - the selected state



setTagId
public void setTagId(String tagId)(Code)
Set the ID of the tag.
Parameters:
  tagId - the tagId.



setTarget
public void setTarget(String target)(Code)
Set the window target for the hyperlink indentified by the action.
Parameters:
  target - the window target.



setTitle
public void setTitle(String title)(Code)
Returns the current title attribute for the node.
Parameters:
  title -



size
public int size()(Code)
This method will return the number of children of the node. the number of children of this tree element.



updateName
protected void updateName(TreeElement parentNode, int index)(Code)
This method will update the name of this node and all of the children node. The name of a node reflects it's position in the tree.
Parameters:
  parentNode - The parent node of this node.
Parameters:
  index - the index position of this node within the parent node.



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.