X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.graphviz%2Fscl%2FVisualization%2FGraphviz%2FEdge.scl;h=dc526674fd9d9fb348aeaf89094d15defc2fec2e;hp=f8a0316e01b76156ec563f74a7ccc93e01e6dcb6;hb=0ae2b770234dfc3cbb18bd38f324125cf0faca07;hpb=24e2b34260f219f0d1644ca7a138894980e25b14 diff --git a/bundles/org.simantics.graphviz/scl/Visualization/Graphviz/Edge.scl b/bundles/org.simantics.graphviz/scl/Visualization/Graphviz/Edge.scl index f8a0316e0..dc526674f 100644 --- a/bundles/org.simantics.graphviz/scl/Visualization/Graphviz/Edge.scl +++ b/bundles/org.simantics.graphviz/scl/Visualization/Graphviz/Edge.scl @@ -1,20 +1,20 @@ -import "Visualization/Graphviz/AbstractTypes" -import "Visualization/Graphviz/Property" - -importJava "org.simantics.graphviz.Edge" where - data Edge - @JavaName "" - newPrimitiveEdge :: Identifiable -> Identifiable -> Edge - setLabel :: Edge -> String -> () - @JavaName set - setGenericProperty :: Edge -> String -> String -> () - -applyEdgeProperty :: Edge -> Property -> () -applyEdgeProperty graph (Label str) = setLabel graph str -applyEdgeProperty graph (GenericProperty property str) = setGenericProperty graph property str - -newEdge :: Identifiable a => Identifiable b => a -> b -> [Property] -> Edge -newEdge node1 node2 properties = edge - where - edge = newPrimitiveEdge (identifiable node1) (identifiable node2) +import "Visualization/Graphviz/AbstractTypes" +import "Visualization/Graphviz/Property" + +importJava "org.simantics.graphviz.Edge" where + data Edge + @JavaName "" + newPrimitiveEdge :: Identifiable -> Identifiable -> Edge + setLabel :: Edge -> String -> () + @JavaName set + setGenericProperty :: Edge -> String -> String -> () + +applyEdgeProperty :: Edge -> Property -> () +applyEdgeProperty graph (Label str) = setLabel graph str +applyEdgeProperty graph (GenericProperty property str) = setGenericProperty graph property str + +newEdge :: Identifiable a => Identifiable b => a -> b -> [Property] -> Edge +newEdge node1 node2 properties = edge + where + edge = newPrimitiveEdge (identifiable node1) (identifiable node2) for properties (applyEdgeProperty edge) \ No newline at end of file