Package com.daehonges.soilsieve

Examples of com.daehonges.soilsieve.View$ViewContentProvider


    fileDialog.setFilterExtensions(filter);
    fileDialog.open();
    String filename = fileDialog.getFileName();
    if( !filename.endsWith(".png"))
      filename += ".png";
    View view = (View)HandlerUtil.getActivePart(event);
    view.exportChart(filename, SWT.IMAGE_PNG);
    return null;
  }
View Full Code Here


    String filename = saveDialog.open();
    if( !filename.endsWith(".xml"))
      filename += ".xml";
    try {
      XMLEncoder encoder = new XMLEncoder(new FileOutputStream(filename));
      View view = (View) HandlerUtil.getActivePart(event);
      encoder.writeObject(view.getSieveData().getSeiveResult());
      encoder.close();
    } catch (FileNotFoundException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    }
View Full Code Here

    try {
      XMLDecoder decoder = new XMLDecoder(new FileInputStream(filename));
      SieveResult sr = (SieveResult)decoder.readObject();
      SieveData sd = new SieveData(sr.getTotal());
      sd.setSieveResult(sr);
      View view = (View) HandlerUtil.getActivePart(event);
      view.setSieveData(sd);
      decoder.close();
    } catch (FileNotFoundException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    }
View Full Code Here

   
    if(printerData != null ) {
      Printer printer = new Printer(printerData);
      if(printer.startJob("Text")) {
        GC gc = new GC(printer);
        View view = (View) HandlerUtil.getActivePart(event);
        SieveResult sr = view.getSieveData().getSeiveResult();
        SingleSieve[] s = sr.getSieves();
       
        if(printer.startPage()) {
          gc.drawString("Total mass  = " + Double.toString(sr.getTotal()) + " gr", 100, 100 );
         
View Full Code Here

TOP

Related Classes of com.daehonges.soilsieve.View$ViewContentProvider

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.