Thread: [Bprocessor-commit] gui/src/net/sourceforge/bprocessor/gui/treeview LibraryTreeView.java, NONE, 1.1
Status: Pre-Alpha
Brought to you by:
henryml
From: rimestad <rim...@us...> - 2007-11-06 18:27:50
|
Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/treeview In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv7640/src/net/sourceforge/bprocessor/gui/treeview Modified Files: GenericTreeView.java Added Files: LibraryTreeView.java Log Message: Added library tab to view --- NEW FILE: LibraryTreeView.java --- //--------------------------------------------------------------------------------- // $Id: LibraryTreeView.java,v 1.1 2007/11/06 18:27:53 rimestad Exp $ // // Copyright (c) 2005 The BProcessor Team (http://bprocessor.sourceforge.net) // Released under the Lesser GNU Public License v2.1 //--------------------------------------------------------------------------------- package net.sourceforge.bprocessor.gui.treeview; import net.sourceforge.bprocessor.model.Project; /** * A class for the tree structure og the library tree view * @author rimestad */ public class LibraryTreeView extends GenericTreeView { /** * Constrcutor */ public LibraryTreeView() { super(); root.removeAllChildren(); root.add(new CatalogContainer(Project.getInstance())); model.nodeStructureChanged(root); } /** {@inheritDoc} */ @Override public void update() { ((GenericNode)root.getChildAt(0)).update(Project.getInstance()); } } Index: GenericTreeView.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/treeview/GenericTreeView.java,v retrieving revision 1.118 retrieving revision 1.119 diff -C2 -d -r1.118 -r1.119 *** GenericTreeView.java 6 Nov 2007 08:06:12 -0000 1.118 --- GenericTreeView.java 6 Nov 2007 18:27:53 -0000 1.119 *************** *** 670,679 **** ContainerNode cn = new ConstructorContainer("Constructors", space.getConstructors()); add(cn); - if (space.isUnion()) { - ContainerNode tc = - new TransformationContainer("Transformations", space.getTransformations().stack()); - tc.update(space.getTransformations().stack()); - add(tc); - } if (space.getModellor() != null) { add(new ModellorNode(space.getModellor())); --- 670,673 ---- *************** *** 690,697 **** SpaceNode proto = new SpaceNode(space.getProto()); add(proto); ! ContainerNode tc = ! new TransformationContainer("Transformations", space.getTransformations().stack()); ! tc.update(space.getTransformations().stack()); ! add(tc); } --- 684,691 ---- SpaceNode proto = new SpaceNode(space.getProto()); add(proto); ! CoordinateSystem cs = space.getInstanceAnchor(); ! if (cs != null) { ! add(new ConstructorNode(cs)); ! } } *************** *** 707,711 **** ((GenericNode)getChildAt(0)).update(s.getEnvelope()); ((GenericNode)getChildAt(1)).update(s.getProto()); ! ((GenericNode)getChildAt(2)).update(s.getTransformations().stack()); } else { removeAllChildren(); --- 701,705 ---- ((GenericNode)getChildAt(0)).update(s.getEnvelope()); ((GenericNode)getChildAt(1)).update(s.getProto()); ! ((GenericNode)getChildAt(2)).update(s.getInstanceAnchor()); } else { removeAllChildren(); *************** *** 721,735 **** ((GenericNode)getChildAt(3)).update(s.getConstructors()); int placement = 4; - if (s.isUnion()) { - if (getChildCount() >= placement + 1) { - ((GenericNode)getChildAt(placement)).update(s.getTransformations().stack()); - } else { - ContainerNode tc = new TransformationContainer("Transformations", - space.getTransformations().stack()); - this.add(tc); - model.nodesWereInserted(this, new int[]{placement}); - } - placement++; - } if (s.getModellor() != null) { if (getChildCount() >= placement + 1) { --- 715,718 ---- *************** *** 1184,1188 **** */ public CatalogContainer(Project p) { ! super("Catalog objects", p.getCatalogObjects(), true); insertChildren(p.getCatalogObjects()); } --- 1167,1171 ---- */ public CatalogContainer(Project p) { ! super("Catalog", p.getCatalogObjects(), true); insertChildren(p.getCatalogObjects()); } *************** *** 1238,1244 **** if (o instanceof Space) { Space s = (Space)o; ! ((GenericNode)root.getChildAt(0)).update(s.getSurfaces()); ! ((GenericNode)root.getChildAt(1)).update(s.getEdges()); ! ((GenericNode)root.getChildAt(2)).update(s.getVertices()); } } --- 1221,1227 ---- if (o instanceof Space) { Space s = (Space)o; ! ((GenericNode)this.getChildAt(0)).update(s.getSurfaces()); ! ((GenericNode)this.getChildAt(1)).update(s.getEdges()); ! ((GenericNode)this.getChildAt(2)).update(s.getVertices()); } } |