1 23 package org.objectweb.clif.scenario.util.isac.gui.tree; 24 25 import org.objectweb.clif.scenario.util.isac.util.tree.ScenarioNode; 26 import org.apache.log4j.Category; 27 import org.eclipse.jface.viewers.ITreeContentProvider; 28 import java.util.Vector ; 29 import org.eclipse.jface.viewers.Viewer; 30 31 38 public class ScenarioTreeContentProvider implements ITreeContentProvider { 39 static Category cat = Category.getInstance(ScenarioTreeContentProvider.class.getName()); 40 41 46 public Object [] getChildren(Object element) { 47 cat.debug("-> getChildren") ; 48 Vector children = ((ScenarioNode) element).getChildren(); 49 return (Object []) children.toArray(new Object [children.size()]); 50 54 } 56 57 62 public Object [] getElements(Object element) { 63 cat.debug("-> getElements") ; 64 return getChildren(element); 65 } 66 67 72 public boolean hasChildren(Object element) { 73 cat.debug("-> hasChildren") ; 74 return getChildren(element).length > 0; 75 } 76 77 82 public Object getParent(Object element) { 83 cat.debug("-> getParent") ; 84 return ((ScenarioNode) element).getParent(); 85 } 86 87 90 public void dispose() { 91 cat.debug("-> dispose") ; 92 } 93 94 100 public void inputChanged( 101 Viewer viewer, 102 Object old_input, 103 Object new_input) { 104 } 105 106 } 107 | Popular Tags |