Author: clopes
Date: 2012-04-13 11:56:29 -0700 (Fri, 13 Apr 2012)
New Revision: 28825

Modified:
   
core3/impl/trunk/group-view-impl/src/main/java/org/cytoscape/group/view/internal/GroupViewCollapseHandler.java
Log:
When groups are collapsed, NODE_NESTED_NETWORK_IMAGE_VISIBLE is added to 
group-node views as a locked visual property, so the nested network image (or 
default icon) is not displayed. If the group is set to "useNestedNetworks", the 
locked visual property is removed.

Modified: 
core3/impl/trunk/group-view-impl/src/main/java/org/cytoscape/group/view/internal/GroupViewCollapseHandler.java
===================================================================
--- 
core3/impl/trunk/group-view-impl/src/main/java/org/cytoscape/group/view/internal/GroupViewCollapseHandler.java
      2012-04-13 18:41:04 UTC (rev 28824)
+++ 
core3/impl/trunk/group-view-impl/src/main/java/org/cytoscape/group/view/internal/GroupViewCollapseHandler.java
      2012-04-13 18:56:29 UTC (rev 28825)
@@ -150,6 +150,7 @@
                        Dimension d = getLocation(rootNetwork, 
group.getGroupNode());
                        // Move it.
                        moveNode(view, group.getGroupNode(), d);
+                       View<CyNode> nView = 
view.getNodeView(group.getGroupNode());
 
                        if (cyGroupSettings.getUseNestedNetworks(group)) {
                                // Now, if we're displaying the nested network, 
create it....
@@ -165,8 +166,14 @@
                                viewStyle.apply(nnView);
                                nnView.updateView();
                                */
+
+                               // Allow the nested network image to be 
displayed
+                               
nView.clearValueLock(BasicVisualLexicon.NODE_NESTED_NETWORK_IMAGE_VISIBLE);
+                       } else {
+                               // Make sure the nested network image is not 
displayed
+                               
nView.setLockedValue(BasicVisualLexicon.NODE_NESTED_NETWORK_IMAGE_VISIBLE, 
Boolean.FALSE);
                        }
-
+                       
                        // Handle opacity
                        double opacity = 
cyGroupSettings.getGroupNodeOpacity(group);
 
@@ -178,7 +185,9 @@
                        if (!cyGroupSettings.getHideGroupNode(group)) {
                        }
                }
+               
                viewStyle.apply(view);
+               view.updateView();
        }
 
        private Dimension calculateCenter(CyNetworkView view, List<CyNode> 
nodeList) {

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