Update of /cvsroot/bprocessor/facade/src/net/sourceforge/bprocessor/facade/modellor
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv2979/src/net/sourceforge/bprocessor/facade/modellor
Modified Files:
NetFacadeModellor.java
Log Message:
implemented passiv/active modellors
Index: NetFacadeModellor.java
===================================================================
RCS file: /cvsroot/bprocessor/facade/src/net/sourceforge/bprocessor/facade/modellor/NetFacadeModellor.java,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** NetFacadeModellor.java 6 Feb 2007 16:20:32 -0000 1.14
--- NetFacadeModellor.java 7 Feb 2007 16:53:00 -0000 1.15
***************
*** 129,154 ****
*/
public void update(Object entity) {
! boolean update = false;
! if (entity instanceof Geometric) {
! Geometric geo = (Geometric)entity;
! if (geo == net || geo.getOwner() == net) {
update = true;
}
! }
! if (!update ||
! entity == this ||
! entity == Project.getInstance()) {
! update = true;
! }
!
! if (!space.getEnvelope().contains(front)) {
! update = false;
! }
! if (space.getModellor() != this) { //sanity check
! update = false;
! delete();
! }
! if (update) {
! regenerate();
}
}
--- 129,156 ----
*/
public void update(Object entity) {
! if (this.isActive()) {
! boolean update = false;
! if (entity instanceof Geometric) {
! Geometric geo = (Geometric)entity;
! if (geo == net || geo.getOwner() == net) {
! update = true;
! }
! }
! if (!update &&
! (entity == this ||
! entity == Project.getInstance())) {
update = true;
}
!
! if (!space.getEnvelope().contains(front)) {
! update = false;
! }
! if (space.getModellor() != this) { //sanity check
! update = false;
! delete();
! }
! if (update) {
! regenerate();
! }
}
}
***************
*** 180,184 ****
attributes.add(new Attribute("Depth", new Double(depth), true));
attributes.add(new Attribute("Single", Boolean.valueOf(single), true));
!
return attributes;
}
--- 182,186 ----
attributes.add(new Attribute("Depth", new Double(depth), true));
attributes.add(new Attribute("Single", Boolean.valueOf(single), true));
! attributes.addAll(super.getAttributes());
return attributes;
}
***************
*** 213,216 ****
--- 215,219 ----
}
}
+ super.setAttributes(attributes);
}
|