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);
+// }
+// }
}
}