1 18 19 package org.objectweb.jac.aspects.gui; 20 21 import org.objectweb.jac.core.rtti.ClassItem; 22 import java.util.Iterator ; 23 import java.util.Vector ; 24 25 26 27 30 public class ClassChooser { 31 public ClassChooser(ClassItem root) { 32 this.root = root; 33 } 34 ClassItem root; 35 public ClassItem getRoot() { 36 return root; 37 } 38 ClassItem choice; 39 public void setChoice(ClassItem cl) { 40 this.choice = cl; 41 } 42 public ClassItem getChoice() { 43 return choice; 44 } 45 46 public Vector getChoices() { 47 Vector result = new Vector (); 48 if (!root.isAbstract()) 49 result.add(root); 50 Iterator it = root.getChildren().iterator(); 51 while (it.hasNext()) { 52 ClassItem cl = (ClassItem)it.next(); 53 if (!cl.isAbstract()) 54 result.add(cl); 55 } 56 return result; 57 } 58 } 59 | Popular Tags |