[Bprocessor-commit] gui/src/net/sourceforge/bprocessor/gui/treeview GenericTreeView.java, 1.39, 1.4
Status: Pre-Alpha
Brought to you by:
henryml
From: Nikolaj B. <nbr...@us...> - 2006-09-11 09:21:13
|
Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/treeview In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv8848/src/net/sourceforge/bprocessor/gui/treeview Modified Files: GenericTreeView.java SpaceTreeView.java Log Message: Made some adjustments to the tree view, where there is now a root node called project. Project contains the spaces, and also its parametric so selecting the node gives various info. Index: GenericTreeView.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/treeview/GenericTreeView.java,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -d -r1.39 -r1.40 *** GenericTreeView.java 31 Aug 2006 13:01:49 -0000 1.39 --- GenericTreeView.java 11 Sep 2006 09:21:03 -0000 1.40 *************** *** 698,716 **** /** ! * SpaceContainer */ ! public class SpaceContainer extends ContainerNode { /** * */ private static final long serialVersionUID = 1L; ! /** ! * Constructor for SpaceContainer * @param name Display name ! * @param spaces The spaces */ ! public SpaceContainer(String name, Collection spaces) { ! super(name); final Comparator alpha = new Comparator() { --- 698,721 ---- /** ! * ProjectContainer */ ! public class ProjectContainer extends ContainerNode { /** * */ private static final long serialVersionUID = 1L; ! ! /** name */ ! private String name; ! /** ! * Constructor for ProjectContainer * @param name Display name ! * @param object The project */ ! public ProjectContainer(String name, Project object) { ! super(object); ! Collection spaces = object.getSpaces(); ! this.name = name; final Comparator alpha = new Comparator() { *************** *** 739,742 **** --- 744,755 ---- /** + * Name + * @return String + */ + public String toString() { + return name; + } + + /** * Return icon * @return Icon Index: SpaceTreeView.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/treeview/SpaceTreeView.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** SpaceTreeView.java 21 Jul 2006 14:58:58 -0000 1.12 --- SpaceTreeView.java 11 Sep 2006 09:21:03 -0000 1.13 *************** *** 40,45 **** Object[] paths = findPaths(e); root.removeAllChildren(); ! root.add(new SpaceContainer("Construction", Project.getInstance().getConstructionSpaces())); ! root.add(new SpaceContainer("Functional", Project.getInstance().getFunctionalSpaces())); root.add(new ConstraintContainer("Constraints", Project.getInstance().getConstraints())); root.add(new ParameterBlockNode("Globals", Project.getInstance().getGlobals())); --- 40,44 ---- Object[] paths = findPaths(e); root.removeAllChildren(); ! root.add(new ProjectContainer("Project", Project.getInstance())); root.add(new ConstraintContainer("Constraints", Project.getInstance().getConstraints())); root.add(new ParameterBlockNode("Globals", Project.getInstance().getGlobals())); |