Author: kono
Date: 2011-07-27 11:09:55 -0700 (Wed, 27 Jul 2011)
New Revision: 26290
Modified:
core3/model-impl/trunk/impl/src/main/java/org/cytoscape/model/internal/CyTableManagerImpl.java
Log:
refs #96 TableAddedEvent will be fired when new table is added to the manager.
Modified:
core3/model-impl/trunk/impl/src/main/java/org/cytoscape/model/internal/CyTableManagerImpl.java
===================================================================
---
core3/model-impl/trunk/impl/src/main/java/org/cytoscape/model/internal/CyTableManagerImpl.java
2011-07-27 18:02:59 UTC (rev 26289)
+++
core3/model-impl/trunk/impl/src/main/java/org/cytoscape/model/internal/CyTableManagerImpl.java
2011-07-27 18:09:55 UTC (rev 26290)
@@ -44,6 +44,7 @@
import org.cytoscape.model.events.NetworkAboutToBeDestroyedEvent;
import org.cytoscape.model.events.NetworkAboutToBeDestroyedListener;
import org.cytoscape.model.events.TableAboutToBeDeletedEvent;
+import org.cytoscape.model.events.TableAddedEvent;
import org.cytoscape.model.events.TableDeletedEvent;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -108,12 +109,16 @@
tmap.put(network, tm);
}
- public synchronized void addTable(final CyTable t) {
- if (t == null)
- throw new NullPointerException("added table is null");
- tables.put(t.getSUID(), t);
- }
+ public synchronized void addTable(final CyTable t) {
+ if (t == null)
+ throw new NullPointerException("added table is null");
+
+ tables.put(t.getSUID(), t);
+ eventHelper.fireEvent(new TableAddedEvent(this, t));
+ }
+
+
@Override
public synchronized Set<CyTableMetadata> getAllTables(final boolean
includePrivate) {
Set<CyTableMetadata> res = new HashSet<CyTableMetadata>();
--
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.