X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;ds=inline;f=src%2Fjalview%2Fio%2FHTMLOutput.java;h=bebfd280c90be0cb5a8ae3efca3303222f80beb8;hb=efb5cfa00ee832a62dfdf59f5fb847a0e16424d9;hp=d58bd67a6566b56eb49c685803ee06fea51455f3;hpb=26371ff5c38bbb092e432d5616313bc1088e87a2;p=jalview.git diff --git a/src/jalview/io/HTMLOutput.java b/src/jalview/io/HTMLOutput.java old mode 100755 new mode 100644 index d58bd67..bebfd28 --- a/src/jalview/io/HTMLOutput.java +++ b/src/jalview/io/HTMLOutput.java @@ -34,7 +34,6 @@ import java.io.InputStreamReader; import java.net.URL; import java.util.Objects; - public abstract class HTMLOutput implements Runnable { protected AlignmentPanel ap; @@ -107,13 +106,13 @@ public abstract class HTMLOutput implements Runnable }; } AlignmentExportData exportData = jalview.gui.AlignFrame - .getAlignmentForExport(JSONFile.FILE_DESC, - ap.getAlignViewport(), exportSettings); + .getAlignmentForExport(FileFormat.Json, ap.getAlignViewport(), + exportSettings); String bioJSON = new FormatAdapter(ap, exportData.getSettings()) - .formatSequences(JSONFile.FILE_DESC, exportData.getAlignment(), - exportData.getOmitHidden(), exportData - .getStartEndPostions(), ap.getAlignViewport() - .getColumnSelection()); + .formatSequences(FileFormat.Json, exportData.getAlignment(), + exportData.getOmitHidden(), + exportData.getStartEndPostions(), ap.getAlignViewport() + .getAlignment().getHiddenColumns()); return bioJSON; } @@ -145,7 +144,7 @@ public abstract class HTMLOutput implements Runnable { sb.append(line).append(lineSeparator); } - + } catch (Exception ex) { ex.printStackTrace(); @@ -155,7 +154,7 @@ public abstract class HTMLOutput implements Runnable { isReader.close(); } - + if (buffReader != null) { buffReader.close(); @@ -167,89 +166,55 @@ public abstract class HTMLOutput implements Runnable public static String getImageMapHTML() { - return new String( - "\n" - + "
\n" - + "\n" - + "\n" - + "\n" - + "\n" - + "\n"); + return new String("\n" + "\n" + + "\n" + "\n" + "\n" + + "\n" + + "\n"); } @@ -263,21 +228,19 @@ public abstract class HTMLOutput implements Runnable pSessionId); } - JalviewFileChooser jvFileChooser = new JalviewFileChooser( - jalview.bin.Cache.getProperty("LAST_DIRECTORY"), - new String[] { "html" }, new String[] { "HTML files" }, + JalviewFileChooser jvFileChooser = new JalviewFileChooser("html", "HTML files"); jvFileChooser.setFileView(new JalviewFileView()); - jvFileChooser.setDialogTitle(MessageManager - .getString("label.save_as_html")); + jvFileChooser + .setDialogTitle(MessageManager.getString("label.save_as_html")); jvFileChooser.setToolTipText(MessageManager.getString("action.save")); int fileChooserOpt = jvFileChooser.showSaveDialog(null); if (fileChooserOpt == JalviewFileChooser.APPROVE_OPTION) { - jalview.bin.Cache.setProperty("LAST_DIRECTORY", jvFileChooser - .getSelectedFile().getParent()); + jalview.bin.Cache.setProperty("LAST_DIRECTORY", + jvFileChooser.getSelectedFile().getParent()); selectedFile = jvFileChooser.getSelectedFile().getPath(); } else @@ -370,4 +333,4 @@ public abstract class HTMLOutput implements Runnable * the file path of the generated HTML */ public abstract void exportHTML(String outputFile); -} +} \ No newline at end of file