]> gerrit.simantics Code Review - simantics/district.git/blobdiff - org.simantics.district.network/src/org/simantics/district/network/profile/DNElementColorStyle.java
DynamicVisualisations enhancements & deprecate old profiles & settings
[simantics/district.git] / org.simantics.district.network / src / org / simantics / district / network / profile / DNElementColorStyle.java
index fe0a1fe7f2ebce8bbbfdec501fce0a0032b6e544..7ebff91e5874ba520889f0cbb1106ea6779d8ce7 100644 (file)
@@ -3,7 +3,6 @@ package org.simantics.district.network.profile;
 import java.awt.Color;
 import java.util.Map;
 
-import org.simantics.Simantics;
 import org.simantics.databoard.Bindings;
 import org.simantics.db.ReadGraph;
 import org.simantics.db.Resource;
@@ -40,7 +39,6 @@ public class DNElementColorStyle extends ThrottledStyleBase<Color> {
         DynamicVisualisation dv = graph.syncRequest(new RuntimeDynamicVisualisationsRequest(runtimeDiagram),
                 TransientCacheAsyncListener.instance());
 
-        DiagramSettings ds = graph.syncRequest(new DiagramSettingsRequest(runtimeDiagram), TransientCacheAsyncListener.instance());
         // Prevent PendingVariableExceptions from coming through
         boolean wasSynchronous = graph.setSynchronous(true);
         try {
@@ -91,20 +89,6 @@ public class DNElementColorStyle extends ThrottledStyleBase<Color> {
                     }
                 }
             }
-                   
-            // the old implementation here
-                       if (ds.elementColoringFunction.isPresent()) {
-                               if (DEBUG)
-                                       System.out.print("elementColoringFunction: " + ds.elementColoringFunction + "(" + groupItem + "): ");
-                               Double t = Simantics.applySCLRead(graph, ds.elementColoringFunction.get(), groupItem);
-                               if (DEBUG)
-                                       System.out.print(t);
-                               if (t != null) {
-                                       Color result = ds.coloringGradient.get(t);
-                                       //System.out.println("color(" + t + "): " + result);
-                                       return result;
-                               }
-                       }
                }
                finally {
                        graph.setSynchronous(wasSynchronous);