Author: kono
Date: 2010-01-14 18:24:27 -0800 (Thu, 14 Jan 2010)
New Revision: 18921

Modified:
   cytoscape/trunk/src/cytoscape/visual/ui/VizMapperMainPanel.java
Log:
Duplicate property problem fixed.  Property sheet will be updated after GUI 
gets the CYTOSCAPE_INITIALIZED signal.

Modified: cytoscape/trunk/src/cytoscape/visual/ui/VizMapperMainPanel.java
===================================================================
--- cytoscape/trunk/src/cytoscape/visual/ui/VizMapperMainPanel.java     
2010-01-15 00:39:23 UTC (rev 18920)
+++ cytoscape/trunk/src/cytoscape/visual/ui/VizMapperMainPanel.java     
2010-01-15 02:24:27 UTC (rev 18921)
@@ -280,8 +280,6 @@
                
Cytoscape.getNodeAttributes().getMultiHashMap().addDataListener(new 
MultiHashMapListenerAdapter(this, Cytoscape.getNodeAttributes(), 
nodeAttrEditor, nodeNumericalAttrEditor));
                
Cytoscape.getEdgeAttributes().getMultiHashMap().addDataListener(new 
MultiHashMapListenerAdapter(this, Cytoscape.getEdgeAttributes(), 
edgeAttrEditor, edgeNumericalAttrEditor));
                
Cytoscape.getNetworkAttributes().getMultiHashMap().addDataListener(new 
MultiHashMapListenerAdapter(this, Cytoscape.getNetworkAttributes(), null, 
null));
-
-               
updateDependencyStates(vmm.getVisualStyle().getNodeAppearanceCalculator().getDependency());
        }
 
        /*
@@ -339,6 +337,7 @@
                setDefaultPanel(defaultImageManager.get(targetName));
        }
 
+       
        private void updateDependencyStates(VisualPropertyDependency deps) {
                System.out.println("update: props");
                for (Property tmpprop : 
visualPropertySheetPanel.getProperties()) {
@@ -362,9 +361,9 @@
                                return;
 
                VisualPropertyType type = (VisualPropertyType)hidden; 
-               System.out.print("syncing type: " + type);
+               System.out.print("!!!!!!!! syncing type: " + type);
                if ( type.getVisualProperty().constrained(deps) ) {
-                       System.out.println("      HIDE");
+                       System.out.println("      HIDE: " + 
prop.getDisplayName());
                        hiddenProperties.add( prop );
                        visualPropertySheetPanel.removeProperty(prop);
                } else {
@@ -1969,6 +1968,10 @@
                        vmm.setVisualStyle(vmName);
                        setPropertyTable();
                        visualPropertySheetPanel.setSorting(true);
+                       
+                       // Update dependency states
+                       
updateDependencyStates(vmm.getVisualStyle().getNodeAppearanceCalculator().getDependency());
+                       
updateDependencyStates(vmm.getVisualStyle().getEdgeAppearanceCalculator().getDependency());
                        return;
                } else if (e.getPropertyName().equals(Cytoscape.SESSION_LOADED)
                           || 
e.getPropertyName().equals(Cytoscape.VIZMAP_LOADED)) {

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