Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31360/src/net/sourceforge/bprocessor/model
Modified Files:
Constraint.java Project.java
Log Message:
Constraints now is shown in D-View
Index: Constraint.java
===================================================================
RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Constraint.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** Constraint.java 10 Jan 2006 10:45:21 -0000 1.1
--- Constraint.java 30 Jan 2006 15:08:39 -0000 1.2
***************
*** 21,25 ****
* state.
*/
! public abstract class Constraint implements Observer {
/** The master */
private Entity master;
--- 21,25 ----
* state.
*/
! public abstract class Constraint extends Entity implements Observer {
/** The master */
private Entity master;
***************
*** 96,98 ****
--- 96,119 ----
return entities;
}
+
+ /**
+ * Return name
+ * @return The name
+ */
+ public String getName() {
+ if (id == null) {
+ return "C";
+ } else {
+ return "C" + id;
+ }
+ }
+
+ /**
+ * Return the center for the entity
+ * @return The center as a vertex
+ */
+ public Vertex center() {
+ return null;
+ }
+
}
Index: Project.java
===================================================================
RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Project.java,v
retrieving revision 1.31
retrieving revision 1.32
diff -C2 -d -r1.31 -r1.32
*** Project.java 30 Jan 2006 14:48:48 -0000 1.31
--- Project.java 30 Jan 2006 15:08:39 -0000 1.32
***************
*** 153,156 ****
--- 153,158 ----
public void add(Constraint constraint) {
constraints.add(constraint);
+ constraint.setId(new Long(constraints.size()));
+ changed(this);
}
***************
*** 161,164 ****
--- 163,168 ----
public void remove(Constraint constraint) {
constraints.remove(constraint);
+ constraint.setId(null);
+ changed(this);
}
|