/// <summary> Adds a ConnectorLine into the container /// </summary> /// <param name="p">the primitive which should become added /// /// </param> public virtual void addPrimitive(ConnectorLine c) { lines.add(c); Graphics2D gr = (Graphics2D)Graphics; if (gr == null) { return; } drawPrimitive(c, gr); }
public virtual void paint(System.Drawing.Graphics g) { Graphics2D gr = (Graphics2D)g; gr.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); gr.setFont(font); Iterator itshapes = shapes.iterator(); Iterator itarrows = lines.iterator(); while (itshapes.hasNext()) { Shape s = (Shape)itshapes.next(); drawPrimitive(s, gr); } while (itarrows.hasNext()) { ConnectorLine l = (ConnectorLine)itarrows.next(); drawPrimitive(l, gr); } }
protected internal virtual void createPrimitives(ViewGraphNode root) { LinkedList queue = new LinkedList(); queue.add(root); while (!queue.isEmpty()) { ViewGraphNode act = (ViewGraphNode)queue.remove(0); Shape s = null; if (act.Shape == null) { s = makeShapeFromNode(act, queue); } else { s = act.Shape; } if (act.ParentsChecked) { continue; } act.ParentsChecked = true; for (Iterator it = act.Parents.iterator(); it.hasNext();) { ViewGraphNode n = (ViewGraphNode)it.next(); Shape s1 = n.Shape; if (s1 == null) { s1 = makeShapeFromNode(n, queue); } ConnectorLine line = new ConnectorLine(s1, s); line.Color = System.Drawing.Color.Blue; if (n.ReteNode is BaseJoin) { line.Color = System.Drawing.Color.Red; } addPrimitive(line); } } }
protected internal virtual void createPrimitives(ViewGraphNode root) { LinkedList queue = new LinkedList(); queue.add(root); while (!queue.isEmpty()) { ViewGraphNode act = (ViewGraphNode) queue.remove(0); Shape s = null; if (act.Shape == null) { s = makeShapeFromNode(act, queue); } else { s = act.Shape; } if (act.ParentsChecked) continue; act.ParentsChecked = true; for (Iterator it = act.Parents.iterator(); it.hasNext(); ) { ViewGraphNode n = (ViewGraphNode) it.next(); Shape s1 = n.Shape; if (s1 == null) s1 = makeShapeFromNode(n, queue); ConnectorLine line = new ConnectorLine(s1, s); line.Color = System.Drawing.Color.Blue; if (n.ReteNode is BaseJoin) line.Color = System.Drawing.Color.Red; addPrimitive(line); } } }
protected internal virtual void addPrimitive(ConnectorLine p) { container.addPrimitive(p); radar.addPrimitive(p); }
/// <summary> Adds a ConnectorLine into the container /// </summary> /// <param name="p">the primitive which should become added /// /// </param> public virtual void addPrimitive(ConnectorLine c) { lines.add(c); Graphics2D gr = (Graphics2D) Graphics; if (gr == null) return ; drawPrimitive(c, gr); }