Author: paperwing
Date: 2012-02-07 15:43:27 -0800 (Tue, 07 Feb 2012)
New Revision: 28210

Modified:
   
csplugins/trunk/toronto/yuedong/paperwing-impl/src/main/java/org/cytoscape/paperwing/internal/MainGraphicsHandler.java
   
csplugins/trunk/toronto/yuedong/paperwing-impl/src/main/java/org/cytoscape/paperwing/internal/WindBirdsEyeRenderingEngine.java
   
csplugins/trunk/toronto/yuedong/paperwing-impl/src/main/java/org/cytoscape/paperwing/internal/WindMainRenderingEngine.java
Log:
Fixed TextRenderer-related crashing while opening the VizMapper visual style 
editor dialog

Modified: 
csplugins/trunk/toronto/yuedong/paperwing-impl/src/main/java/org/cytoscape/paperwing/internal/MainGraphicsHandler.java
===================================================================
--- 
csplugins/trunk/toronto/yuedong/paperwing-impl/src/main/java/org/cytoscape/paperwing/internal/MainGraphicsHandler.java
      2012-02-07 22:54:50 UTC (rev 28209)
+++ 
csplugins/trunk/toronto/yuedong/paperwing-impl/src/main/java/org/cytoscape/paperwing/internal/MainGraphicsHandler.java
      2012-02-07 23:43:27 UTC (rev 28210)
@@ -53,8 +53,6 @@
                renderProcedures.add(new RenderNodesProcedure());
                renderProcedures.add(new RenderArcEdgesProcedure());
                renderProcedures.add(new RenderSelectionBoxProcedure());
-               
-               renderProcedures.add(new RenderNodeLabelsProcedure());
        }
        
        @Override
@@ -64,8 +62,14 @@
 
        @Override
        public void drawScene(GraphicsData graphicsData) {
-               // TODO Auto-generated method stub
                
+               // TODO: Seems we had to move this to the draw method to 
prevent a crash involving a native library
+               // and the VizMapper preview. The cause was likely due to the 
TextRenderer class being initialized
+               // too early.
+               if (graphicsData.getFramesElapsed() == 1) {
+                       renderProcedures.add(new RenderNodeLabelsProcedure());
+               }
+               
                // Control light positioning
                float[] lightPosition = { -4.0f, 4.0f, 6.0f, 1.0f };
                

Modified: 
csplugins/trunk/toronto/yuedong/paperwing-impl/src/main/java/org/cytoscape/paperwing/internal/WindBirdsEyeRenderingEngine.java
===================================================================
--- 
csplugins/trunk/toronto/yuedong/paperwing-impl/src/main/java/org/cytoscape/paperwing/internal/WindBirdsEyeRenderingEngine.java
      2012-02-07 22:54:50 UTC (rev 28209)
+++ 
csplugins/trunk/toronto/yuedong/paperwing-impl/src/main/java/org/cytoscape/paperwing/internal/WindBirdsEyeRenderingEngine.java
      2012-02-07 23:43:27 UTC (rev 28210)
@@ -44,7 +44,7 @@
                        VisualLexicon visualLexicon) {
                super(container, viewModel, visualLexicon);
                
-//             System.out.println("wind bird's eye created for network: " + 
viewModel);
+               System.out.println("Bird's eye rendering engine created: " + 
this);
        }
 
        @Override

Modified: 
csplugins/trunk/toronto/yuedong/paperwing-impl/src/main/java/org/cytoscape/paperwing/internal/WindMainRenderingEngine.java
===================================================================
--- 
csplugins/trunk/toronto/yuedong/paperwing-impl/src/main/java/org/cytoscape/paperwing/internal/WindMainRenderingEngine.java
  2012-02-07 22:54:50 UTC (rev 28209)
+++ 
csplugins/trunk/toronto/yuedong/paperwing-impl/src/main/java/org/cytoscape/paperwing/internal/WindMainRenderingEngine.java
  2012-02-07 23:43:27 UTC (rev 28210)
@@ -41,6 +41,8 @@
        public WindMainRenderingEngine(Object container, View<CyNetwork> 
viewModel,
                        VisualLexicon visualLexicon) {
                super(container, viewModel, visualLexicon);
+               
+               System.out.println("Main rendering engine created: " + this);
        }
 
        @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.

Reply via email to