- Timestamp:
- Apr 20, 2010, 5:21:42 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
vanHelsing/trunk/gui/src/de/dass_it/vanhelsing/gui/TreeNavigation.java
r859 r865 12 12 import de.dass_it.www.vanhelsing.VanHelsingStub.*; 13 13 14 /* 14 /** 15 15 * Helper class to encapsulate all procedures 16 16 * to work with the tree structure. 17 * @author tgoecke 17 18 */ 18 19 public class TreeNavigation extends BeanUtil { 19 20 private DefaultTreeModel tree; 20 21 //private Logger logger = Logger.getLogger(this.getClass()); 22 /** 23 * @param root root node of the tree to be created 24 * @param nodes list of names (resource types) used to create header nodes 25 * @param title argument currently not used. 26 * @return tree returns a data tree to be used by a view bean 27 */ 21 28 public DefaultTreeModel createTree(DefaultMutableTreeNode root, 22 29 String[] nodes, String title){ … … 43 50 return tree; 44 51 } 45 52 /** 53 * adds a node to the given parent node, of resource type string and label value title 54 * @param parent parent node of the created node 55 * @param type resource type of the created node 56 * @param title label value of the created type 57 * @return node the created node 58 */ 46 59 public DefaultMutableTreeNode addNode(DefaultMutableTreeNode parent, String type, String title){ 47 60 DefaultMutableTreeNode node = new DefaultMutableTreeNode(); … … 84 97 return null; 85 98 } 99 /** 100 * adds a node to the given parent node of resourcetype type which contains the values of the ResourceInfo() object 101 * @param parent parent node of the created node 102 * @param type resource type of the created node 103 * @param ri the data object which is used to update the node UserObject 104 * @return node the created node 105 */ 86 106 public DefaultMutableTreeNode addNode(DefaultMutableTreeNode parent, String type, ResourceInfo ri){ 87 107 DefaultMutableTreeNode node = new DefaultMutableTreeNode(); … … 142 162 return null; 143 163 } 164 /** 165 * adds a node to the given parent node of resourcetype type which contains the values of the ResourceAttributeType[] 166 * @param parent parent node of the created node 167 * @param type resource type of the created node 168 * @param ra a list of key value pairs returned by the web service access methods 169 * @return node the updated parent node 170 */ 144 171 public DefaultMutableTreeNode addNode(DefaultMutableTreeNode parent, String type, ResourceAttributeType[] ra){ 145 172 … … 193 220 } 194 221 } 195 196 197 198 199 222 //Value-Wert aus Key: Value zusammenbauen 200 223 … … 217 240 return null; 218 241 } 242 /** 243 * returns the first node whose UserObject attribute resId matches the given id or null if no node is found 244 * @param id resId value of the node 245 * @param tree tree object which contains the node 246 * @return matching node or null if no mathcing node is found 247 */ 219 248 public DefaultMutableTreeNode getNode(String id, DefaultTreeModel tree){ 220 249 DefaultMutableTreeNode root; … … 234 263 return null; 235 264 } 265 /** 266 * returns the UserObject of a node whose resId attribute matches id 267 */ 236 268 public UserObjectItem getNodeObject(String id, DefaultTreeModel tree){ 237 269 DefaultMutableTreeNode node = getNode(id, tree);
Note:
See TracChangeset
for help on using the changeset viewer.