net.sourceforge.ajaxtags.helpers
Class TreeItem

java.lang.Object
  extended by net.sourceforge.ajaxtags.helpers.AbstractItem
      extended by net.sourceforge.ajaxtags.helpers.TreeItem

public class TreeItem
extends AbstractItem

Extend Item to easily have a tree item with more options.


Nested Class Summary
static class TreeItem.TreeAttribute
          All known tree-elements for the parser.
 
Constructor Summary
TreeItem()
          Constructor for TreeItem.
TreeItem(String name, String value)
          Create an item.
TreeItem(String name, String value, boolean asData)
          Create an item.
TreeItem(String name, String value, boolean asData, Map<?,String> attributes)
          Create an item.
TreeItem(String name, String value, boolean collapsed, String url, boolean asData)
          Create an item.
 
Method Summary
 String getUrl()
           
 boolean isCollapsed()
           
 boolean isLeaf()
          Check if this item is a leaf or not.
 void setCollapsed(boolean collapsed)
           
 void setLeaf(boolean leaf)
          Set node to leaf or not.
 void setUrl(String url)
           
 
Methods inherited from class net.sourceforge.ajaxtags.helpers.AbstractItem
clearAttribute, getAttributeKeySet, getAttributeValue, getName, getValue, isAsCData, removeAttribute, setAllAttributes, setAllAttributes, setAsCData, setAttributes, setAttributes, setName, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TreeItem

public TreeItem()
Constructor for TreeItem.


TreeItem

public TreeItem(String name,
                String value,
                boolean asData)
Create an item.

Parameters:
name - name
value - value
asData - true if value must be set as CDATA

TreeItem

public TreeItem(String name,
                String value)
Create an item.

Parameters:
name - name
value - value

TreeItem

public TreeItem(String name,
                String value,
                boolean collapsed,
                String url,
                boolean asData)
Create an item.

Parameters:
name - name
value - value
collapsed - true if item is collapsed
url - URL
asData - true if value must be set as CDATA

TreeItem

public TreeItem(String name,
                String value,
                boolean asData,
                Map<?,String> attributes)
Create an item.

Parameters:
name - name
value - value
asData - true if value must be set as CDATA
attributes - additional attributes
Method Detail

isLeaf

public final boolean isLeaf()
Check if this item is a leaf or not.

Returns:
true if this is a leaf else false

setLeaf

public final void setLeaf(boolean leaf)
Set node to leaf or not.

Parameters:
leaf - true if it is leaf else false

isCollapsed

public final boolean isCollapsed()
Returns:
Returns the collapsed value

setCollapsed

public final void setCollapsed(boolean collapsed)
Parameters:
collapsed - The collapsed value to be set

getUrl

public final String getUrl()
Returns:
Return the URL

setUrl

public final void setUrl(String url)
Parameters:
url - The URL to be set


Copyright © 2005-2010 The Ajaxtags Team. All Rights Reserved.