Examples of FXMLConverter


Examples of at.bestsolution.efxclipse.formats.fxg.converter.FXMLConverter

  @Override
  protected String convert(IFile outFile, IFile file) throws ExecutionException {
    try {
      FXGLoader loader = new FXGLoader();
      Graphic g = loader.loadGraphic(file.getContents());
      return new FXMLConverter().generate(g).toString();
    } catch (CoreException e) {
      throw new ExecutionException("Conversion failed", e);
    }
  }
View Full Code Here

Examples of at.bestsolution.efxclipse.formats.svg.converter.FXMLConverter

public class SVGStreamConverter {
  public void converter(InputStream inputStream, OutputStream outputStream) throws Exception {
    XMLLoader loader = new XMLLoader();
    SvgSvgElement rootElement = loader.loadDocument(null, inputStream);
    FXMLConverter converter = new FXMLConverter(rootElement);
    outputStream.write(converter.generate().toString().getBytes());
  }
View Full Code Here

Examples of at.bestsolution.efxclipse.formats.svg.converter.FXMLConverter

   
    File outFile = new File(toFile);
   
    XMLLoader l = new XMLLoader();
    SvgSvgElement svgRoot = l.loadDocument(outFile.getAbsolutePath(), in);
    FXMLConverter converter = new FXMLConverter(svgRoot);
    FileOutputStream out = new FileOutputStream(outFile);
    out.write(converter.generate().toString().getBytes());
    out.close();
  }
View Full Code Here

Examples of at.bestsolution.efxclipse.formats.svg.converter.FXMLConverter

     
      // TODO use workspace file
      SvgSvgElement g = l.loadDocument("/Users/tomschindl/git/e-fx-clipse/at.bestsolution.efxclipse.formats.svg/samples/test.fxml",in);
//      SvgSvgElement g = l.loadDocument(new File("/Users/tomschindl/git/e-fx-clipse/at.bestsolution.efxclipse.formats.svg/samples/w3/images/shapes/rect01.svg").toURL().openStream());
//      SvgSvgElement g = l.loadDocument(new File("/Users/tomschindl/git/e-fx-clipse/at.bestsolution.efxclipse.formats.svg/samples/w3/images/filters/filters01.svg").toURL().openStream());
      FXMLConverter c = new FXMLConverter(g);
      String fxmlData = c.generate().toString();
      // TODO use workspace file
      File outFile = new File("/Users/tomschindl/git/e-fx-clipse/at.bestsolution.efxclipse.formats.svg/samples/test.fxml");
      FileOutputStream out = new FileOutputStream(outFile);
      out.write(fxmlData.getBytes());
      out.close();
View Full Code Here

Examples of at.bestsolution.efxclipse.formats.svg.converter.FXMLConverter

  @Override
  protected String convert(IFile outFile, IFile file) throws ExecutionException {
    try {
      XMLLoader loader = new XMLLoader();
      SvgSvgElement root = loader.loadDocument(outFile.getFullPath().toOSString(), file.getContents());
      return new FXMLConverter(root).generate().toString();
    } catch (Exception e) {
      throw new ExecutionException("Conversion failed", e);
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.