Author: scooter
Date: 2012-08-23 11:27:46 -0700 (Thu, 23 Aug 2012)
New Revision: 30258

Modified:
   
core3/impl/trunk/group-impl/src/main/java/org/cytoscape/group/internal/CyGroupImpl.java
Log:
Make the group collapsed column network-specific


Modified: 
core3/impl/trunk/group-impl/src/main/java/org/cytoscape/group/internal/CyGroupImpl.java
===================================================================
--- 
core3/impl/trunk/group-impl/src/main/java/org/cytoscape/group/internal/CyGroupImpl.java
     2012-08-23 18:26:46 UTC (rev 30257)
+++ 
core3/impl/trunk/group-impl/src/main/java/org/cytoscape/group/internal/CyGroupImpl.java
     2012-08-23 18:27:46 UTC (rev 30258)
@@ -738,23 +738,10 @@
 
                List<String> newList = new ArrayList<String>();
                if (stateColumn == null) {
-                       hiddenTable.createListColumn(GROUP_COLLAPSED_ATTR, 
String.class, true);
+                       hiddenTable.createColumn(GROUP_COLLAPSED_ATTR, 
Boolean.class, false, Boolean.FALSE);
                }
 
-               List<String> stateList = groupRow.getList(GROUP_COLLAPSED_ATTR, 
String.class);
-               if (stateList == null) {
-                       newList.add(netName+":"+collapsed);
-               } else {
-                       for (String s: stateList) {
-                               String[] tokens = s.split(":");
-                               if (netName.equals(tokens[0])) {
-                                       newList.add(netName+":"+collapsed);
-                               } else {
-                                       newList.add(s);
-                               }
-                       }
-               }
-               groupRow.set(GROUP_COLLAPSED_ATTR, newList);
+               groupRow.set(GROUP_COLLAPSED_ATTR, collapsed);
                return;
        }
 
@@ -772,14 +759,8 @@
                if (stateColumn == null) {
                        return false;
                }
-               List<String> stateList = groupRow.getList(GROUP_COLLAPSED_ATTR, 
String.class);
-               for (String s: stateList) {
-                       String[] tokens = s.split(":");
-                       if (netName.equals(tokens[0])) {
-                               return 
Boolean.valueOf(tokens[1]).booleanValue();
-                       }
-               }
-               return false;
+
+               return groupRow.get(GROUP_COLLAPSED_ATTR, Boolean.class);
        }
 
        public void updateCountAttributes(CyNetwork net) {

-- 
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