Author: pwang
Date: 2011-04-11 15:43:27 -0700 (Mon, 11 Apr 2011)
New Revision: 24743
Modified:
cytoscape/trunk/coreplugins/filters/src/main/java/cytoscape/filters/view/FilterMainPanel.java
Log:
Fixed bug#0002506: ANDing or ORing Filters does't work in 2.8.x
Modified:
cytoscape/trunk/coreplugins/filters/src/main/java/cytoscape/filters/view/FilterMainPanel.java
===================================================================
---
cytoscape/trunk/coreplugins/filters/src/main/java/cytoscape/filters/view/FilterMainPanel.java
2011-04-11 22:28:50 UTC (rev 24742)
+++
cytoscape/trunk/coreplugins/filters/src/main/java/cytoscape/filters/view/FilterMainPanel.java
2011-04-11 22:43:27 UTC (rev 24743)
@@ -930,21 +930,21 @@
}
}
- String attributeType =
cmbAttributes.getSelectedItem().toString().substring(0,4);// "node" or "edge"
- String attributeName =
cmbAttributes.getSelectedItem().toString().substring(5);
+ if
(cmbAttributes.getSelectedItem().toString().startsWith("node.")||
+
cmbAttributes.getSelectedItem().toString().startsWith("edge.")){
+ String attributeType =
cmbAttributes.getSelectedItem().toString().substring(0,4);// "node" or "edge"
+ String attributeName =
cmbAttributes.getSelectedItem().toString().substring(5);
-
if(CyAttributesUtils.isNullAttribute(attributeType, attributeName)){
- JOptionPane.showMessageDialog(this,
"All the values for this attribute are NULL!", "Can not create filter",
JOptionPane.ERROR_MESSAGE);
- }
- else {
-
theSettingPanel.addNewWidget((Object)cmbAttributes.getSelectedItem());
- }
+
if(CyAttributesUtils.isNullAttribute(attributeType, attributeName)){
+
JOptionPane.showMessageDialog(this, "All the values for this attribute are
NULL!", "Can not create filter", JOptionPane.ERROR_MESSAGE);
+ return;
+ }
+ }
+
theSettingPanel.addNewWidget((Object)cmbAttributes.getSelectedItem());
}
if (_btn == btnSelectAll){
Cytoscape.getCurrentNetwork().selectAllNodes();
-
//System.out.println("Cytoscape.getCurrentNetwork().getClass() =
"+Cytoscape.getCurrentNetwork().getClass());
-
Cytoscape.getCurrentNetwork().selectAllEdges();
if (Cytoscape.getCurrentNetworkView() != null) {
--
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.