Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/treeview
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31337/src/net/sourceforge/bprocessor/gui/treeview
Modified Files:
GenericTreeView.java SpaceTreeView.java
Log Message:
Constraints now is shown in D-View
Index: GenericTreeView.java
===================================================================
RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/treeview/GenericTreeView.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** GenericTreeView.java 23 Jan 2006 10:16:26 -0000 1.10
--- GenericTreeView.java 30 Jan 2006 15:08:35 -0000 1.11
***************
*** 20,23 ****
--- 20,24 ----
import net.sourceforge.bprocessor.model.Camera;
+ import net.sourceforge.bprocessor.model.Constraint;
import net.sourceforge.bprocessor.model.Edge;
import net.sourceforge.bprocessor.model.Entity;
***************
*** 295,298 ****
--- 296,330 ----
/**
+ * ConstraintNode
+ */
+ public class ConstraintNode extends EntityNode {
+ /**
+ * Constructor for ConstraintNode
+ * @param constraint The constraint
+ */
+ public ConstraintNode(Constraint constraint) {
+ super(constraint);
+ }
+ }
+
+ /**
+ * ConstraintContainer
+ */
+ public class ConstraintContainer extends ContainerNode {
+ /**
+ * Constructor for ConstraintContainer
+ * @param name The name
+ * @param constraints The constraints
+ */
+ public ConstraintContainer(String name, Collection constraints) {
+ super(name);
+ Iterator iter = constraints.iterator();
+ while (iter.hasNext()) {
+ Constraint current = (Constraint) iter.next();
+ add(new ConstraintNode(current));
+ }
+ }
+ }
+ /**
* Selection Listener
*/
Index: SpaceTreeView.java
===================================================================
RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/treeview/SpaceTreeView.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** SpaceTreeView.java 23 Jan 2006 10:16:26 -0000 1.4
--- SpaceTreeView.java 30 Jan 2006 15:08:35 -0000 1.5
***************
*** 31,37 ****
Collection construction = Project.getInstance().getConstructionSpaces();
Collection functional = Project.getInstance().getFunctionalSpaces();
! Collection surfaces = Project.getInstance().getSurfaces();
root.add(new SpaceContainer("Functional", functional));
root.add(new SpaceContainer("Construction", construction));
model.nodeStructureChanged(root);
}
--- 31,38 ----
Collection construction = Project.getInstance().getConstructionSpaces();
Collection functional = Project.getInstance().getFunctionalSpaces();
! Collection constraints = Project.getInstance().getConstraints();
root.add(new SpaceContainer("Functional", functional));
root.add(new SpaceContainer("Construction", construction));
+ root.add(new ConstraintContainer("Constraints", constraints));
model.nodeStructureChanged(root);
}
|