Author: mes
Date: 2010-08-10 13:03:29 -0700 (Tue, 10 Aug 2010)
New Revision: 21287
Modified:
core3/ding-presentation-impl/trunk/src/main/java/org/cytoscape/ding/impl/DGraphView.java
core3/ding-presentation-impl/trunk/src/main/java/org/cytoscape/ding/impl/DingNavigationRenderingEngineFactory.java
core3/ding-presentation-impl/trunk/src/main/java/org/cytoscape/ding/impl/DingRenderingEngineFactory.java
core3/ding-presentation-impl/trunk/src/main/resources/META-INF/spring/bundle-context-osgi.xml
core3/ding-presentation-impl/trunk/src/main/resources/META-INF/spring/bundle-context.xml
Log:
changed how CyDataTables are managed for networks
Modified:
core3/ding-presentation-impl/trunk/src/main/java/org/cytoscape/ding/impl/DGraphView.java
===================================================================
---
core3/ding-presentation-impl/trunk/src/main/java/org/cytoscape/ding/impl/DGraphView.java
2010-08-10 20:02:33 UTC (rev 21286)
+++
core3/ding-presentation-impl/trunk/src/main/java/org/cytoscape/ding/impl/DGraphView.java
2010-08-10 20:03:29 UTC (rev 21287)
@@ -80,6 +80,7 @@
import org.cytoscape.model.CyEdge;
import org.cytoscape.model.CyNetwork;
import org.cytoscape.model.CyNode;
+import org.cytoscape.model.CyTableManager;
import org.cytoscape.model.subnetwork.CyRootNetworkFactory;
import org.cytoscape.model.subnetwork.CySubNetwork;
import org.cytoscape.spacial.SpacialEntry2DEnumerator;
@@ -340,6 +341,7 @@
TunableInterceptor interceptor;
TaskManager manager;
+ CyTableManager tableMgr;
// Will be injected.
private VisualLexicon dingLexicon;
@@ -357,7 +359,7 @@
Map<NodeViewTaskFactory, Map> nodeViewTFs,
Map<EdgeViewTaskFactory, Map> edgeViewTFs,
Map<NetworkViewTaskFactory, Map> emptySpaceTFs,
- TunableInterceptor interceptor, TaskManager manager) {
+ TunableInterceptor interceptor, TaskManager manager,
CyTableManager tableMgr) {
m_perspective = view.getModel();
cyNetworkView = view;
rootLexicon = vpc;
@@ -369,14 +371,17 @@
this.interceptor = interceptor;
this.manager = manager;
+ this.tableMgr = tableMgr;
CyDataTable nodeCAM = dataFactory.createTable("node view",
false);
nodeCAM.createColumn("hidden", Boolean.class, false);
- m_perspective.getNodeCyDataTables().put("VIEW", nodeCAM);
+ tableMgr.getTableMap("NODE", m_perspective).put("VIEW",
nodeCAM);
+ //m_perspective.getNodeCyDataTables().put("VIEW", nodeCAM);
CyDataTable edgeCAM = dataFactory.createTable("edge view",
false);
edgeCAM.createColumn("hidden", Boolean.class, false);
- m_perspective.getEdgeCyDataTables().put("VIEW", edgeCAM);
+ tableMgr.getTableMap("EDGE", m_perspective).put("VIEW",
edgeCAM);
+ //m_perspective.getEdgeCyDataTables().put("VIEW", edgeCAM);
// creating empty subnetworks
m_drawPersp =
cyRoot.convert(m_perspective).addMetaNode().getSubNetwork();
Modified:
core3/ding-presentation-impl/trunk/src/main/java/org/cytoscape/ding/impl/DingNavigationRenderingEngineFactory.java
===================================================================
---
core3/ding-presentation-impl/trunk/src/main/java/org/cytoscape/ding/impl/DingNavigationRenderingEngineFactory.java
2010-08-10 20:02:33 UTC (rev 21286)
+++
core3/ding-presentation-impl/trunk/src/main/java/org/cytoscape/ding/impl/DingNavigationRenderingEngineFactory.java
2010-08-10 20:03:29 UTC (rev 21287)
@@ -9,6 +9,7 @@
import org.cytoscape.model.CyDataTableFactory;
import org.cytoscape.model.CyNetwork;
+import org.cytoscape.model.CyTableManager;
import org.cytoscape.model.subnetwork.CyRootNetworkFactory;
import org.cytoscape.service.util.CyServiceRegistrar;
import org.cytoscape.spacial.SpacialIndex2DFactory;
@@ -52,13 +53,14 @@
private TunableInterceptor ti;
private TaskManager tm;
+ private CyTableManager tableMgr;
public DingNavigationRenderingEngineFactory(
CyDataTableFactory dataTableFactory,
CyRootNetworkFactory rootNetworkFactory, UndoSupport
undo,
SpacialIndex2DFactory spacialFactory, RootVisualLexicon
vpc,
VisualLexicon dingLexicon, TunableInterceptor ti,
TaskManager tm,
- CyServiceRegistrar registrar) {
+ CyServiceRegistrar registrar, CyTableManager tableMgr) {
this.dataTableFactory = dataTableFactory;
this.rootNetworkFactory = rootNetworkFactory;
this.spacialFactory = spacialFactory;
@@ -68,6 +70,7 @@
this.ti = ti;
this.tm = tm;
this.registrar = registrar;
+ this.tableMgr = tableMgr;
viewMap = new HashMap<CyNetworkView, DGraphView>();
nodeViewTFs = new HashMap<NodeViewTaskFactory, Map>();
@@ -91,7 +94,7 @@
final DGraphView dgv = new DGraphView((CyNetworkView) view,
dataTableFactory, rootNetworkFactory, undo,
spacialFactory,
rootLexicon, dingLexicon, nodeViewTFs,
edgeViewTFs,
- emptySpaceTFs, ti, tm);
+ emptySpaceTFs, ti, tm, tableMgr);
JPanel target = new JPanel();
BirdsEyeView bev = new BirdsEyeView((Component)
visualizationContainer,
Modified:
core3/ding-presentation-impl/trunk/src/main/java/org/cytoscape/ding/impl/DingRenderingEngineFactory.java
===================================================================
---
core3/ding-presentation-impl/trunk/src/main/java/org/cytoscape/ding/impl/DingRenderingEngineFactory.java
2010-08-10 20:02:33 UTC (rev 21286)
+++
core3/ding-presentation-impl/trunk/src/main/java/org/cytoscape/ding/impl/DingRenderingEngineFactory.java
2010-08-10 20:03:29 UTC (rev 21287)
@@ -11,6 +11,7 @@
import org.cytoscape.model.CyDataTableFactory;
import org.cytoscape.model.CyNetwork;
+import org.cytoscape.model.CyTableManager;
import org.cytoscape.model.subnetwork.CyRootNetworkFactory;
import org.cytoscape.service.util.CyServiceRegistrar;
import org.cytoscape.spacial.SpacialIndex2DFactory;
@@ -47,13 +48,14 @@
private TunableInterceptor ti;
private TaskManager tm;
+ private CyTableManager tableMgr;
public DingRenderingEngineFactory(CyDataTableFactory dataTableFactory,
CyRootNetworkFactory rootNetworkFactory,
UndoSupport
undo, SpacialIndex2DFactory spacialFactory,
RootVisualLexicon vpc, VisualLexicon dingLexicon,
TunableInterceptor ti, TaskManager tm,
-
CyServiceRegistrar registrar) {
+
CyServiceRegistrar registrar, CyTableManager tableMgr) {
this.dataTableFactory = dataTableFactory;
this.rootNetworkFactory = rootNetworkFactory;
this.spacialFactory = spacialFactory;
@@ -63,6 +65,7 @@
this.ti = ti;
this.tm = tm;
this.registrar = registrar;
+ this.tableMgr = tableMgr;
viewMap = new HashMap<CyNetworkView, DGraphView>();
nodeViewTFs = new HashMap<NodeViewTaskFactory,Map>();
@@ -86,7 +89,7 @@
if ( presentationContainer instanceof JComponent ) {
dgv = new DGraphView(targetView,
dataTableFactory,rootNetworkFactory,undo,spacialFactory,
- rootLexicon,
dingLexicon,nodeViewTFs,edgeViewTFs,emptySpaceTFs,ti,tm);
+ rootLexicon,
dingLexicon,nodeViewTFs,edgeViewTFs,emptySpaceTFs,ti,tm,tableMgr);
viewMap.put(targetView, dgv);
targetView.addViewChangeListener(dgv);
Modified:
core3/ding-presentation-impl/trunk/src/main/resources/META-INF/spring/bundle-context-osgi.xml
===================================================================
---
core3/ding-presentation-impl/trunk/src/main/resources/META-INF/spring/bundle-context-osgi.xml
2010-08-10 20:02:33 UTC (rev 21286)
+++
core3/ding-presentation-impl/trunk/src/main/resources/META-INF/spring/bundle-context-osgi.xml
2010-08-10 20:03:29 UTC (rev 21287)
@@ -35,6 +35,10 @@
interface="org.cytoscape.service.util.CyServiceRegistrar">
</osgi:reference>
+ <osgi:reference id="cyTableManagerServiceRef"
+ interface="org.cytoscape.model.CyTableManager">
+ </osgi:reference>
+
<!-- Individual Service -->
<osgi:service id="dingPresentationFactoryService"
ref="dingPresentationFactory">
<osgi:interfaces>
Modified:
core3/ding-presentation-impl/trunk/src/main/resources/META-INF/spring/bundle-context.xml
===================================================================
---
core3/ding-presentation-impl/trunk/src/main/resources/META-INF/spring/bundle-context.xml
2010-08-10 20:02:33 UTC (rev 21286)
+++
core3/ding-presentation-impl/trunk/src/main/resources/META-INF/spring/bundle-context.xml
2010-08-10 20:03:29 UTC (rev 21287)
@@ -28,6 +28,7 @@
<constructor-arg ref="tunableInterceptorServiceRef" />
<constructor-arg ref="taskManagerServiceRef" />
<constructor-arg ref="cyServiceRegistrarRef" />
+ <constructor-arg ref="cyTableManagerServiceRef" />
</bean>
<bean id="dingNavigationPresentationFactory"
@@ -41,5 +42,6 @@
<constructor-arg ref="tunableInterceptorServiceRef" />
<constructor-arg ref="taskManagerServiceRef" />
<constructor-arg ref="cyServiceRegistrarRef" />
+ <constructor-arg ref="cyTableManagerServiceRef" />
</bean>
</beans>
--
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.