Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/treeview
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21815/src/net/sourceforge/bprocessor/gui/treeview
Modified Files:
GenericTreeView.java SpaceTreeView.java SurfaceTreeView.java
Log Message:
Replaced created/remove/modified from Notifier with changed/update
Index: SurfaceTreeView.java
===================================================================
RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/treeview/SurfaceTreeView.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** SurfaceTreeView.java 3 Jan 2006 12:14:04 -0000 1.2
--- SurfaceTreeView.java 4 Jan 2006 14:29:55 -0000 1.3
***************
*** 9,14 ****
import java.util.Set;
-
- import net.sourceforge.bprocessor.kernel.notification.Notification;
import net.sourceforge.bprocessor.model.Project;
--- 9,12 ----
***************
*** 27,31 ****
/**
* Update the TreeView
- *
*/
public void update() {
--- 25,28 ----
***************
*** 35,52 ****
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.SURFACE_CREATED) ||
- type.equals(Notification.SURFACE_DELETED) ||
- type.equals(Notification.SURFACE_MODIFIED)) {
- return true;
- }
- return false;
- }
-
}
--- 32,34 ----
Index: GenericTreeView.java
===================================================================
RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/treeview/GenericTreeView.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** GenericTreeView.java 3 Jan 2006 16:00:24 -0000 1.4
--- GenericTreeView.java 4 Jan 2006 14:29:55 -0000 1.5
***************
*** 19,23 ****
import net.sourceforge.bprocessor.kernel.notification.Notification;
- import net.sourceforge.bprocessor.kernel.notification.NotificationListener;
import net.sourceforge.bprocessor.kernel.notification.Notifier;
import net.sourceforge.bprocessor.model.Edge;
--- 19,22 ----
***************
*** 32,36 ****
* The GenericTreeView
*/
! public class GenericTreeView extends TreeView implements NotificationListener, Observer {
/** The model */
--- 31,35 ----
* The GenericTreeView
*/
! public class GenericTreeView extends TreeView implements Observer {
/** The model */
***************
*** 53,57 ****
setRootVisible(false);
setShowsRootHandles(true);
- Notifier.getInstance().addListener(this);
Project.getInstance().addObserver(this);
this.addTreeSelectionListener(new SelectionListener());
--- 52,55 ----
***************
*** 322,342 ****
}
}
! /**
! * Handle notification
! * @param arg0 The notification
! */
! public void handleNotification(Notification arg0) {
! changed();
! }
!
! /**
! * 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) {
! return false;
! }
!
/**
* Update
--- 320,324 ----
}
}
!
/**
* Update
Index: SpaceTreeView.java
===================================================================
RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/treeview/SpaceTreeView.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** SpaceTreeView.java 3 Jan 2006 12:14:04 -0000 1.2
--- SpaceTreeView.java 4 Jan 2006 14:29:55 -0000 1.3
***************
*** 10,14 ****
import java.util.Set;
- import net.sourceforge.bprocessor.kernel.notification.Notification;
import net.sourceforge.bprocessor.model.Project;
--- 10,13 ----
***************
*** 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;
- }
-
}
--- 36,38 ----
|