From: kjvdheide Date: Fri, 19 Jan 2018 17:40:41 +0000 (+0000) Subject: Revert "JAL-2852 added framework for saving as EPS file" X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=f3d4d888187b8cbdea5d2ea2e7637a0da11afb43;p=jalview.git Revert "JAL-2852 added framework for saving as EPS file" This reverts commit 3087ea10ac51cf1a8b2eb8d8abe010513ce9998f. --- diff --git a/forester/java/src/org/forester/archaeopteryx/AptxUtil.java b/forester/java/src/org/forester/archaeopteryx/AptxUtil.java index 57e9e78..a2cf351 100644 --- a/forester/java/src/org/forester/archaeopteryx/AptxUtil.java +++ b/forester/java/src/org/forester/archaeopteryx/AptxUtil.java @@ -89,9 +89,7 @@ public final class AptxUtil { JPG( "jpg" ), PDF( "pdf" ), PNG( "png" ), - EPS("eps"), TIFF( "tif" ); - private final String _suffix; @@ -1087,9 +1085,6 @@ public final class AptxUtil { if ( type == GraphicsExportType.TIFF ) { writeToTiff( file, buffered_img ); } - else if (type == GraphicsExportType.EPS) { - writeToEps(); - } else { ImageIO.write( buffered_img, type.toString(), file ); } @@ -1104,9 +1099,6 @@ public final class AptxUtil { } return msg; } - final static void writeToEps() { - - } final static void writeToTiff( final File file, final BufferedImage image ) throws IOException { // See: http://log.robmeek.com/2005/08/write-tiff-in-java.html diff --git a/forester/java/src/org/forester/archaeopteryx/MainFrame.java b/forester/java/src/org/forester/archaeopteryx/MainFrame.java index 0378d5b..e15becb 100644 --- a/forester/java/src/org/forester/archaeopteryx/MainFrame.java +++ b/forester/java/src/org/forester/archaeopteryx/MainFrame.java @@ -177,7 +177,6 @@ public abstract class MainFrame extends JInternalFrame implements ActionListener JMenuItem _write_to_tif_item; JMenuItem _write_to_png_item; JMenuItem _write_to_bmp_item; - JMenuItem _write_to_eps_item; // tools menu: JMenuItem _midpoint_root_item; JMenuItem _taxcolor_item; @@ -730,18 +729,6 @@ public abstract class MainFrame extends JInternalFrame implements ActionListener setCurrentDir( new_dir ); } } - else if (o == _write_to_eps_item) { - final File new_dir = writeToGraphicsFile(_mainpanel.getCurrentPhylogeny(), - GraphicsExportType.EPS, - _mainpanel, - _writetographics_filechooser, - this, - getContentPane(), - _current_dir ); - if (new_dir != null) { - setCurrentDir(new_dir); - } - } else if ( o == _print_item ) { print( getCurrentTreePanel(), getOptions(), this ); } @@ -1152,39 +1139,35 @@ public abstract class MainFrame extends JInternalFrame implements ActionListener } void buildFileMenu() { -// _file_jmenu = MainFrame.createMenu( "File", getConfiguration() ); -// _file_jmenu.add( _save_item = new JMenuItem( "Save Tree As..." ) ); -// _file_jmenu.addSeparator(); -// _file_jmenu.add( _write_to_pdf_item = new JMenuItem( "Export to PDF file ..." ) ); -// if ( AptxUtil.canWriteFormat( "tif" ) || AptxUtil.canWriteFormat( "tiff" ) || AptxUtil.canWriteFormat( "TIF" ) ) { -// _file_jmenu.add( _write_to_tif_item = new JMenuItem( "Export to TIFF file..." ) ); -// } -// _file_jmenu.add( _write_to_png_item = new JMenuItem( "Export to PNG file..." ) ); -// _file_jmenu.add( _write_to_jpg_item = new JMenuItem( "Export to JPG file..." ) ); -// if ( AptxUtil.canWriteFormat( "gif" ) ) { -// _file_jmenu.add( _write_to_gif_item = new JMenuItem( "Export to GIF file..." ) ); -// } -// if ( AptxUtil.canWriteFormat( "bmp" ) ) { -// _file_jmenu.add( _write_to_bmp_item = new JMenuItem( "Export to BMP file..." ) ); -// } -// -// _file_jmenu.add( _write_to_eps_item = new JMenuItem("Export to EPS file...") ); -// -// _file_jmenu.addSeparator(); -// _file_jmenu.add( _print_item = new JMenuItem( "Print..." ) ); -// _file_jmenu.addSeparator(); -// _file_jmenu.add( _exit_item = new JMenuItem( "Exit" ) ); -// customizeJMenuItem( _save_item ); -// customizeJMenuItem( _write_to_pdf_item ); -// customizeJMenuItem( _write_to_png_item ); -// customizeJMenuItem( _write_to_jpg_item ); -// customizeJMenuItem( _write_to_gif_item ); -// customizeJMenuItem( _write_to_tif_item ); -// customizeJMenuItem( _write_to_bmp_item ); -// customizeJMenuItem(_write_to_eps_item); -// customizeJMenuItem( _print_item ); -// customizeJMenuItem( _exit_item ); -// _jmenubar.add( _file_jmenu ); + _file_jmenu = MainFrame.createMenu( "File", getConfiguration() ); + _file_jmenu.add( _save_item = new JMenuItem( "Save Tree As..." ) ); + _file_jmenu.addSeparator(); + _file_jmenu.add( _write_to_pdf_item = new JMenuItem( "Export to PDF file ..." ) ); + if ( AptxUtil.canWriteFormat( "tif" ) || AptxUtil.canWriteFormat( "tiff" ) || AptxUtil.canWriteFormat( "TIF" ) ) { + _file_jmenu.add( _write_to_tif_item = new JMenuItem( "Export to TIFF file..." ) ); + } + _file_jmenu.add( _write_to_png_item = new JMenuItem( "Export to PNG file..." ) ); + _file_jmenu.add( _write_to_jpg_item = new JMenuItem( "Export to JPG file..." ) ); + if ( AptxUtil.canWriteFormat( "gif" ) ) { + _file_jmenu.add( _write_to_gif_item = new JMenuItem( "Export to GIF file..." ) ); + } + if ( AptxUtil.canWriteFormat( "bmp" ) ) { + _file_jmenu.add( _write_to_bmp_item = new JMenuItem( "Export to BMP file..." ) ); + } + _file_jmenu.addSeparator(); + _file_jmenu.add( _print_item = new JMenuItem( "Print..." ) ); + _file_jmenu.addSeparator(); + _file_jmenu.add( _exit_item = new JMenuItem( "Exit" ) ); + customizeJMenuItem( _save_item ); + customizeJMenuItem( _write_to_pdf_item ); + customizeJMenuItem( _write_to_png_item ); + customizeJMenuItem( _write_to_jpg_item ); + customizeJMenuItem( _write_to_gif_item ); + customizeJMenuItem( _write_to_tif_item ); + customizeJMenuItem( _write_to_bmp_item ); + customizeJMenuItem( _print_item ); + customizeJMenuItem( _exit_item ); + _jmenubar.add( _file_jmenu ); } void buildFontSizeMenu() { diff --git a/forester/java/src/org/forester/archaeopteryx/MainFrameApplication.java b/forester/java/src/org/forester/archaeopteryx/MainFrameApplication.java index dc93063..07984fc 100644 --- a/forester/java/src/org/forester/archaeopteryx/MainFrameApplication.java +++ b/forester/java/src/org/forester/archaeopteryx/MainFrameApplication.java @@ -1746,7 +1746,6 @@ public final class MainFrameApplication extends MainFrame { if ( AptxUtil.canWriteFormat( "bmp" ) ) { _file_jmenu.add( _write_to_bmp_item = new JMenuItem( "Export to BMP file..." ) ); } - _file_jmenu.add( _write_to_eps_item = new JMenuItem("Export to EPS file...") ); _file_jmenu.addSeparator(); _file_jmenu.add( _print_item = new JMenuItem( "Print..." ) ); _file_jmenu.addSeparator(); @@ -1775,7 +1774,6 @@ public final class MainFrameApplication extends MainFrame { customizeJMenuItem( _write_to_gif_item ); customizeJMenuItem( _write_to_tif_item ); customizeJMenuItem( _write_to_bmp_item ); - customizeJMenuItem( _write_to_eps_item ); customizeJMenuItem( _print_item ); customizeJMenuItem( _exit_item ); _jmenubar.add( _file_jmenu );