Package at.bestsolution.efxclipse.formats.fxg.handler

Examples of at.bestsolution.efxclipse.formats.fxg.handler.FXGLoader$Handler


public class ConvertFXGHandler extends AbstractConverterHandler {

  @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


import at.bestsolution.efxclipse.formats.fxg.fxg.Graphic;
import at.bestsolution.efxclipse.formats.fxg.handler.FXGLoader;

public class TestConverter {
  public static void main(String[] args) {
    FXGLoader l = new FXGLoader();
    try {
      // TODO use a file in the workspace
      Graphic g = l.loadGraphic(new File("C:/e-ws/fxclipse/fxg-examples/Duke Billboard T-Shirt CLEAN.fxg").toURI().toURL().openStream());
      FXMLConverter c = new FXMLConverter();
      System.out.println(c.generate(g));
    } catch (MalformedURLException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
View Full Code Here

TOP

Related Classes of at.bestsolution.efxclipse.formats.fxg.handler.FXGLoader$Handler

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.