]> gerrit.simantics Code Review - simantics/district.git/blobdiff - org.simantics.district.network/src/org/simantics/district/network/profile/VertexStyle.java
Added Edge.ThicknessProperty for generic edge-thickness styling
[simantics/district.git] / org.simantics.district.network / src / org / simantics / district / network / profile / VertexStyle.java
similarity index 52%
rename from org.simantics.district.network/src/org/simantics/district/network/profile/EdgeNodeStyle.java
rename to org.simantics.district.network/src/org/simantics/district/network/profile/VertexStyle.java
index 9d96f48c4146bf49a85ecb8746dce3812282382d..6fc5dfccf7a46c483d46e8d42a5a43611c404a7e 100644 (file)
@@ -10,30 +10,21 @@ import org.simantics.scenegraph.g2d.nodes.ConnectionNode;
 import org.simantics.scenegraph.profile.EvaluationContext;
 import org.simantics.scenegraph.profile.common.ProfileVariables;
 
-public class EdgeNodeStyle extends StyleBase<Double> {
+public class VertexStyle extends StyleBase<Double> {
 
-    public EdgeNodeStyle() {
-        System.out.println("EdgeNodeStyle init");
-    }
-    
     @Override
     public Double calculateStyle(ReadGraph graph, Resource runtimeDiagram, Resource entry, Resource groupItem) throws DatabaseException {
-        DistrictNetworkResource DN = DistrictNetworkResource.getInstance(graph);
-        Double diameter = graph.getPossibleRelatedValue(groupItem, DN.Edge_HasDiameter);
-        if (diameter != null) {
-            return diameter;
-        }
-        return super.calculateStyle(graph, runtimeDiagram, entry, groupItem);
+        return 1.0;
     }
-    
+
     @Override
     public void applyStyleForNode(EvaluationContext observer, INode node, Double result) {
-        if (result != null) {
-            ConnectionNode n = (ConnectionNode) node;
-            for (INode nn : n.getNodes()) {
-                ProfileVariables.claimNodeProperty(nn, "stroke", result, observer);
-            }
-        }
+//        if (result != null) {
+//            ConnectionNode n = (ConnectionNode) node;
+//            for (INode nn : n.getNodes()) {
+//                ProfileVariables.claimNodeProperty(nn, "stroke", result, observer);
+//            }
+//        }
     }
     
 }