Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/treeview
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22047/src/net/sourceforge/bprocessor/gui/treeview
Modified Files:
GenericTreeView.java SpaceTreeView.java SurfaceTreeView.java
Log Message:
New simplified treeviews in use
Index: SurfaceTreeView.java
===================================================================
RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/treeview/SurfaceTreeView.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** SurfaceTreeView.java 3 Jan 2006 10:53:50 -0000 1.1
--- SurfaceTreeView.java 3 Jan 2006 12:14:04 -0000 1.2
***************
*** 10,13 ****
--- 10,14 ----
import java.util.Set;
+ import net.sourceforge.bprocessor.kernel.notification.Notification;
import net.sourceforge.bprocessor.model.Project;
***************
*** 29,33 ****
*/
public void update() {
- System.out.println("update " + System.currentTimeMillis());
root.removeAllChildren();
Set surfaces = Project.getInstance().getSurfaces();
--- 30,33 ----
***************
*** 36,40 ****
}
!
}
--- 36,52 ----
}
! /**
! * Specify if we want to handle notification
! * @param type String specifying type of notification
! * @return True if we want to handle it
! */
! public boolean isNotificationEnabled(String type) {
! if (type.equals(Notification.SURFACE_CREATED) ||
! type.equals(Notification.SURFACE_DELETED) ||
! type.equals(Notification.SURFACE_MODIFIED)) {
! return true;
! }
! return false;
! }
}
Index: GenericTreeView.java
===================================================================
RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/treeview/GenericTreeView.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** GenericTreeView.java 3 Jan 2006 10:53:50 -0000 1.1
--- GenericTreeView.java 3 Jan 2006 12:14:04 -0000 1.2
***************
*** 197,201 ****
super(space);
Set surfaces = space.getSurfaces();
! add(new SurfaceContainer("Surfaces", surfaces));
}
}
--- 197,202 ----
super(space);
Set surfaces = space.getSurfaces();
! add(new SurfaceContainer("Surface", surfaces));
! add(new ContainerNode("Element"));
}
}
***************
*** 211,215 ****
public SurfaceNode(Surface surface) {
super(surface);
! add(new EdgeContainer("Edges", surface.getEdges()));
}
}
--- 212,216 ----
public SurfaceNode(Surface surface) {
super(surface);
! add(new EdgeContainer("Edge", surface.getEdges()));
}
}
***************
*** 332,343 ****
*/
public boolean isNotificationEnabled(String type) {
- if (type.equals(Notification.FUNCTIONAL_SPACE_CREATED) ||
- type.equals(Notification.FUNCTIONAL_SPACE_DELETED) ||
- type.equals(Notification.FUNCTIONAL_SPACE_MODIFIED) ||
- type.equals(Notification.CONSTRUCTION_SPACE_CREATED) ||
- type.equals(Notification.CONSTRUCTION_SPACE_DELETED) ||
- type.equals(Notification.CONSTRUCTION_SPACE_MODIFIED)) {
- return true;
- }
return false;
}
--- 333,336 ----
Index: SpaceTreeView.java
===================================================================
RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/treeview/SpaceTreeView.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** SpaceTreeView.java 3 Jan 2006 10:53:50 -0000 1.1
--- SpaceTreeView.java 3 Jan 2006 12:14:04 -0000 1.2
***************
*** 10,13 ****
--- 10,14 ----
import java.util.Set;
+ import net.sourceforge.bprocessor.kernel.notification.Notification;
import net.sourceforge.bprocessor.model.Project;
***************
*** 28,32 ****
*/
public void update() {
- System.out.println("update " + System.currentTimeMillis());
root.removeAllChildren();
Set construction = Project.getInstance().getConstructionSpaces();
--- 29,32 ----
***************
*** 37,39 ****
--- 37,57 ----
model.nodeStructureChanged(root);
}
+
+ /**
+ * Specify if we want to handle notification
+ * @param type String specifying type of notification
+ * @return True if we want to handle it
+ */
+ public boolean isNotificationEnabled(String type) {
+ if (type.equals(Notification.FUNCTIONAL_SPACE_CREATED) ||
+ type.equals(Notification.FUNCTIONAL_SPACE_DELETED) ||
+ type.equals(Notification.FUNCTIONAL_SPACE_MODIFIED) ||
+ type.equals(Notification.CONSTRUCTION_SPACE_CREATED) ||
+ type.equals(Notification.CONSTRUCTION_SPACE_DELETED) ||
+ type.equals(Notification.CONSTRUCTION_SPACE_MODIFIED)) {
+ return true;
+ }
+ return false;
+ }
+
}
|