Author: scooter
Date: 2011-05-18 20:47:57 -0700 (Wed, 18 May 2011)
New Revision: 25476
Modified:
csplugins/trunk/ucsf/scooter/metaNodePlugin2/src/metaNodePlugin2/commands/MetaNodeCommandHandler.java
Log:
Add create command and clean up list tunables a little.
Modified:
csplugins/trunk/ucsf/scooter/metaNodePlugin2/src/metaNodePlugin2/commands/MetaNodeCommandHandler.java
===================================================================
---
csplugins/trunk/ucsf/scooter/metaNodePlugin2/src/metaNodePlugin2/commands/MetaNodeCommandHandler.java
2011-05-19 03:43:24 UTC (rev 25475)
+++
csplugins/trunk/ucsf/scooter/metaNodePlugin2/src/metaNodePlugin2/commands/MetaNodeCommandHandler.java
2011-05-19 03:47:57 UTC (rev 25476)
@@ -257,7 +257,24 @@
// "metanode|network=current|nodelist=selected"),
//
} else if (Command.CREATE.equals(command)) {
+ if (!args.containsKey(METANODE))
+ throw new RuntimeException("metanode: create
requires a 'metanode' argument");
+ String metanodeName = (String)args.get(METANODE);
+ if (metanodeName == null || metanodeName.length() == 0)
+ throw new RuntimeException("metanode: create
requires a 'metanode' argument");
+ Map<String, Object> destargs = new HashMap<String,
Object>();
+ destargs.put("name",metanodeName);
+ if (args.containsKey(NODE))
+ destargs.put(NODE, args.get(NODE));
+ if (args.containsKey(NODELIST))
+ destargs.put(NODELIST, args.get(NODELIST));
+ if (args.containsKey(NETWORK))
+ destargs.put(NETWORK, args.get(NETWORK));
+ destargs.put("viewer", "metaNode");
+
+ return CyCommandManager.execute("group", "create",
destargs);
+
//
// COLLAPSE("collapse",
// "Collapse a metanode",
@@ -557,6 +574,8 @@
//
"usenestednetworks=false|opacity=100|nodechart=none|chartattribute=none"),
//
} else if (Command.SETDEFAULTAPP.equals(command)) {
+ settingsDialog.updateAttributes();
+ settingsDialog.updateNodeChartTypes();
// Handle node chart configuration
if (args.containsKey(NODECHART) &&
!NONE.equalsIgnoreCase(args.get(NODECHART).toString())) {
if (!metanodeViewer.haveNodeCharts())
@@ -698,11 +717,11 @@
AttributeManager.setDefault(type, aggrType);
// Now reflect the change in our tunable
- Tunable t = props.get(tunable);
- setListTunable(t, aggrType.toString());
+ setListTunable(props, tunable, aggrType.toString());
}
- private void setListTunable(Tunable t, String value) {
+ private void setListTunable(MetanodeProperties props, String tunable,
String value) {
+ Tunable t = props.get(tunable);
if (t == null) return;
// Get the list of options
--
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.