Пример #1
0
        internal DEdge(DNode source, DNode target, DrawingEdge drawingEdgeParam, ConnectionToGraph connection,
                       GViewer gviewer) : base(gviewer)
        {
            DrawingEdge = drawingEdgeParam;
            Source      = source;
            Target      = target;

            if (connection == ConnectionToGraph.Connected)
            {
                if (source == target)
                {
                    source.AddSelfEdge(this);
                }
                else
                {
                    source.AddOutEdge(this);
                    target.AddInEdge(this);
                }
            }

            if (drawingEdgeParam.Label != null)
            {
                Label = new DLabel(this, drawingEdge.Label, gviewer);
            }
        }
        internal DEdge(DNode source, DNode target, DrawingEdge drawingEdgeParam, ConnectionToGraph connection,
                       GViewer gviewer) : base(gviewer) {
            DrawingEdge = drawingEdgeParam;
            Source = source;
            Target = target;

            if (connection == ConnectionToGraph.Connected) {
                if (source == target)
                    source.AddSelfEdge(this);
                else {
                    source.AddOutEdge(this);
                    target.AddInEdge(this);
                }
            }

            if (drawingEdgeParam.Label != null)
                Label = new DLabel(this, drawingEdge.Label, gviewer);
        }
Пример #3
0
        internal DEdge(DNode source, DNode target, DrawingEdge drawingEdgeParam, Connection connection)
        {
            this.DrawingEdge = drawingEdgeParam;
            this.Source      = source;
            this.Target      = target;

            if (connection == Connection.Connected)
            {
                if (source == target)
                {
                    source.AddSelfEdge(this);
                }
                else
                {
                    source.AddOutEdge(this);
                    target.AddInEdge(this);
                }
            }

            if (drawingEdgeParam.Label != null)
            {
                this.dLabel = new DLabel(this, drawingEdge.Label);
            }
        }