From: Jim Procter Date: Thu, 28 Jun 2018 15:51:32 +0000 (+0100) Subject: JAL-3048 TODOs for refactoring JalviewFileChooser pattern X-Git-Tag: Release_2_11_4_0~45^2~18^2~615^2^2~2 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=7534e6f358b2bba0db179cb2f496bd2e5a4da43d;p=jalview.git JAL-3048 TODOs for refactoring JalviewFileChooser pattern --- diff --git a/src/jalview/gui/AlignFrame.java b/src/jalview/gui/AlignFrame.java index a40044a..aa0a1fe 100644 --- a/src/jalview/gui/AlignFrame.java +++ b/src/jalview/gui/AlignFrame.java @@ -1118,6 +1118,8 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, @Override public void saveAs_actionPerformed(ActionEvent e) { + // TODO: JAL-3048 JalviewFileChooser - Save option + String format = currentFileFormat == null ? null : currentFileFormat.getName(); JalviewFileChooser chooser = JalviewFileChooser @@ -1422,7 +1424,6 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, @Override public void associatedData_actionPerformed(ActionEvent e) { - // Pick the tree file JalviewFileChooser chooser = new JalviewFileChooser( jalview.bin.Cache.getProperty("LAST_DIRECTORY")); chooser.setFileView(new JalviewFileView()); @@ -3904,6 +3905,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, @Override protected void loadTreeMenuItem_actionPerformed(ActionEvent e) { + // TODO: JAL-3048 JalviewFileChooser // Pick the tree file JalviewFileChooser chooser = new JalviewFileChooser( jalview.bin.Cache.getProperty("LAST_DIRECTORY")); @@ -4550,7 +4552,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, */ for (Object[] o : filesmatched) { - filesnotmatched.add((String) o[0]); + filesnotmatched.add(o[0]); } } } diff --git a/src/jalview/gui/AnnotationExporter.java b/src/jalview/gui/AnnotationExporter.java index 6fefbd0..35a463c 100644 --- a/src/jalview/gui/AnnotationExporter.java +++ b/src/jalview/gui/AnnotationExporter.java @@ -135,6 +135,7 @@ public class AnnotationExporter extends JPanel private void toFile_actionPerformed() { + // TODO: JAL-3048 JalviewFileChooser - Save option JalviewFileChooser chooser = new JalviewFileChooser( Cache.getProperty("LAST_DIRECTORY")); diff --git a/src/jalview/gui/CutAndPasteHtmlTransfer.java b/src/jalview/gui/CutAndPasteHtmlTransfer.java index 2e51bce..03eb7d2 100644 --- a/src/jalview/gui/CutAndPasteHtmlTransfer.java +++ b/src/jalview/gui/CutAndPasteHtmlTransfer.java @@ -148,6 +148,8 @@ public class CutAndPasteHtmlTransfer extends GCutAndPasteHtmlTransfer @Override public void save_actionPerformed(ActionEvent e) { + // TODO: JAL-3048 JalviewFileChooser - Save option + JalviewFileChooser chooser = new JalviewFileChooser( jalview.bin.Cache.getProperty("LAST_DIRECTORY")); diff --git a/src/jalview/gui/CutAndPasteTransfer.java b/src/jalview/gui/CutAndPasteTransfer.java index 2a96daf..142dd75 100644 --- a/src/jalview/gui/CutAndPasteTransfer.java +++ b/src/jalview/gui/CutAndPasteTransfer.java @@ -135,6 +135,8 @@ public class CutAndPasteTransfer extends GCutAndPasteTransfer @Override public void save_actionPerformed(ActionEvent e) { + // TODO: JAL-3048 JalviewFileChooser - Save option + JalviewFileChooser chooser = new JalviewFileChooser( jalview.bin.Cache.getProperty("LAST_DIRECTORY")); diff --git a/src/jalview/gui/Desktop.java b/src/jalview/gui/Desktop.java index 39098f2..61d2b11 100644 --- a/src/jalview/gui/Desktop.java +++ b/src/jalview/gui/Desktop.java @@ -1613,6 +1613,8 @@ public class Desktop extends jalview.jbgui.GDesktop @Override public void saveState_actionPerformed(ActionEvent e) { + // TODO: JAL-3048 not needed for Jalview-JS + JalviewFileChooser chooser = new JalviewFileChooser("jvp", "Jalview Project"); @@ -1686,6 +1688,8 @@ public class Desktop extends jalview.jbgui.GDesktop @Override public void loadState_actionPerformed(ActionEvent e) { + // TODO: JAL-3048 not needed for Jalview-JS + JalviewFileChooser chooser = new JalviewFileChooser( Cache.getProperty("LAST_DIRECTORY"), new String[] { "jvp", "jar" }, @@ -1993,6 +1997,8 @@ public class Desktop extends jalview.jbgui.GDesktop @Override public void vamsasImport_actionPerformed(ActionEvent e) { + // TODO: JAL-3048 not needed for Jalview-JS + if (v_client == null) { // Load and try to start a session. @@ -2269,6 +2275,8 @@ public class Desktop extends jalview.jbgui.GDesktop @Override public void vamsasSave_actionPerformed(ActionEvent e) { + // TODO: JAL-3048 not needed for Jalview-JS + if (v_client != null) { // TODO: VAMSAS DOCUMENT EXTENSION is VDJ diff --git a/src/jalview/gui/FeatureSettings.java b/src/jalview/gui/FeatureSettings.java index 78c1cac..75e8ec9 100644 --- a/src/jalview/gui/FeatureSettings.java +++ b/src/jalview/gui/FeatureSettings.java @@ -846,6 +846,9 @@ public class FeatureSettings extends JPanel */ void load() { + // TODO: JAL-3048 relies on Castor XML parsing: not needed for JS-jalview core + // functionalty + JalviewFileChooser chooser = new JalviewFileChooser("fc", SEQUENCE_FEATURE_COLOURS); chooser.setFileView(new JalviewFileView()); @@ -928,6 +931,7 @@ public class FeatureSettings extends JPanel */ void save() { + // TODO: JAL-3048 not needed for Jalview-JS - save colours JalviewFileChooser chooser = new JalviewFileChooser("fc", SEQUENCE_FEATURE_COLOURS); chooser.setFileView(new JalviewFileView()); diff --git a/src/jalview/gui/StructureChooser.java b/src/jalview/gui/StructureChooser.java index e18d6af..97ff404 100644 --- a/src/jalview/gui/StructureChooser.java +++ b/src/jalview/gui/StructureChooser.java @@ -565,6 +565,8 @@ public class StructureChooser extends GStructureChooser @Override protected void pdbFromFile_actionPerformed() { + // TODO: JAL-3048 not needed for Jalview-JS until JSmol dep and StructureChooser + // works jalview.io.JalviewFileChooser chooser = new jalview.io.JalviewFileChooser( jalview.bin.Cache.getProperty("LAST_DIRECTORY")); chooser.setFileView(new jalview.io.JalviewFileView()); diff --git a/src/jalview/gui/StructureViewerBase.java b/src/jalview/gui/StructureViewerBase.java index 72b0bcc..9ed08b8 100644 --- a/src/jalview/gui/StructureViewerBase.java +++ b/src/jalview/gui/StructureViewerBase.java @@ -876,6 +876,7 @@ public abstract class StructureViewerBase extends GStructureViewer @Override public void pdbFile_actionPerformed(ActionEvent actionEvent) { + // TODO: JAL-3048 not needed for Jalview-JS - save PDB file JalviewFileChooser chooser = new JalviewFileChooser( Cache.getProperty("LAST_DIRECTORY")); diff --git a/src/jalview/gui/TreePanel.java b/src/jalview/gui/TreePanel.java index 2727db1..5795a9f 100755 --- a/src/jalview/gui/TreePanel.java +++ b/src/jalview/gui/TreePanel.java @@ -390,6 +390,7 @@ public class TreePanel extends GTreePanel @Override public void saveAsNewick_actionPerformed(ActionEvent e) { + // TODO: JAL-3048 save newick file for Jalview-JS JalviewFileChooser chooser = new JalviewFileChooser( jalview.bin.Cache.getProperty("LAST_DIRECTORY")); chooser.setFileView(new JalviewFileView()); @@ -696,6 +697,7 @@ public class TreePanel extends GTreePanel try { + // TODO: JAL-3048 not needed for Jalview-JS - Requires EpsGraphics2D dependency JalviewFileChooser chooser = new JalviewFileChooser( ImageMaker.EPS_EXTENSION, ImageMaker.EPS_EXTENSION); chooser.setFileView(new JalviewFileView()); @@ -739,6 +741,7 @@ public class TreePanel extends GTreePanel @Override public void pngTree_actionPerformed(ActionEvent e) { + // TODO: JAL-3048 image export supported in JalviewJS ? int width = treeCanvas.getWidth(); int height = treeCanvas.getHeight(); diff --git a/src/jalview/gui/UserDefinedColours.java b/src/jalview/gui/UserDefinedColours.java index 3290500..89ddf87 100755 --- a/src/jalview/gui/UserDefinedColours.java +++ b/src/jalview/gui/UserDefinedColours.java @@ -633,7 +633,7 @@ public class UserDefinedColours extends GUserDefinedColours { upperCaseButtons = new ArrayList<>(); lowerCaseButtons = new ArrayList<>(); - + // TODO: JAL-3048 requires Castor dependency for Jalview-JS JalviewFileChooser chooser = new JalviewFileChooser("jc", "Jalview User Colours"); chooser.setFileView(new JalviewFileView()); @@ -754,6 +754,8 @@ public class UserDefinedColours extends GUserDefinedColours return false; } } + // TODO: JAL-3048 saveas, also requires Castor dependency for Jalview-JS + JalviewFileChooser chooser = new JalviewFileChooser("jc", "Jalview User Colours"); diff --git a/src/jalview/gui/WsParamSetManager.java b/src/jalview/gui/WsParamSetManager.java index d91775c..a826503 100644 --- a/src/jalview/gui/WsParamSetManager.java +++ b/src/jalview/gui/WsParamSetManager.java @@ -180,6 +180,8 @@ public class WsParamSetManager implements ParamManager } if (filename == null) { + // TODO: JAL-3048 webservice - not required for Jalview-JS + JalviewFileChooser chooser = new JalviewFileChooser("wsparams", "Web Service Parameter File"); chooser.setFileView(new JalviewFileView()); diff --git a/src/jalview/io/HTMLOutput.java b/src/jalview/io/HTMLOutput.java index bebfd28..bf8c431 100644 --- a/src/jalview/io/HTMLOutput.java +++ b/src/jalview/io/HTMLOutput.java @@ -228,6 +228,8 @@ public abstract class HTMLOutput implements Runnable pSessionId); } + // TODO: JAL-3048 generate html rendered view (requires SvgGraphics and/or + // Jalview HTML rendering system- probably not required for Jalview-JS) JalviewFileChooser jvFileChooser = new JalviewFileChooser("html", "HTML files"); jvFileChooser.setFileView(new JalviewFileView()); diff --git a/src/jalview/util/ImageMaker.java b/src/jalview/util/ImageMaker.java index 7840261..3398fea 100755 --- a/src/jalview/util/ImageMaker.java +++ b/src/jalview/util/ImageMaker.java @@ -123,6 +123,8 @@ public class ImageMaker this.headless = headless; if (file == null) { + // TODO: JAL-3048 export SVG/EPS/PNG- not required for Jalview-JS + setProgressMessage(MessageManager.formatMessage( "status.waiting_for_user_to_select_output_file", type.name)); JalviewFileChooser chooser;