-import "Visualization/Graphviz/AbstractTypes"\r
-import "Visualization/Graphviz/Property"\r
-import "JavaBuiltin" as Java\r
-\r
-importJava "org.simantics.graphviz.Node" where\r
- data Node\r
- @JavaName "<init>"\r
- newPrimitiveNode :: IGraph -> <Proc> Node\r
- setLabel :: Node -> String -> <Proc> ()\r
- setShape :: Node -> String -> <Proc> ()\r
- @JavaName set\r
- setGenericProperty :: Node -> String -> String -> <Proc> ()\r
- \r
-instance Identifiable Node where\r
- identifiable = Java.unsafeCoerce\r
-\r
-applyNodeProperty :: Node -> Property -> <Proc> ()\r
-applyNodeProperty graph (Label str) = setLabel graph str\r
-applyNodeProperty graph (Shape str) = setShape graph str\r
-applyNodeProperty graph (GenericProperty property str) = setGenericProperty graph property str\r
- \r
-newNode :: IGraph a => a -> [Property] -> <Proc> Node\r
-newNode graph properties = node\r
- where\r
- node = newPrimitiveNode (iGraph graph)\r
+import "Visualization/Graphviz/AbstractTypes"
+import "Visualization/Graphviz/Property"
+import "JavaBuiltin" as Java
+
+importJava "org.simantics.graphviz.Node" where
+ data Node
+ @JavaName "<init>"
+ newPrimitiveNode :: IGraph -> <Proc> Node
+ setLabel :: Node -> String -> <Proc> ()
+ setShape :: Node -> String -> <Proc> ()
+ @JavaName set
+ setGenericProperty :: Node -> String -> String -> <Proc> ()
+
+instance Identifiable Node where
+ identifiable = Java.unsafeCoerce
+
+applyNodeProperty :: Node -> Property -> <Proc> ()
+applyNodeProperty graph (Label str) = setLabel graph str
+applyNodeProperty graph (Shape str) = setShape graph str
+applyNodeProperty graph (GenericProperty property str) = setGenericProperty graph property str
+
+newNode :: IGraph a => a -> [Property] -> <Proc> Node
+newNode graph properties = node
+ where
+ node = newPrimitiveNode (iGraph graph)
for properties (applyNodeProperty node)
\ No newline at end of file