I can't quite figure out VisualPropertyDependency usage in Cy3. I checked the code snippets and code examples, but none show dependencies.
I have the Cy2 dependency:
visualStyle.getDependency().set(VisualPropertyDependency.Definition.NODE_SIZE_LOCKED, false);
In Cy3, I've found bits and pieces but can't figure out how to put it together:
final Set<VisualProperty<Double>> nodeSizeVisualProperties = new HashSet<VisualProperty<Double>>();
nodeSizeVisualProperties.add(BasicVisualLexicon.NODE_WIDTH);
nodeSizeVisualProperties.add(BasicVisualLexicon.NODE_HEIGHT);
VisualPropertyDependency vpd = new VisualPropertyDependency(??,
??,
nodeSizeVisualProperties,
??);
vpd.setDependency (false);
visualStyle.addVisualPropertyDependency (vpd);
Wow, I would not have guessed that! So you iterate thru all the existing VisualPropertyDependencys of a visual style and if you find the right dependency, you set its value. So how do we know that the visual style already has that VisualPropertyDependency? Is it ever the case that it doesn't and if so, what do you do then?
--
You received this message because you are subscribed to the Google Groups "cytoscape-helpdesk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cytoscape-helpd...@googlegroups.com.
To post to this group, send email to cytoscape...@googlegroups.com.
Visit this group at http://groups.google.com/group/cytoscape-helpdesk.
For more options, visit https://groups.google.com/groups/opt_out.