JAL-3048 TODOs for refactoring JalviewFileChooser pattern
authorJim Procter <jprocter@issues.jalview.org>
Thu, 28 Jun 2018 15:51:32 +0000 (16:51 +0100)
committerJim Procter <jprocter@issues.jalview.org>
Thu, 28 Jun 2018 15:52:08 +0000 (16:52 +0100)
13 files changed:
src/jalview/gui/AlignFrame.java
src/jalview/gui/AnnotationExporter.java
src/jalview/gui/CutAndPasteHtmlTransfer.java
src/jalview/gui/CutAndPasteTransfer.java
src/jalview/gui/Desktop.java
src/jalview/gui/FeatureSettings.java
src/jalview/gui/StructureChooser.java
src/jalview/gui/StructureViewerBase.java
src/jalview/gui/TreePanel.java
src/jalview/gui/UserDefinedColours.java
src/jalview/gui/WsParamSetManager.java
src/jalview/io/HTMLOutput.java
src/jalview/util/ImageMaker.java

index a40044a..aa0a1fe 100644 (file)
@@ -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]);
                 }
               }
             }
index 6fefbd0..35a463c 100644 (file)
@@ -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"));
 
index 2e51bce..03eb7d2 100644 (file)
@@ -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"));
 
index 2a96daf..142dd75 100644 (file)
@@ -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"));
 
index 39098f2..61d2b11 100644 (file)
@@ -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
index 78c1cac..75e8ec9 100644 (file)
@@ -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());
index e18d6af..97ff404 100644 (file)
@@ -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());
index 72b0bcc..9ed08b8 100644 (file)
@@ -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"));
 
index 2727db1..5795a9f 100755 (executable)
@@ -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();
 
index 3290500..89ddf87 100755 (executable)
@@ -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");
 
index d91775c..a826503 100644 (file)
@@ -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());
index bebfd28..bf8c431 100644 (file)
@@ -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());
index 7840261..3398fea 100755 (executable)
@@ -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;