Author: scooter
Date: 2010-11-03 17:22:28 -0700 (Wed, 03 Nov 2010)
New Revision: 22707

Removed:
   
cytoscape/trunk/application/src/main/java/cytoscape/groups/CyGroupChangeEvent.java
Modified:
   
cytoscape/trunk/application/src/main/java/cytoscape/groups/CyGroupChangeListener.java
   
cytoscape/trunk/application/src/main/java/cytoscape/groups/CyGroupManager.java
Log:
Revert from having the change enum for CyGroupChangeListener in a separate 
CyGroupChangeEvent file back to having it in CyGroupChangeListener.ChangeType


Deleted: 
cytoscape/trunk/application/src/main/java/cytoscape/groups/CyGroupChangeEvent.java
===================================================================
--- 
cytoscape/trunk/application/src/main/java/cytoscape/groups/CyGroupChangeEvent.java
  2010-11-03 23:40:47 UTC (rev 22706)
+++ 
cytoscape/trunk/application/src/main/java/cytoscape/groups/CyGroupChangeEvent.java
  2010-11-04 00:22:28 UTC (rev 22707)
@@ -1,44 +0,0 @@
-/* vim :set ts=2: */
-/*
-  File: CyGroupChangeListener.java
-
-  Copyright (c) 2007, The Cytoscape Consortium (www.cytoscape.org)
-
-  The Cytoscape Consortium is:
-  - Institute for Systems Biology
-  - University of California San Diego
-  - Memorial Sloan-Kettering Cancer Center
-  - Institut Pasteur
-  - Agilent Technologies
-
-  This library is free software; you can redistribute it and/or modify it
-  under the terms of the GNU Lesser General Public License as published
-  by the Free Software Foundation; either version 2.1 of the License, or
-  any later version.
-
-  This library is distributed in the hope that it will be useful, but
-  WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF
-  MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  The software and
-  documentation provided hereunder is on an "as is" basis, and the
-  Institute for Systems Biology and the Whitehead Institute
-  have no obligations to provide maintenance, support,
-  updates, enhancements or modifications.  In no event shall the
-  Institute for Systems Biology and the Whitehead Institute
-  be liable to any party for direct, indirect, special,
-  incidental or consequential damages, including lost profits, arising
-  out of the use of this software and its documentation, even if the
-  Institute for Systems Biology and the Whitehead Institute
-  have been advised of the possibility of such damage.  See
-  the GNU Lesser General Public License for more details.
-
-  You should have received a copy of the GNU Lesser General Public License
-  along with this library; if not, write to the Free Software Foundation,
-  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
-*/
-package cytoscape.groups;
-
-/**
- * The types of notifications we pass to our listeners
- */
-public enum CyGroupChangeEvent { GROUP_CREATED, GROUP_DELETED, GROUP_MODIFIED }
-

Modified: 
cytoscape/trunk/application/src/main/java/cytoscape/groups/CyGroupChangeListener.java
===================================================================
--- 
cytoscape/trunk/application/src/main/java/cytoscape/groups/CyGroupChangeListener.java
       2010-11-03 23:40:47 UTC (rev 22706)
+++ 
cytoscape/trunk/application/src/main/java/cytoscape/groups/CyGroupChangeListener.java
       2010-11-04 00:22:28 UTC (rev 22707)
@@ -42,9 +42,11 @@
  * group-related events to get notified of global group changes (new groups, 
etc.).
  */
 public interface CyGroupChangeListener {
+       public enum ChangeType { GROUP_CREATED, GROUP_DELETED, GROUP_MODIFIED }
+
        /**
         * This method will be called by the CyGroupManager when a group is 
created, deleted, 
         * or modified.
         */
-       public void groupChanged(CyGroup group, CyGroupChangeEvent change);
+       public void groupChanged(CyGroup group, ChangeType change);
 }

Modified: 
cytoscape/trunk/application/src/main/java/cytoscape/groups/CyGroupManager.java
===================================================================
--- 
cytoscape/trunk/application/src/main/java/cytoscape/groups/CyGroupManager.java  
    2010-11-03 23:40:47 UTC (rev 22706)
+++ 
cytoscape/trunk/application/src/main/java/cytoscape/groups/CyGroupManager.java  
    2010-11-04 00:22:28 UTC (rev 22707)
@@ -264,7 +264,7 @@
                // Create the group itself
                CyGroup group = new CyGroupImpl(groupNode, nodeList, 
innerEdgeList, outerEdgeList, network);
                groupMap.put(group.getGroupNode(), group);
-               notifyListeners(group, CyGroupChangeEvent.GROUP_CREATED);
+               notifyListeners(group, 
CyGroupChangeListener.ChangeType.GROUP_CREATED);
                if (viewer != null)
                        setGroupViewer(group, viewer, null, true);
                return group;
@@ -289,7 +289,7 @@
                CyGroup group = new CyGroupImpl(groupName);
                groupMap.put(group.getGroupNode(), group);
                setGroupNetwork(group, network);
-               notifyListeners(group, CyGroupChangeEvent.GROUP_CREATED);
+               notifyListeners(group, 
CyGroupChangeListener.ChangeType.GROUP_CREATED);
                setGroupViewer(group, viewer, null, true);
                return group;
        }
@@ -313,7 +313,7 @@
                CyGroup group = new CyGroupImpl(groupName, nodeList);
                groupMap.put(group.getGroupNode(), group);
                setGroupNetwork(group, network);
-               notifyListeners(group, CyGroupChangeEvent.GROUP_CREATED);
+               notifyListeners(group, 
CyGroupChangeListener.ChangeType.GROUP_CREATED);
                setGroupViewer(group, viewer, null, false);
                return group;
        }
@@ -352,7 +352,7 @@
 
                setGroupNetwork(group, network);
 
-               notifyListeners(group, CyGroupChangeEvent.GROUP_CREATED);
+               notifyListeners(group, 
CyGroupChangeListener.ChangeType.GROUP_CREATED);
 
                if (viewer != null)
                        setGroupViewer(group, viewer, null, true);
@@ -469,7 +469,7 @@
                        RootGraph rg = groupNode.getRootGraph();
                        rg.removeNode(groupNode);
 
-                       notifyListeners(group, 
CyGroupChangeEvent.GROUP_DELETED);
+                       notifyListeners(group, 
CyGroupChangeListener.ChangeType.GROUP_DELETED);
                }
        }
 
@@ -544,7 +544,7 @@
                                } else if (currentView != null) {
                                        v.groupCreated(group, currentView);
                                }
-                               notifyListeners(group, 
CyGroupChangeEvent.GROUP_MODIFIED);
+                               notifyListeners(group, 
CyGroupChangeListener.ChangeType.GROUP_MODIFIED);
                        }
                }
 
@@ -615,7 +615,7 @@
         * @param group the group that has changed
         * @param whatChanged the thing that has changed about the group
         */
-       private static void notifyListeners(CyGroup group, CyGroupChangeEvent 
whatChanged) {
+       private static void notifyListeners(CyGroup group, 
CyGroupChangeListener.ChangeType whatChanged) {
                for (CyGroupChangeListener listener: changeListeners) {
                        listener.groupChanged(group, whatChanged);
                }

-- 
You received this message because you are subscribed to the Google Groups 
"cytoscape-cvs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/cytoscape-cvs?hl=en.

Reply via email to