/* (non-Dotnetdoc) * see com.mxgraph.mxIGraphModel.SetTerminal(Object, Object, bool) */ public Object SetTerminal(Object edge, Object terminal, bool isSource) { mxICell mxe = (mxICell)edge; mxICell previous = mxe.GetTerminal(isSource); BeginUpdate(); try { if (terminal != null) { ((mxICell)terminal).InsertEdge(mxe, isSource); } else if (previous != null) { previous.RemoveEdge(mxe, isSource); } } finally { EndUpdate(); } if (IsMaintainEdgeParent) { UpdateEdgeParent(edge, Root); } return(terminal); }
/* (non-Dotnetdoc) * see com.mxgraph.mxICell.RemoveFromTerminal(bool) */ public void RemoveFromTerminal(bool isSource) { mxICell terminal = GetTerminal(isSource); if (terminal != null) { terminal.RemoveEdge(this, isSource); } }