Author: neildhruva
Date: 2012-06-10 13:11:20 -0700 (Sun, 10 Jun 2012)
New Revision: 29518
Modified:
csplugins/trunk/soc/neildhruva/PrintTable/src/main/java/org/cytoscape/sample/internal/MyTableModel.java
Log:
Added a method to return a vector of names of all the columns that can be
plotted on a graph.
Modified:
csplugins/trunk/soc/neildhruva/PrintTable/src/main/java/org/cytoscape/sample/internal/MyTableModel.java
===================================================================
---
csplugins/trunk/soc/neildhruva/PrintTable/src/main/java/org/cytoscape/sample/internal/MyTableModel.java
2012-06-09 00:40:52 UTC (rev 29517)
+++
csplugins/trunk/soc/neildhruva/PrintTable/src/main/java/org/cytoscape/sample/internal/MyTableModel.java
2012-06-10 20:11:20 UTC (rev 29518)
@@ -2,6 +2,7 @@
import java.util.Collection;
import java.util.Map;
+import java.util.Vector;
import javax.swing.table.AbstractTableModel;
@@ -87,10 +88,20 @@
public boolean isCellEditable(int rowIndex, int columnIndex) {
return false;
}
- /*
- @Override
- public void fireTableDataChanged(){
-
+
+ /**
+ * Returns a vector of names of columns from the <code>CyTable</code>
that are of the type Integer, Long or Double.
+ *
+ * @return Vector containing names of columns that are of the type
Integer, Long or Double.
+ */
+ public Vector<String> getPlottableColumns() {
+ Vector<String> v = new Vector<String>();
+ for(int columnIndex=0; columnIndex < columnLength;
columnIndex++){
+ if(getColumnClass(columnIndex).equals(Integer.class) ||
getColumnClass(columnIndex).equals(Double.class) ||
getColumnClass(columnIndex).equals(Long.class)) {
+ v.add(columnNames[columnIndex]);
+ }
+ }
+ return v;
}
-*/
+
}
--
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.