Package com.puppetlabs.graph

Examples of com.puppetlabs.graph.ICancel


  public void produceSVG(InputStream dotStream, OutputStream svgStream, boolean compress, IProgressMonitor monitor)
      throws IOException {
    // monitor
    SubMonitor m2 = SubMonitor.convert(monitor);
    // convert every 1000 checks for cancel into a worked(1)
    final ICancel cancel = new ProgressMonitorCancelIndicator(m2.newChild(IProgressMonitor.UNKNOWN), 1000);

    // configure in and out streams
    // ByteArrayOutputStream tmp = new ByteArrayOutputStream();
    // byte[] buffer = new byte[512];
    // for(;;) {
View Full Code Here


    final SubMonitor ticker = SubMonitor.convert(monitor, 1000);
    CatalogDeltaGraphProducer graphProducer = injector.getInstance(CatalogDeltaGraphProducer.class);
    Catalog oldCatalog = CatalogJsonSerializer.load(oldCatalogStream);
    Catalog newCatalog = CatalogJsonSerializer.load(newCatalogStream);

    ICancel cancel = new ProgressMonitorCancelIndicator(ticker.newChild(IProgressMonitor.UNKNOWN), 1000);
    graphProducer.produceGraph(cancel, catalogName, oldCatalog, oldRoot, newCatalog, newRoot, dotStream);
  }
View Full Code Here

  public void produceDOTGraph(String catalogName, InputStream catalogStream, OutputStream dotStream,
      IProgressMonitor monitor, IPath root) throws IOException {
    final SubMonitor ticker = SubMonitor.convert(monitor, 1000);
    CatalogGraphProducer graphProducer = injector.getInstance(CatalogGraphProducer.class);
    ICancel cancel = new ProgressMonitorCancelIndicator(ticker.newChild(IProgressMonitor.UNKNOWN), 1000);
    Catalog catalog = CatalogJsonSerializer.load(catalogStream);

    graphProducer.produceGraph(cancel, catalog, catalogName, dotStream, root);
  }
View Full Code Here

    final SubMonitor ticker = SubMonitor.convert(monitor, 2000);
    CatalogDeltaGraphProducer graphProducer = injector.getInstance(CatalogDeltaGraphProducer.class);
    Catalog oldCatalog = CatalogJsonSerializer.load(oldCatalogStream);
    Catalog newCatalog = CatalogJsonSerializer.load(newCatalogStream);

    ICancel cancel = new ProgressMonitorCancelIndicator(ticker.newChild(IProgressMonitor.UNKNOWN), 1000);

    ByteArrayOutputStream2 out = new ByteArrayOutputStream2();

    graphProducer.produceGraph(cancel, catalogName, oldCatalog, oldRoot, newCatalog, newRoot, out);
    graphProducer.getSVGProducer().produceSVG(out.toInputStream(false), svgStream, false, //
View Full Code Here

  public void produceSVGGraph(String catalogName, InputStream catalogStream, OutputStream svgStream,
      IProgressMonitor monitor, IPath root) throws IOException {
    final SubMonitor ticker = SubMonitor.convert(monitor, 2000);
    CatalogGraphProducer graphProducer = injector.getInstance(CatalogGraphProducer.class);
    ICancel cancel = new ProgressMonitorCancelIndicator(ticker.newChild(IProgressMonitor.UNKNOWN), 1000);
    Catalog catalog = CatalogJsonSerializer.load(catalogStream);

    ByteArrayOutputStream2 out = new ByteArrayOutputStream2();
    graphProducer.produceGraph(cancel, catalog, catalogName, out, root);
    graphProducer.getSVGProducer().produceSVG(out.toInputStream(false), svgStream, false, //
View Full Code Here

TOP

Related Classes of com.puppetlabs.graph.ICancel

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.