src/Tools/Graphview/visualizer.scala
changeset 59250 abe4c7cdac0e
parent 59245 be4180f3c236
child 59251 b12d76aa29fb
equal deleted inserted replaced
59249:50a3d663333a 59250:abe4c7cdac0e
   182     }
   182     }
   183   }
   183   }
   184 
   184 
   185   object Drawer
   185   object Drawer
   186   {
   186   {
   187     def apply(g: Graphics2D, node: Graph_Display.Node): Unit =
   187     def apply(gfx: Graphics2D, node: Graph_Display.Node): Unit =
   188       if (!node.is_dummy) Shapes.Growing_Node.paint(g, visualizer, node)
   188       if (!node.is_dummy) Shapes.Growing_Node.paint(gfx, visualizer, node)
   189 
   189 
   190     def apply(g: Graphics2D, edge: Graph_Display.Edge, head: Boolean, dummies: Boolean): Unit =
   190     def apply(gfx: Graphics2D, edge: Graph_Display.Edge, head: Boolean, dummies: Boolean): Unit =
   191       Shapes.Cardinal_Spline_Edge.paint(g, visualizer, edge, head, dummies)
   191       Shapes.Cardinal_Spline_Edge.paint(gfx, visualizer, edge, head, dummies)
   192 
   192 
   193     def paint_all_visible(g: Graphics2D, dummies: Boolean)
   193     def paint_all_visible(gfx: Graphics2D, dummies: Boolean)
   194     {
   194     {
   195       g.setFont(font)
   195       gfx.setFont(font)
   196       g.setRenderingHints(rendering_hints)
   196       gfx.setRenderingHints(rendering_hints)
   197       model.visible_edges_iterator.foreach(apply(g, _, arrow_heads, dummies))
   197       model.visible_edges_iterator.foreach(apply(gfx, _, arrow_heads, dummies))
   198       model.visible_nodes_iterator.foreach(apply(g, _))
   198       model.visible_nodes_iterator.foreach(apply(gfx, _))
   199     }
   199     }
   200 
   200 
   201     def shape(m: Visualizer.Metrics, node: Graph_Display.Node): Shape =
   201     def shape(m: Visualizer.Metrics, node: Graph_Display.Node): Shape =
   202       if (node.is_dummy) Shapes.Dummy.shape(m, visualizer, node)
   202       if (node.is_dummy) Shapes.Dummy.shape(m, visualizer, node)
   203       else Shapes.Growing_Node.shape(m, visualizer, node)
   203       else Shapes.Growing_Node.shape(m, visualizer, node)