public ApplicationDiagramPluginFactory( ILayoutPriorityProvider layoutPriorityProvider, IDiagramShapeFactory diagramShapeFactory, INodeLayoutAlgorithm nodeLayoutAlgorithm, IHostUiServices hostUiServices) : base(layoutPriorityProvider, diagramShapeFactory, nodeLayoutAlgorithm) { _hostUiServices = hostUiServices; }
public BufferingAutoLayoutDiagramPlugin(INodeLayoutAlgorithm layoutAlgorithm) { _layoutAlgorithm = layoutAlgorithm; _cancellationToken = new CancellationTokenSource(); _diagramEventQueue = new Queue <DiagramEventBase>(); _diagramEventArrivedEvent = new AutoResetEvent(false); new Thread(() => ProcessDiagramShapeActions(_cancellationToken.Token)).Start(); }
public DiagramPluginFactory( ILayoutPriorityProvider layoutPriorityProvider, IDiagramShapeFactory diagramShapeFactory, INodeLayoutAlgorithm nodeLayoutAlgorithm) { _layoutPriorityProvider = layoutPriorityProvider; _diagramShapeFactory = diagramShapeFactory; _nodeLayoutAlgorithm = nodeLayoutAlgorithm; }
private void OnLayoutChanged(Layout newValue) { if (_algorithm != null) { _algorithm.Dispose(); _algorithm = null; } if (_isLoaded) { CreateLayoutAlgorithm(newValue); } }
/// <summary> /// Creates a new solver for the given algorithm. /// </summary> /// <param name="algorithm"></param> public SolvingNodeLayoutAlgorithm(INodeLayoutAlgorithm algorithm) { if (algorithm == null) { throw new ArgumentNullException("algorithm"); } _algorithm = algorithm; _pendingActions = new ConcurrentQueue <AlgorithmAction>(); _maxIterations = 100000; _cancellationTokenSource = new CancellationTokenSource(); _currentResult = AlgorithmResult.Empty; _solver = Task.FromResult(_currentResult); }
private void CreateLayoutAlgorithm(Layout layout) { Layout actualLayout = layout ?? new ForceDirectedLayout(); _algorithm = actualLayout.CreateAlgorithm(); }
public DiagramPluginFactory(INodeLayoutAlgorithm nodeLayoutAlgorithm) { _nodeLayoutAlgorithm = nodeLayoutAlgorithm; }