]> gerrit.simantics Code Review - simantics/district.git/blobdiff - org.simantics.district.network/src/org/simantics/district/network/profile/DNElementColorStyle.java
First version of throttled profile results - configure via proeprty view
[simantics/district.git] / org.simantics.district.network / src / org / simantics / district / network / profile / DNElementColorStyle.java
index 682c91fb1d00782b53ddae99bba9e875b1d14bcf..b74a66198366ccff9b2b24f79c8909c549eb017c 100644 (file)
@@ -17,12 +17,12 @@ import org.simantics.scenegraph.profile.common.ProfileVariables;
  * @author Tuukka Lehtonen
  * @since 1.35.0
  */
-public class DNElementColorStyle extends StyleBase<Color> {
+public class DNElementColorStyle extends ThrottledStyleBase<Color> {
 
        private static final boolean DEBUG = false;
 
        @Override
-       public Color calculateStyle(ReadGraph graph, Resource runtimeDiagram, Resource entry, Resource groupItem) throws DatabaseException {
+       public Color calculateThrottledStyle(ReadGraph graph, Resource runtimeDiagram, Resource entry, Resource groupItem) throws DatabaseException {
                DiagramSettings ds = graph.syncRequest(new DiagramSettingsRequest(runtimeDiagram), TransientCacheAsyncListener.instance());
                if (ds.elementColoringFunction.isPresent()) {
                        if (DEBUG)
@@ -40,7 +40,7 @@ public class DNElementColorStyle extends StyleBase<Color> {
        }
 
        @Override
-       public void applyStyleForNode(EvaluationContext observer, INode node, Color color) {
+       public void applyThrottledStyleForNode(EvaluationContext observer, INode node, Color color) {
                SingleElementNode n = (SingleElementNode) node;
                for (INode nn : n.getNodes())
                        ProfileVariables.claimNodeProperty(nn, "dynamicColor", color, observer);