Author: pwang
Date: 2011-09-16 17:39:29 -0700 (Fri, 16 Sep 2011)
New Revision: 26852
Modified:
core3/impl/trunk/swing-application-impl/src/main/java/org/cytoscape/internal/view/NetworkPanel.java
Log:
Fixed bug again: table does not update after selection of nodes/edges
Modified:
core3/impl/trunk/swing-application-impl/src/main/java/org/cytoscape/internal/view/NetworkPanel.java
===================================================================
---
core3/impl/trunk/swing-application-impl/src/main/java/org/cytoscape/internal/view/NetworkPanel.java
2011-09-16 23:22:41 UTC (rev 26851)
+++
core3/impl/trunk/swing-application-impl/src/main/java/org/cytoscape/internal/view/NetworkPanel.java
2011-09-17 00:39:29 UTC (rev 26852)
@@ -94,6 +94,9 @@
import org.cytoscape.work.TaskManager;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import java.util.Collection;
+import org.cytoscape.model.events.RowSetRecord;
+import java.util.Iterator;
public class NetworkPanel extends JPanel implements TreeSelectionListener,
SetCurrentNetworkViewListener, SetCurrentNetworkListener,
@@ -358,12 +361,26 @@
@Override
public void handleEvent(RowsSetEvent e) {
+
+ // if Selection column has been updated, update the UI
+ Collection<RowSetRecord> rowSetRecords =
e.getPayloadCollection();
+ Iterator<RowSetRecord> it = rowSetRecords.iterator();
+ while (it.hasNext()){
+ RowSetRecord record = it.next();
+ if
(record.getColumn().equalsIgnoreCase(CyNetwork.SELECTED)){
+ //Selection column is updated, updated the UI
+ treeTable.getTree().updateUI();
+ break;
+ }
+ }
+
CyNetwork n = nameTables.get( e.getSource() );
+
if ( n == null )
return;
final String title = n.getCyRow().get(CyTableEntry.NAME,
String.class);
- updateTitle(n, title); // this should updated the UI
regardless...
+ updateTitle(n, title); // this should updated the UI
regardless...
}
@Override
--
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.