Exemplo n.º 1
0
        internal Point GetDGraphOffset(DGraph g)
        {
            if (g == Content)
                return PointZero;

            // This may throw an ArgumentException if the graph has not been loaded into the visual tree.
            GeneralTransform transform = g.TransformToVisual(this);
            
            Point ret = transform.Transform(PointZero);
            return ret;
        }
Exemplo n.º 2
0
        internal DNode(DGraph graph, DrawingNode drawingNode)
            : base(graph)
        {
            this.DrawingNode = drawingNode;
            _OutEdges = new List<DEdge>();
            _InEdges = new List<DEdge>();
            _SelfEdges = new List<DEdge>();
            PortsToDraw = new Set<Port>();

            if (drawingNode.Label != null)
                Label = new DTextLabel(this, drawingNode.Label);
        }
Exemplo n.º 3
0
 private void CreateInitialGraph(DGraph dgraph)
 {
     var nodeA0 = dgraph.AddNode("A0");
     dgraph.AddNode("A1");
     dgraph.AddNode("A2");
     var nodeA3 = dgraph.AddNode("A3");
     nodeA0.Node.Attr.Shape = Microsoft.Msagl.Drawing.Shape.Box;
     nodeA0.Node.Attr.XRadius = 5.0;
     nodeA0.Node.Attr.YRadius = 5.0;
     var edgeA0A1 = dgraph.AddEdgeBetweenNodes(dgraph.NodeMap["A0"], dgraph.NodeMap["A1"]);
     dgraph.AddEdgeBetweenNodes(dgraph.NodeMap["A0"], dgraph.NodeMap["A2"]);
     dgraph.AddEdgeBetweenNodes(dgraph.NodeMap["A2"], dgraph.NodeMap["A1"]);
     dgraph.AddEdgeBetweenNodes(dgraph.NodeMap["A0"], dgraph.NodeMap["A3"]);
     nodeA0.Label = new DTextLabel(nodeA0, new Microsoft.Msagl.Drawing.Label()) { Text = "Node A0" };
     nodeA3.Label = new DTextLabel(nodeA3, new Microsoft.Msagl.Drawing.Label()) { Text = "Node A3" };
     edgeA0A1.Label = new DTextLabel(edgeA0A1, new Microsoft.Msagl.Drawing.Label()) { Text = "Edge A0->A1" };
 }
Exemplo n.º 4
0
 private void CreateInitialGraph(DGraph dgraph)
 {
     var nodeA0 = dgraph.AddNode("A0");
     nodeA0.Node.Attr.Shape = Microsoft.Msagl.Drawing.Shape.Box;
     nodeA0.Node.Attr.XRadius = 5.0;
     nodeA0.Node.Attr.YRadius = 5.0;
     nodeA0.Node.Attr.FillColor = Microsoft.Msagl.Drawing.Color.Green;
     nodeA0.Label = new DTextLabel(nodeA0, new Microsoft.Msagl.Drawing.Label()) { Text = "Node A0", Margin = new Thickness(5.0, 2.0, 5.0, 2.0) };
     dgraph.AddNode("A1");
     dgraph.AddNode("A2").Node.Attr.FillColor = Microsoft.Msagl.Drawing.Color.Blue;
     var nodeA3 = dgraph.AddNode("A3");
     var edgeA0A1 = dgraph.AddEdgeBetweenNodes(dgraph.NodeMap["A0"], dgraph.NodeMap["A1"]);
     dgraph.AddEdgeBetweenNodes(dgraph.NodeMap["A0"], dgraph.NodeMap["A2"]);
     dgraph.AddEdgeBetweenNodes(dgraph.NodeMap["A2"], dgraph.NodeMap["A1"]);
     dgraph.AddEdgeBetweenNodes(dgraph.NodeMap["A0"], dgraph.NodeMap["A3"]);
     nodeA3.Label = new DTextLabel(nodeA3, new Microsoft.Msagl.Drawing.Label()) { Text = "Node A3" };
     edgeA0A1.Label = new DTextLabel(edgeA0A1, new Microsoft.Msagl.Drawing.Label()) { Text = "Edge A0->A1" };
     dgraph.Graph.Attr.LayerDirection = Microsoft.Msagl.Drawing.LayerDirection.RL;
 }
Exemplo n.º 5
0
        private void Nesting_CreateMitosisGraph(DGraph graph)
        {
            DNode inNode = graph.AddNode("Mi_in");
            inNode.DrawingNode.Attr.Shape = MsaglShape.Circle;
            inNode.DrawingNode.Attr.FillColor = MsaglColor.Red;
            DNode g0Node = Nesting_Cell_AddNode(graph, "Mi_g0", "G0");

            DNode cycleNode = Nesting_Cell_AddNode(graph, "Mi_cycle", null);
            DGraph cycleGraph = new DGraph() { Name = "Mitosis Cycle" };
            cycleGraph.ConfigureIncrementalLayout();
            DNode c_G1_Node = Nesting_Cell_AddNode(cycleGraph, "Mi_cycle_G1", "G1");
            DNode c_S_Node = Nesting_Cell_AddNode(cycleGraph, "Mi_cycle_S", "S");
            DNode c_G2_Node = Nesting_Cell_AddNode(cycleGraph, "Mi_cycle_G2", "G2");
            DNode c_M_Node = Nesting_Cell_AddNode(cycleGraph, "Mi_cycle_M", "M");
            Nesting_Cell_AddEdge(cycleGraph, c_G1_Node, c_S_Node, null);
            Nesting_Cell_AddEdge(cycleGraph, c_S_Node, c_G2_Node, null);
            Nesting_Cell_AddEdge(cycleGraph, c_G2_Node, c_M_Node, null);
            cycleNode.Label = new DNestedGraphLabel(cycleNode, cycleGraph);

            Nesting_Cell_AddEdge(graph, cycleNode, g0Node, "exit cell\ncycle");
            Nesting_Cell_AddEdge(graph, inNode, g0Node, null);

            DEdge g0_g1_edge = graph.AddEdgeBetweenNodes(g0Node, c_G1_Node);
            g0_g1_edge.DrawingEdge.Attr.Color = MsaglColor.Red;//*/
        }
Exemplo n.º 6
0
        private void CreateMitosis(DGraph graph, DCluster mitosis)
        {
            var inNode = graph.AddNode("Mitosis_In");
            graph.AddNodeToCluster(mitosis, inNode);
            inNode.DrawingNode.Attr.Shape = MsaglShape.Circle;
            inNode.DrawingNode.Attr.FillColor = MsaglColor.Red;

            var g0 = Clustering_Cell_AddNode(graph, mitosis, "G0", "G0");

            var mitosis_cycle = graph.AddCluster(mitosis, "Mitosis_Cycle");
            Clustering_ApplyNodeAttributes(mitosis_cycle);
            var g1 = Clustering_Cell_AddNode(graph, mitosis_cycle, "G1", "G1");
            var s = Clustering_Cell_AddNode(graph, mitosis_cycle, "S", "S");
            var g2 = Clustering_Cell_AddNode(graph, mitosis_cycle, "G2", "G2");
            var m = Clustering_Cell_AddNode(graph, mitosis_cycle, "M", "M");

            Clustering_Cell_AddEdge(graph, inNode, g0, null);
            Clustering_Cell_AddEdge(graph, g0, g1, null);
            Clustering_Cell_AddEdge(graph, g1, s, null);
            Clustering_Cell_AddEdge(graph, s, g2, null);
            Clustering_Cell_AddEdge(graph, g2, m, null);
            Clustering_Cell_AddEdge(graph, mitosis_cycle, g0, "exit cell\ncycle");//*/
        }
Exemplo n.º 7
0
        private void CreateNestedGraph()
        {
            var g = GraphControlForNesting.Graph;

            // Create first nested graph.
            var inner1 = new DGraph() { Name = "Inner 1" };
            var node11 = inner1.AddNode("ID1.1");
            var node12 = inner1.AddNode("ID1.2");
            var edge11_12 = inner1.AddEdgeBetweenNodes(node11, node12);

            // Create second nested graph.
            var inner3 = new DGraph() { Name = "Inner 2" };
            var node31 = inner3.AddNode("ID3.1");
            var node32 = inner3.AddNode("ID3.2");
            var edge31_32 = inner3.AddEdgeBetweenNodes(node31, node32);

            // Create outer graph.
            var node1 = g.AddNode("ID1");
            node1.Label = new DNestedGraphLabel(node1, inner1);
            node1.DrawingNode.Attr.Shape = Microsoft.Msagl.Drawing.Shape.Box;
            var node2 = g.AddNode("ID2");
            var node3 = g.AddNode("ID3");
            node3.Label = new DNestedGraphLabel(node3, inner3);
            node3.DrawingNode.Attr.Shape = Microsoft.Msagl.Drawing.Shape.Box;
            var edge1_2 = g.AddEdgeBetweenNodes(node1, node2);
            var edge2_3 = g.AddEdgeBetweenNodes(node2, node3);

            // Set some labels.
            node11.Label = new DTextLabel(node11) { Text = "Node 1.1" };
            node12.Label = new DTextLabel(node12) { Text = "Node 1.2" };
            node31.Label = new DTextLabel(node31) { Text = "Node 3.1" };
            node32.Label = new DTextLabel(node32) { Text = "Node 3.2" };
            node2.Label = new DTextLabel(node2) { Text = "Node 2" };

            DEdge crossEdge1 = g.AddEdgeBetweenNodes(node11, node3);
            crossEdge1.Label = new DTextLabel(crossEdge1, "cross edge");
            DEdge crossEdge2 = g.AddEdgeBetweenNodes(node12, node31);

            g.BeginLayout();
        }
Exemplo n.º 8
0
        private void CreateComplexNestedGraph()
        {
            DGraph outerMost = GraphControlForNesting_Complex.Graph;
            outerMost.Name = "Outermost";
            DNode cellNode = Nesting_Cell_AddNode(outerMost, "Cell", "Cell");
            Grid cell_container = new Grid();
            cell_container.RowDefinitions.Add(new RowDefinition());
            cell_container.RowDefinitions.Add(new RowDefinition());
            cell_container.RowDefinitions.Add(new RowDefinition());
            cell_container.ColumnDefinitions.Add(new ColumnDefinition());
            cell_container.ColumnDefinitions.Add(new ColumnDefinition());
            cellNode.Label = new DNestedGraphLabel(cellNode, cell_container);
            TextBlock cell_header = new TextBlock() { Text = "Cell", TextAlignment = TextAlignment.Center, FontWeight = FontWeights.Bold };
            Grid.SetColumnSpan(cell_header, 2);
            cell_container.Children.Add(cell_header);
            TextBlock proliferation_header = new TextBlock() { Text = "Proliferation", TextAlignment = TextAlignment.Center };
            Grid.SetRow(proliferation_header, 1);
            cell_container.Children.Add(proliferation_header);
            TextBlock differentiation_header = new TextBlock() { Text = "Differentiation", TextAlignment = TextAlignment.Center };
            Grid.SetRow(differentiation_header, 1);
            Grid.SetColumn(differentiation_header, 1);
            cell_container.Children.Add(differentiation_header);

            DGraph proliferation = new DGraph(cellNode.Label as DNestedGraphLabel) { Name = "Proliferation", VerticalAlignment = VerticalAlignment.Top };
            Nesting_CreateProliferationGraph(proliferation);
            Grid.SetRow(proliferation, 2);
            cell_container.Children.Add(proliferation);
            (cellNode.Label as DNestedGraphLabel).Graphs.Add(proliferation);

            DGraph differentiation = new DGraph(cellNode.Label as DNestedGraphLabel) { Name = "Differentiation", VerticalAlignment = VerticalAlignment.Top };
            CreateDifferentiationGraph(differentiation);
            Grid.SetRow(differentiation, 2);
            Grid.SetColumn(differentiation, 1);
            cell_container.Children.Add(differentiation);
            (cellNode.Label as DNestedGraphLabel).Graphs.Add(differentiation);

            Dispatcher.BeginInvoke(() => outerMost.BeginLayout());
        }
Exemplo n.º 9
0
        private void Nesting_CreateGameteGraph(DGraph graph)
        {
            DNode inNode = graph.AddNode("Ga_in");
            inNode.DrawingNode.Attr.Shape = MsaglShape.Circle;
            inNode.DrawingNode.Attr.FillColor = MsaglColor.Red;
            DNode splitterNode = graph.AddNode("Ga_sp");
            splitterNode.DrawingNode.Attr.Shape = MsaglShape.Circle;
            splitterNode.DrawingNode.Attr.FillColor = MsaglColor.Blue;

            DNode spermNode = Nesting_Cell_AddNode(graph, "Ga_sperm", "Sperm");
            DNode oocyteNode = Nesting_Cell_AddNode(graph, "Ga_oocyte", "Oocyte");
            DNode matureOocyteNode = Nesting_Cell_AddNode(graph, "Ga_matureOocyte", "Mature\nOocyte");
            DNode zygoteNode = Nesting_Cell_AddNode(graph, "Ga_zygote", "Zygote");

            Nesting_Cell_AddEdge(graph, inNode, splitterNode, null);
            Nesting_Cell_AddEdge(graph, splitterNode, spermNode, "Sperm_Effector_Act");
            Nesting_Cell_AddEdge(graph, splitterNode, oocyteNode, "Oocyte_Effector_Act");
            Nesting_Cell_AddEdge(graph, oocyteNode, matureOocyteNode, "Maturation");
            Nesting_Cell_AddEdge(graph, matureOocyteNode, zygoteNode, "Fertilization");
        }
Exemplo n.º 10
0
        private void CreateDifferentiationGraph(DGraph graph)
        {
            DNode inNode = graph.AddNode("Di_in");
            inNode.DrawingNode.Attr.Shape = MsaglShape.Circle;
            inNode.DrawingNode.Attr.FillColor = MsaglColor.Red;
            DNode precursorNode = Nesting_Cell_AddNode(graph, "Di_precursor", "Precursor");
            DNode earlyMeiosisNode = Nesting_Cell_AddNode(graph, "Di_early_meiosis", "Early Meiosis");
            DNode meiosisNode = Nesting_Cell_AddNode(graph, "Di_meiosis", "Meiosis");

            DNode gameteNode = Nesting_Cell_AddNode(graph, "Di_gamete", null);
            Grid gameteContainer = new Grid();
            gameteContainer.RowDefinitions.Add(new RowDefinition());
            gameteContainer.RowDefinitions.Add(new RowDefinition());
            gameteContainer.Children.Add(new TextBlock() { Text = "Gamete", TextAlignment = TextAlignment.Center, FontWeight = FontWeights.Bold });
            gameteNode.Label = new DNestedGraphLabel(gameteNode, gameteContainer);
            DGraph gameteGraph = new DGraph(gameteNode.Label as DNestedGraphLabel) { Name = "Gamete" };
            Nesting_CreateGameteGraph(gameteGraph);
            Grid.SetRow(gameteGraph, 1);
            gameteContainer.Children.Add(gameteGraph);
            (gameteNode.Label as DNestedGraphLabel).Graphs.Add(gameteGraph);

            Nesting_Cell_AddEdge(graph, inNode, precursorNode, null);
            Nesting_Cell_AddEdge(graph, precursorNode, earlyMeiosisNode, "GLD-1_Act\nOR\nGLD-2_Act");
            Nesting_Cell_AddEdge(graph, earlyMeiosisNode, meiosisNode, "Pachytene");
            Nesting_Cell_AddEdge(graph, meiosisNode, gameteNode, "MEK-2_Act\nAND\nMPK-1_Act");
        }
Exemplo n.º 11
0
 private DNode Clustering_Cell_AddNode(DGraph graph, DCluster cluster, string id, string label)
 {
     var ret = graph.AddNode(id);
     if (label != null)
         ret.Label = new DTextLabel(ret, label);
     graph.AddNodeToCluster(cluster, ret);
     Clustering_ApplyNodeAttributes(ret);
     return ret;
 }
Exemplo n.º 12
0
        private void Nesting_CreateProliferationGraph(DGraph graph)
        {
            DNode inNode = graph.AddNode("Pr_in");
            inNode.DrawingNode.Attr.Shape = MsaglShape.Circle;
            inNode.DrawingNode.Attr.FillColor = MsaglColor.Red;

            DNode mitosisNode = Nesting_Cell_AddNode(graph, "Pr_mitosis", null);
            Grid mitosisContainer = new Grid();
            mitosisContainer.RowDefinitions.Add(new RowDefinition());
            mitosisContainer.RowDefinitions.Add(new RowDefinition());
            mitosisContainer.Children.Add(new TextBlock() { Text = "Mitosis", TextAlignment = TextAlignment.Center, FontWeight = FontWeights.Bold });
            mitosisNode.Label = new DNestedGraphLabel(mitosisNode, mitosisContainer);
            DGraph mitosisGraph = new DGraph(mitosisNode.Label as DNestedGraphLabel) { Name = "Mitosis" };
            Nesting_CreateMitosisGraph(mitosisGraph);
            Grid.SetRow(mitosisGraph, 1);
            mitosisContainer.Children.Add(mitosisGraph);
            (mitosisNode.Label as DNestedGraphLabel).Graphs.Add(mitosisGraph);

            DNode splitterNode = graph.AddNode("Pr_sp");
            splitterNode.DrawingNode.Attr.Shape = MsaglShape.Circle;
            splitterNode.DrawingNode.Attr.FillColor = MsaglColor.Blue;

            DNode meiosisNode = Nesting_Cell_AddNode(graph, "Pr_meiosis", null);
            Grid meiosisContainer = new Grid();
            meiosisContainer.RowDefinitions.Add(new RowDefinition());
            meiosisContainer.RowDefinitions.Add(new RowDefinition());
            meiosisContainer.Children.Add(new TextBlock() { Text = "Meiosis", TextAlignment = TextAlignment.Center, FontWeight = FontWeights.Bold });
            meiosisNode.Label = new DNestedGraphLabel(meiosisNode, meiosisContainer);
            DGraph meiosisGraph = new DGraph(meiosisNode.Label as DNestedGraphLabel) { Name = "Meiosis" };
            Nesting_CreateMeiosisGraph(meiosisGraph);
            Grid.SetRow(meiosisGraph, 1);
            meiosisContainer.Children.Add(meiosisGraph);
            (meiosisNode.Label as DNestedGraphLabel).Graphs.Add(meiosisGraph);

            Nesting_Cell_AddEdge(graph, inNode, mitosisNode, null);
            Nesting_Cell_AddEdge(graph, mitosisNode, splitterNode, "Early Meiosis");

            DEdge splitter_g0_edge = graph.AddEdgeBetweenNodes(splitterNode, mitosisGraph.NodeMap["Mi_g0"]);
            splitter_g0_edge.DrawingEdge.Attr.Color = MsaglColor.Red;
            DEdge splitter_inter_edge = graph.AddEdgeBetweenNodes(splitterNode, meiosisGraph.NodeMap["Me_inter"]);
            splitter_inter_edge.DrawingEdge.Attr.Color = MsaglColor.Red;//*/
        }
Exemplo n.º 13
0
 private DEdge Nesting_Cell_AddEdge(DGraph graph, DNode source, DNode target, string label)
 {
     DEdge ret = graph.AddEdgeBetweenNodes(source, target);
     if (label != null)
         ret.Label = new DTextLabel(ret, label);
     ret.DrawingEdge.Attr.Color = MsaglColor.Red;
     return ret;
 }
Exemplo n.º 14
0
 public static DGraph FromDrawingGraph(Graph drawingGraph)
 {
     var ret = new DGraph() { DrawingGraph = drawingGraph };
     ret.RebuildFromDrawingGraph();
     ret.Invalidate();
     return ret;
 }
Exemplo n.º 15
0
 private DNode Nesting_Cell_AddNode(DGraph graph, string id, string label)
 {
     DNode ret = graph.AddNode(id);
     if (label != null)
         ret.Label = new DTextLabel(ret, label);
     ret.DrawingNode.Attr.Color = MsaglColor.Green;
     ret.DrawingNode.Attr.LineWidth = 2.0;
     ret.DrawingNode.Attr.Shape = MsaglShape.Box;
     ret.DrawingNode.Attr.XRadius = 5.0;
     ret.DrawingNode.Attr.YRadius = 5.0;
     return ret;
 }
Exemplo n.º 16
0
        private void CreateDifferentiation(DGraph graph, DCluster differentiation)
        {
            var inNode = graph.AddNode("Differentiation_in");
            inNode.DrawingNode.Attr.Shape = MsaglShape.Circle;
            inNode.DrawingNode.Attr.FillColor = MsaglColor.Red;
            graph.AddNodeToCluster(differentiation, inNode);

            var precursor = Clustering_Cell_AddNode(graph, differentiation, "Precursor", "Precursor");
            var earlyMeiosis = Clustering_Cell_AddNode(graph, differentiation, "EarlyMeiosis", "Early Meiosis");
            var meiosis = Clustering_Cell_AddNode(graph, differentiation, "Diff_Meiosis", "Meiosis");

            var gamete = graph.AddCluster(differentiation, "Gamete");
            Clustering_ApplyNodeAttributes(gamete);
            CreateGamete(graph, gamete);

            Clustering_Cell_AddEdge(graph, inNode, precursor, null);
            Clustering_Cell_AddEdge(graph, precursor, earlyMeiosis, "GLD-1_Act\nOR\nGLD-2_Act");
            Clustering_Cell_AddEdge(graph, earlyMeiosis, meiosis, "Pachytene");
            Clustering_Cell_AddEdge(graph, meiosis, gamete, "MEK-2_Act\nAND\nMPK-1_Act");//*/
        }
Exemplo n.º 17
0
        private void CreateGamete(DGraph graph, DCluster gamete)
        {
            var inNode = graph.AddNode("Gamete_in");
            inNode.DrawingNode.Attr.Shape = MsaglShape.Circle;
            inNode.DrawingNode.Attr.FillColor = MsaglColor.Red;
            graph.AddNodeToCluster(gamete, inNode);

            var splitter = graph.AddNode("Gamete_Splitter");
            splitter.DrawingNode.Attr.Shape = MsaglShape.Circle;
            splitter.DrawingNode.Attr.FillColor = MsaglColor.Blue;
            graph.AddNodeToCluster(gamete, splitter);

            var sperm = Clustering_Cell_AddNode(graph, gamete, "Sperm", "Sperm");
            var oocyte = Clustering_Cell_AddNode(graph, gamete, "Oocyte", "Oocyte");
            var matureOocyte = Clustering_Cell_AddNode(graph, gamete, "MatureOocyte", "Mature\nOocyte");
            var zygote = Clustering_Cell_AddNode(graph, gamete, "Zygote", "Zygote");

            Clustering_Cell_AddEdge(graph, inNode, splitter, null);
            Clustering_Cell_AddEdge(graph, splitter, sperm, "Sperm_Effector_Act");
            Clustering_Cell_AddEdge(graph, splitter, oocyte, "Oocyte_Effector_Act");
            Clustering_Cell_AddEdge(graph, oocyte, matureOocyte, "Maturation");
            Clustering_Cell_AddEdge(graph, matureOocyte, zygote, "Fertilization");//*/
        }
Exemplo n.º 18
0
        private void CreateProliferation(DGraph graph, DCluster proliferation)
        {
            var inNode = graph.AddNode("Proliferation_in");
            inNode.DrawingNode.Attr.Shape = MsaglShape.Circle;
            inNode.DrawingNode.Attr.FillColor = MsaglColor.Red;
            graph.AddNodeToCluster(proliferation, inNode);

            var splitter = graph.AddNode("Proliferation_Splitter");
            splitter.DrawingNode.Attr.Shape = MsaglShape.Circle;
            splitter.DrawingNode.Attr.FillColor = MsaglColor.Blue;
            graph.AddNodeToCluster(proliferation, splitter);

            var mitosis = graph.AddCluster(proliferation, "Mitosis");
            Clustering_ApplyNodeAttributes(mitosis);
            CreateMitosis(graph, mitosis);

            var meiosis = graph.AddCluster(proliferation, "Meiosis");
            Clustering_ApplyNodeAttributes(meiosis);
            CreateMeiosis(graph, meiosis);

            Clustering_Cell_AddEdge(graph, inNode, mitosis, null);
            Clustering_Cell_AddEdge(graph, mitosis, splitter, "Early Meiosis");
            Clustering_Cell_AddEdge(graph, splitter, graph.NodeMap["G0"], null);
            Clustering_Cell_AddEdge(graph, splitter, graph.NodeMap["Inter"], null);//*/
        }
Exemplo n.º 19
0
        private void CreateMeiosis(DGraph graph, DCluster meiosis)
        {
            var inter = Clustering_Cell_AddNode(graph, meiosis, "Inter", "Inter");
            var rest = Clustering_Cell_AddNode(graph, meiosis, "Rest", "Rest");

            var meiosis_cycle = graph.AddCluster(meiosis, "Meiosis_Cycle");
            Clustering_ApplyNodeAttributes(meiosis_cycle);
            var pro = Clustering_Cell_AddNode(graph, meiosis_cycle, "Pro", "Pro");
            var meta = Clustering_Cell_AddNode(graph, meiosis_cycle, "Meta", "Meta");
            var ana = Clustering_Cell_AddNode(graph, meiosis_cycle, "Ana", "Ana");
            var telo = Clustering_Cell_AddNode(graph, meiosis_cycle, "Telo", "Telo");

            Clustering_Cell_AddEdge(graph, inter, pro, null);
            Clustering_Cell_AddEdge(graph, pro, meta, null);
            Clustering_Cell_AddEdge(graph, meta, ana, null);
            Clustering_Cell_AddEdge(graph, ana, telo, null);
            Clustering_Cell_AddEdge(graph, meiosis_cycle, inter, "exit cell\ncycle");
            Clustering_Cell_AddEdge(graph, meiosis_cycle, rest, null);//*/
        }
Exemplo n.º 20
0
 public ContentEditorProvider(DGraph owner)
 {
     Owner = owner;
 }
Exemplo n.º 21
0
        private void Nesting_CreateMeiosisGraph(DGraph graph)
        {
            DNode interNode = Nesting_Cell_AddNode(graph, "Me_inter", "Inter");
            DNode restNode = Nesting_Cell_AddNode(graph, "Me_rest", "Rest");

            DNode cycleNode = Nesting_Cell_AddNode(graph, "Me_cycle", null);
            DGraph cycleGraph = new DGraph() { Name = "Meiosis Cycle" };
            cycleGraph.ConfigureSugiyamaLayout(Math.PI / 2.0);
            DNode c_Pro_Node = Nesting_Cell_AddNode(cycleGraph, "Me_cycle_Pro", "Pro");
            DNode c_Meta_Node = Nesting_Cell_AddNode(cycleGraph, "Me_cycle_Meta", "Meta");
            DNode c_Ana_Node = Nesting_Cell_AddNode(cycleGraph, "Me_cycle_Ana", "Ana");
            DNode c_Telo_Node = Nesting_Cell_AddNode(cycleGraph, "Me_cycle_Telo", "Telo");
            Nesting_Cell_AddEdge(cycleGraph, c_Pro_Node, c_Meta_Node, null);
            Nesting_Cell_AddEdge(cycleGraph, c_Meta_Node, c_Ana_Node, null);
            Nesting_Cell_AddEdge(cycleGraph, c_Ana_Node, c_Telo_Node, null);
            cycleNode.Label = new DNestedGraphLabel(cycleNode, cycleGraph);

            Nesting_Cell_AddEdge(graph, cycleNode, interNode, "exit cell\ncycle");
            Nesting_Cell_AddEdge(graph, cycleNode, restNode, null);

            DEdge inter_pro_edge = graph.AddEdgeBetweenNodes(interNode, c_Pro_Node);
            inter_pro_edge.DrawingEdge.Attr.Color = MsaglColor.Red;//*/
        }