From: James Procter Date: Mon, 1 May 2023 16:54:05 +0000 (+0100) Subject: JAL-4177 disable ‘Cancel’ as well - since we as yet do not support cancelling the... X-Git-Tag: Release_2_11_3_0~14^2~3^2^2~36^2 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=8b46f39580d6fe338c3dc15375863067bca2b543;p=jalview.git JAL-4177 disable ‘Cancel’ as well - since we as yet do not support cancelling the structure view…. Inability to cancel reported under JAL-4178 --- diff --git a/resources/lang/Messages.properties b/resources/lang/Messages.properties index 463cab1..5d457a2 100644 --- a/resources/lang/Messages.properties +++ b/resources/lang/Messages.properties @@ -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 diff --git a/src/jalview/gui/StructureChooser.java b/src/jalview/gui/StructureChooser.java index 4e5378e..5cd339b 100644 --- a/src/jalview/gui/StructureChooser.java +++ b/src/jalview/gui/StructureChooser.java @@ -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(); } diff --git a/src/jalview/jbgui/GStructureChooser.java b/src/jalview/jbgui/GStructureChooser.java index 64fffc4..d5e36c1 100644 --- a/src/jalview/jbgui/GStructureChooser.java +++ b/src/jalview/jbgui/GStructureChooser.java @@ -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");