Author: pwang
Date: 2011-02-28 11:19:14 -0800 (Mon, 28 Feb 2011)
New Revision: 24254
Modified:
csplugins/trunk/ucsd/pwang/cy3samples/sample12/src/main/java/org/cytoscape/sample/internal/DeleteAttributeTask.java
Log:
Use Tunable to input column name
Modified:
csplugins/trunk/ucsd/pwang/cy3samples/sample12/src/main/java/org/cytoscape/sample/internal/DeleteAttributeTask.java
===================================================================
---
csplugins/trunk/ucsd/pwang/cy3samples/sample12/src/main/java/org/cytoscape/sample/internal/DeleteAttributeTask.java
2011-02-28 18:28:57 UTC (rev 24253)
+++
csplugins/trunk/ucsd/pwang/cy3samples/sample12/src/main/java/org/cytoscape/sample/internal/DeleteAttributeTask.java
2011-02-28 19:19:14 UTC (rev 24254)
@@ -4,11 +4,15 @@
import org.cytoscape.session.CyApplicationManager;
import org.cytoscape.work.AbstractTask;
import org.cytoscape.work.TaskMonitor;
+import org.cytoscape.work.Tunable;
import org.cytoscape.model.CyTable;
public class DeleteAttributeTask extends AbstractTask {
+ @Tunable(description="Column name to delete")
+ public String columnName = "MyAttributeName";
+
private CyApplicationManager appMgr;
public DeleteAttributeTask(CyApplicationManager appMgr){
this.appMgr = appMgr;
@@ -24,8 +28,6 @@
CyNetwork currNet =
this.appMgr.getCurrentNetworkView().getModel();
CyTable nodeTable = currNet.getDefaultNodeTable();
- String columnName = "MyAttributeName";
-
if(nodeTable.getColumn(columnName)!= null){
nodeTable.deleteColumn(columnName);
System.out.println("Column "+ columnName + " is
deleted");
--
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.