BrightSide Workbench Full Report + Source Code
org.turro.zkoss.tree.GenericTree< V > Class Template Referenceabstract
Inheritance diagram for org.turro.zkoss.tree.GenericTree< V >:
Collaboration diagram for org.turro.zkoss.tree.GenericTree< V >:

Public Member Functions

void afterCompose ()
 
void clearItems ()
 
void setObjectValue (V value)
 
getObjectValue ()
 
void selectItemByText (String text)
 
void showItem (Treeitem item)
 

Protected Member Functions

boolean equals (V value, V obj)
 
void addTreeitem (Treeitem parent, Treeitem child)
 
abstract void populateList ()
 

Protected Attributes

boolean populated = false
 

Detailed Description

Author
Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g

Definition at line 32 of file GenericTree.java.

Member Function Documentation

◆ addTreeitem()

void org.turro.zkoss.tree.GenericTree< V >.addTreeitem ( Treeitem  parent,
Treeitem  child 
)
protected

Definition at line 133 of file GenericTree.java.

133  {
134  if(parent.getTreechildren() == null) {
135  parent.appendChild(new Treechildren());
136  }
137  parent.getTreechildren().appendChild(child);
138  }

◆ afterCompose()

void org.turro.zkoss.tree.GenericTree< V >.afterCompose ( )

Definition at line 40 of file GenericTree.java.

40  {
41  populateList();
42  populated = true;
43  if(internalValue != null) {
44  setObjectValue(internalValue);
45  internalValue = null;
46 // } else if (internalValues != null) {
47 // setObjectValues(internalValues);
48 // internalValues = null;
49  } else {
50  setObjectValue(null);
51  }
52  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ clearItems()

void org.turro.zkoss.tree.GenericTree< V >.clearItems ( )

Definition at line 54 of file GenericTree.java.

54  {
55  getItems().clear();
56  populated = false;
57  }

◆ equals()

boolean org.turro.zkoss.tree.GenericTree< V >.equals ( value,
obj 
)
protected

Definition at line 128 of file GenericTree.java.

128  {
129  return (value == null && obj == null) ||
130  (value != null && value.equals(obj));
131  }
Here is the caller graph for this function:

◆ getObjectValue()

V org.turro.zkoss.tree.GenericTree< V >.getObjectValue ( )

Definition at line 88 of file GenericTree.java.

88  {
89  if(!populated) {
90  return internalValue;
91  }
92  Treeitem li = getSelectedItem();
93  if(li != null && li.getValue() != null) {
94  return (V) li.getValue();
95  }
96  return null;
97  }
Here is the caller graph for this function:

◆ populateList()

abstract void org.turro.zkoss.tree.GenericTree< V >.populateList ( )
abstractprotected

Reimplemented in org.turro.financials.contract.ContractDefinitionTree.

Here is the caller graph for this function:

◆ selectItemByText()

void org.turro.zkoss.tree.GenericTree< V >.selectItemByText ( String  text)

Definition at line 106 of file GenericTree.java.

106  {
107  if(text != null && text.length() > 3) {
108  for(Object item : getItems()) {
109  if(item instanceof Treeitem) {
110  String l = ((Treeitem) item).getLabel();
111  if(l.toLowerCase().contains(text.toLowerCase())) {
112  setSelectedItem((Treeitem) item);
113  showItem((Treeitem) item);
114  Events.postEvent(new Event(Events.ON_SELECT, GenericTree.this));
115  }
116  }
117  }
118  }
119  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setObjectValue()

void org.turro.zkoss.tree.GenericTree< V >.setObjectValue ( value)

Definition at line 59 of file GenericTree.java.

59  {
60  if(!populated) {
61  internalValue = value;
62  }
63  if(value == null && selectFirst && getItemCount() > 0) {
64  setSelectedFirstItem();
65  } else {
66  for(Object item : getItems()) {
67  if(item instanceof Treeitem) {
68  if(equals((V) ((Treeitem) item).getValue(), (V) value)) {
69  setSelectedItem((Treeitem) item);
70  }
71  }
72  }
73  }
74  }
boolean equals(V value, V obj)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ showItem()

void org.turro.zkoss.tree.GenericTree< V >.showItem ( Treeitem  item)

Definition at line 121 of file GenericTree.java.

121  {
122  while(item != null) {
123  item.setOpen(true);
124  item = item.getParentItem();
125  }
126  }
Here is the caller graph for this function:

Member Data Documentation

◆ populated

boolean org.turro.zkoss.tree.GenericTree< V >.populated = false
protected

Definition at line 37 of file GenericTree.java.


The documentation for this class was generated from the following file: