public runableDelegate GetRunable() { switch (GraphLayoutAlgorithm) { case GraphLayoutAlgorithms.SpringEmbedder: SpringEmbedder emb=new SpringEmbedder(mSite); return new runableDelegate(emb.StartLayout); default: throw new Exception("Invalid or unknown layout algorithm"); } }
/// <summary> /// Return a delegate the layout-thread can run /// </summary> /// <returns></returns> public runableDelegate GetRunable() { switch (GraphLayoutAlgorithm) { case GraphLayoutAlgorithms.SpringEmbedder: SpringEmbedder emb = new SpringEmbedder(mSite); return(new runableDelegate(emb.StartLayout)); case GraphLayoutAlgorithms.Tree: TreeLayout tl = new TreeLayout(mSite); return(new runableDelegate(tl.StartLayout)); case GraphLayoutAlgorithms.Randomizer: RandomizerLayout rl = new RandomizerLayout(mSite); return(new runableDelegate(rl.StartLayout)); default: throw new NotImplementedException("Invalid or unknown layout algorithm"); } }