JAL-4177 disable ‘Cancel’ as well - since we as yet do not support cancelling the... features/JAL-4134_treeviewerforcolumns
authorJames Procter <j.procter@dundee.ac.uk>
Mon, 1 May 2023 16:54:05 +0000 (17:54 +0100)
committerJames Procter <j.procter@dundee.ac.uk>
Mon, 1 May 2023 16:54:30 +0000 (17:54 +0100)
resources/lang/Messages.properties
src/jalview/gui/StructureChooser.java
src/jalview/jbgui/GStructureChooser.java

index 463cab1..5d457a2 100644 (file)
@@ -1452,3 +1452,4 @@ label.choose_tempfac_type = Choose Temperature Factor type
 label.interpret_tempfac_as = Interpret Temperature Factor as
 label.add_pae_matrix_file = Add PAE matrix file
 label.nothing_selected = Nothing selected
+label.working_ellipsis = Working ... 
\ No newline at end of file
index 4e5378e..5cd339b 100644 (file)
@@ -1203,6 +1203,11 @@ public class StructureChooser extends GStructureChooser
     final int preferredHeight = pnl_filter.getHeight();
     btn_add.setEnabled(false);
     btn_newView.setEnabled(false);
+    btn_cancel.setEnabled(false);
+    actionsPanel.setEnabled(false);
+    
+    final String progress=MessageManager.getString("label.working_ellipsis");
+    setProgressBar(progress, progress.hashCode());
     Runnable viewStruc = new Runnable()
     {
       @Override
@@ -1293,7 +1298,9 @@ public class StructureChooser extends GStructureChooser
                   .getCmb_assSeq().getSelectedItem();
           SequenceI userSelectedSeq = assSeqOpt.getSequence();
           if (userSelectedSeq != null)
+          {
             selectedSequence = userSelectedSeq;
+          }
           String pdbFilename = selectedPdbFileName;
 
           StructureChooser.openStructureFileForSequence(ssm, sc, ap,
@@ -1304,6 +1311,7 @@ public class StructureChooser extends GStructureChooser
           @Override
           public void run()
           {
+            setProgressBar("Complete.", progress.hashCode());
             closeAction(preferredHeight);
             mainFrame.dispose();
           }
index 64fffc4..d5e36c1 100644 (file)
@@ -106,6 +106,8 @@ public abstract class GStructureChooser extends JPanel
    */
   protected static final String VIEWS_LOCAL_PDB = "VIEWS_LOCAL_PDB";
 
+  protected JPanel actionsPanel;
+
   protected JPanel statusPanel = new JPanel();
 
   public JLabel statusBar = new JLabel();
@@ -121,6 +123,7 @@ public abstract class GStructureChooser extends JPanel
 
   protected StringBuilder errorWarning = new StringBuilder();
 
+  protected JButton btn_cancel; 
   protected JButton btn_add;
 
   protected JButton btn_newView;
@@ -414,7 +417,7 @@ public abstract class GStructureChooser extends JPanel
       }
     });
 
-    JButton btn_cancel = new JButton(
+    btn_cancel = new JButton(
             MessageManager.getString("action.cancel"));
     btn_cancel.setFont(VERDANA_12);
     btn_cancel.addActionListener(new ActionListener()
@@ -679,7 +682,7 @@ public abstract class GStructureChooser extends JPanel
 
     targetView.setVisible(false);
 
-    JPanel actionsPanel = new JPanel(new MigLayout());
+    actionsPanel = new JPanel(new MigLayout());
     actionsPanel.add(targetView, "left");
     actionsPanel.add(btn_add, "wrap");
     actionsPanel.add(chk_superpose, "left");