com.dhtmlx.connector
Class TreeDataItem

java.lang.Object
  extended by com.dhtmlx.connector.DataItem
      extended by com.dhtmlx.connector.TreeDataItem

public class TreeDataItem
extends DataItem

The Class TreeDataItem.


Field Summary
private  boolean check
          The checkbox state
private  java.lang.String im0
          The "closed folder" image
private  java.lang.String im1
          The "opened folder" image
private  java.lang.String im2
          The "leaf" image
private  int kids
          The kids flag
 
Fields inherited from class com.dhtmlx.connector.DataItem
config, data, index, skip
 
Constructor Summary
TreeDataItem(java.util.HashMap<java.lang.String,java.lang.String> data, DataConfig config, int index)
          Instantiates a new tree data item.
 
Method Summary
 boolean get_check_state()
          Gets the checkbox state
 java.lang.String get_parent_id()
          Gets the parent id.
 int has_kids()
          Gets the count of child items
 void set_check_state(boolean new_state)
          Sets the checkbox state
 void set_image(java.lang.String image_path)
          Sets the image of the item
 void set_image(java.lang.String folder_closed, java.lang.String folder_open, java.lang.String leaf)
          Sets the new image of the item
 void set_kids(int count)
          Sets the count of child items
 void to_xml_end(java.lang.StringBuffer out)
          Ending part of xml representation.
 void to_xml_start(java.lang.StringBuffer out)
          Starting part of xml representation
 
Methods inherited from class com.dhtmlx.connector.DataItem
get_id, get_index, get_value, set_id, set_value, skip, to_xml
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

kids

private int kids
The kids flag


check

private boolean check
The checkbox state


im0

private java.lang.String im0
The "closed folder" image


im1

private java.lang.String im1
The "opened folder" image


im2

private java.lang.String im2
The "leaf" image

Constructor Detail

TreeDataItem

public TreeDataItem(java.util.HashMap<java.lang.String,java.lang.String> data,
                    DataConfig config,
                    int index)
Instantiates a new tree data item.

Parameters:
data - the data
config - the config
index - the index
Method Detail

get_parent_id

public java.lang.String get_parent_id()
Gets the parent id.

Returns:
the parent id

get_check_state

public boolean get_check_state()
Gets the checkbox state

Returns:
the checkbox state

set_check_state

public void set_check_state(boolean new_state)
Sets the checkbox state

Parameters:
new_state - the new checkbox state

set_image

public void set_image(java.lang.String image_path)
Sets the image of the item

Parameters:
image_path - the new image of the item

set_image

public void set_image(java.lang.String folder_closed,
                      java.lang.String folder_open,
                      java.lang.String leaf)
Sets the new image of the item

Parameters:
folder_closed - the "closed folder" image
folder_open - the "opened folder" image
leaf - the "leaf" image

has_kids

public int has_kids()
Gets the count of child items

Returns:
the count of child items

set_kids

public void set_kids(int count)
Sets the count of child items

Parameters:
count - the count of child items

to_xml_end

public void to_xml_end(java.lang.StringBuffer out)
Description copied from class: DataItem
Ending part of xml representation.

Overrides:
to_xml_end in class DataItem
Parameters:
out - the output buffer

to_xml_start

public void to_xml_start(java.lang.StringBuffer out)
Description copied from class: DataItem
Starting part of xml representation

Overrides:
to_xml_start in class DataItem
Parameters:
out - the output buffer