Merge branch 'develop' into features/JAL-4134_use_annotation_row_for_colours_and_groups
[jalview.git] / src / jalview / jbgui / GStructureChooser.java
index d317e97..8cb5b3c 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,8 @@ public abstract class GStructureChooser extends JPanel
 
   protected StringBuilder errorWarning = new StringBuilder();
 
+  protected JButton btn_cancel;
+
   protected JButton btn_add;
 
   protected JButton btn_newView;
@@ -414,8 +418,7 @@ public abstract class GStructureChooser extends JPanel
       }
     });
 
-    JButton btn_cancel = new JButton(
-            MessageManager.getString("action.cancel"));
+    btn_cancel = new JButton(MessageManager.getString("action.cancel"));
     btn_cancel.setFont(VERDANA_12);
     btn_cancel.addActionListener(new ActionListener()
     {
@@ -569,10 +572,8 @@ public abstract class GStructureChooser extends JPanel
     lbl_pdbFile.setFont(VERDANA_10);
 
     lbl_chooseTempFacType.setFont(VERDANA_12);
-    lbl_chooseTempFacType.setText(new StringBuilder()
-            .append(MessageManager.getString("label.choose_tempfac_type"))
-            .append(" ").append(MessageManager.getString("label.optional"))
-            .toString());
+    lbl_chooseTempFacType.setText(
+            MessageManager.getString("label.interpret_tempfac_as"));
 
     combo_tempFacAs.setFont(VERDANA_12);
     for (TFType t : TFType.values())
@@ -590,10 +591,8 @@ public abstract class GStructureChooser extends JPanel
     });
 
     btn_paeMatrixFile.setFont(VERDANA_12);
-    btn_paeMatrixFile.setText(new StringBuilder()
-            .append(MessageManager.getString("label.add_pae_matrix_file"))
-            .append(" ").append(MessageManager.getString("label.optional"))
-            .toString());
+    btn_paeMatrixFile
+            .setText(MessageManager.getString("label.add_pae_matrix_file"));
     btn_paeMatrixFile.addActionListener(new ActionListener()
     {
       @Override
@@ -685,7 +684,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");
@@ -727,15 +726,23 @@ public abstract class GStructureChooser extends JPanel
     gbc.insets = new Insets(0, 0, 18, 0);
     pnl_fileOptions.add(lbl_pdbFile, gbc);
     gbc.gridy++;
+
     gbc.insets = new Insets(0, 0, 2, 0);
+    pnl_fileOptions.add(new JLabel(
+            MessageManager.getString("label.structure_import_options")),
+            gbc);
+    gbc.gridy++;
+
+    gbc.insets = new Insets(0, 0, 6, 0);
     pnl_fileOptions.add(lbl_chooseTempFacType, gbc);
     gbc.gridy++;
     gbc.insets = new Insets(0, 0, 18, 0);
     pnl_fileOptions.add(combo_tempFacAs, gbc);
     gbc.gridy++;
-    gbc.insets = new Insets(0, 0, 2, 0);
+    gbc.insets = new Insets(0, 0, 6, 0);
     pnl_fileOptions.add(btn_paeMatrixFile, gbc);
     gbc.gridy++;
+    gbc.insets = new Insets(0, 0, 2, 0);
     gbc.weighty = 1.0;
     pnl_fileOptions.add(lbl_paeFile, gbc);
 
@@ -1070,5 +1077,6 @@ public abstract class GStructureChooser extends JPanel
     lbl_chooseTempFacType.setEnabled(b);
     combo_tempFacAs.setEnabled(b);
     btn_paeMatrixFile.setEnabled(b);
+    lbl_paeFile.setEnabled(b);
   }
 }