Package org.encog.workbench.dialogs

Examples of org.encog.workbench.dialogs.SaveImageDialog


     *
     * @throws IOException if there is an I/O error.
     */
    public void doSaveAs() throws IOException {

      SaveImageDialog dialog = new SaveImageDialog(EncogWorkBench.getInstance().getMainWindow());
     
      dialog.getImageWidth().setValue(640);
      dialog.getImageHeight().setValue(480);
     
      if( dialog.process() ) {
                       
            File filename = new File(dialog.getTargetFile().getValue());
            int width = dialog.getImageWidth().getValue();
            int height = dialog.getImageHeight().getValue();
           
            switch( dialog.getFileType().getSelectedIndex()) {
              case 0:
                filename = new File(FileUtil.forceExtension(filename.toString(), "png"));
                ChartUtilities.saveChartAsPNG(filename, this.getChart(),
                            width,height)
                break;
View Full Code Here

TOP

Related Classes of org.encog.workbench.dialogs.SaveImageDialog

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.