Merge branch 'develop' into features/JAL-1705_ensembl
[jalview.git] / src / jalview / jbgui / GPreferences.java
index 97edb36..b12355a 100755 (executable)
  */
 package jalview.jbgui;
 
+import jalview.gui.JvSwingUtils;
+import jalview.gui.StructureViewer.ViewerType;
+import jalview.jbgui.PDBDocFieldPreferences.PreferenceSource;
+import jalview.util.MessageManager;
+
 import java.awt.BorderLayout;
 import java.awt.Color;
 import java.awt.Component;
@@ -61,11 +66,6 @@ import javax.swing.event.ChangeListener;
 import javax.swing.event.ListSelectionEvent;
 import javax.swing.event.ListSelectionListener;
 
-import jalview.gui.JvSwingUtils;
-import jalview.gui.StructureViewer.ViewerType;
-import jalview.jbgui.PDBDocFieldPreferences.PreferenceSource;
-import jalview.util.MessageManager;
-
 /**
  * Base class for the Preferences panel.
  * 
@@ -76,8 +76,8 @@ public class GPreferences extends JPanel
 {
   private static final Font LABEL_FONT = JvSwingUtils.getLabelFont();
 
-  private static final Font LABEL_FONT_ITALIC = JvSwingUtils
-          .getLabelFont(false, true);
+  private static final Font LABEL_FONT_ITALIC = JvSwingUtils.getLabelFont(
+          false, true);
 
   /*
    * Visual tab components
@@ -156,7 +156,6 @@ public class GPreferences extends JPanel
 
   protected JTextField chimeraPath = new JTextField();
 
-
   /*
    * Colours tab components
    */
@@ -216,6 +215,8 @@ public class GPreferences extends JPanel
 
   protected JCheckBox modellerOutput = new JCheckBox();
 
+  protected JCheckBox embbedBioJSON = new JCheckBox();
+
   /*
    * Editing tab components
    */
@@ -274,16 +275,17 @@ public class GPreferences extends JPanel
     tabbedPane.add(initConnectionsTab(),
             MessageManager.getString("label.connections"));
 
-    tabbedPane.add(initOutputTab(), MessageManager.getString("label.output"));
+    tabbedPane.add(initOutputTab(),
+            MessageManager.getString("label.output"));
 
-    tabbedPane.add(initEditingTab(), MessageManager.getString("label.editing"));
+    tabbedPane.add(initEditingTab(),
+            MessageManager.getString("label.editing"));
 
     /*
      * See DasSourceBrowser for the real work of configuring this tab.
      */
     dasTab.setLayout(new BorderLayout());
-    tabbedPane
-            .add(dasTab, MessageManager.getString("label.das_settings"));
+    tabbedPane.add(dasTab, MessageManager.getString("label.das_settings"));
 
     /*
      * See WsPreferences for the real work of configuring this tab.
@@ -400,8 +402,9 @@ public class GPreferences extends JPanel
     autoIdWidth.setFont(LABEL_FONT);
     autoIdWidth.setText(MessageManager
             .getString("label.automatically_set_id_width"));
-    autoIdWidth
-            .setToolTipText(JvSwingUtils.wrapTooltip(true, MessageManager.getString("label.adjusts_width_generated_eps_png")));
+    autoIdWidth.setToolTipText(JvSwingUtils.wrapTooltip(true,
+            MessageManager
+                    .getString("label.adjusts_width_generated_eps_png")));
     autoIdWidth.setBounds(new Rectangle(228, 96, 188, 23));
     autoIdWidth.addActionListener(new ActionListener()
     {
@@ -416,9 +419,11 @@ public class GPreferences extends JPanel
     userIdWidthlabel.setText(MessageManager
             .getString("label.figure_id_column_width"));
     userIdWidth
-            .setToolTipText(JvSwingUtils.wrapTooltip(true, MessageManager.getString("label.manually_specify_width_left_column")));
+            .setToolTipText(JvSwingUtils.wrapTooltip(true, MessageManager
+                    .getString("label.manually_specify_width_left_column")));
     userIdWidthlabel
-            .setToolTipText(JvSwingUtils.wrapTooltip(true, MessageManager.getString("label.manually_specify_width_left_column")));
+            .setToolTipText(JvSwingUtils.wrapTooltip(true, MessageManager
+                    .getString("label.manually_specify_width_left_column")));
     userIdWidthlabel.setBounds(new Rectangle(236, 120, 168, 23));
     userIdWidth.setFont(JvSwingUtils.getTextAreaFont());
     userIdWidth.setText("");
@@ -432,6 +437,14 @@ public class GPreferences extends JPanel
         userIdWidth_actionPerformed();
       }
     });
+    modellerOutput.setFont(LABEL_FONT);
+    modellerOutput.setText(MessageManager
+            .getString("label.use_modeller_output"));
+    modellerOutput.setBounds(new Rectangle(228, 226, 168, 23));
+    embbedBioJSON.setFont(LABEL_FONT);
+    embbedBioJSON.setText(MessageManager.getString("label.embbed_biojson"));
+    embbedBioJSON.setBounds(new Rectangle(228, 200, 250, 23));
+
     jPanel11.add(jLabel1);
     jPanel11.add(blcjv);
     jPanel11.add(clustaljv);
@@ -444,13 +457,10 @@ public class GPreferences extends JPanel
     outputTab.add(userIdWidth);
     outputTab.add(userIdWidthlabel);
     outputTab.add(modellerOutput);
+    outputTab.add(embbedBioJSON);
     outputTab.add(epsLabel);
     outputTab.add(epsRendering);
     outputTab.add(jPanel11);
-    modellerOutput.setFont(LABEL_FONT);
-    modellerOutput.setText(MessageManager
-            .getString("label.use_modeller_output"));
-    modellerOutput.setBounds(new Rectangle(228, 226, 168, 23));
     return outputTab;
   }
 
@@ -720,8 +730,7 @@ public class GPreferences extends JPanel
     nucColourLabel.setFont(LABEL_FONT);
     nucColourLabel.setHorizontalAlignment(SwingConstants.LEFT);
     nucColourLabel.setText(MessageManager
-            .getString("label.nuc_alignment_colour")
-            + " ");
+            .getString("label.nuc_alignment_colour") + " ");
     JvSwingUtils.addtoLayout(coloursTab, MessageManager
             .getString("label.default_colour_scheme_for_alignment"),
             nucColourLabel, nucColour);
@@ -758,7 +767,8 @@ public class GPreferences extends JPanel
     int ypos = 30;
 
     structFromPdb.setFont(LABEL_FONT);
-    structFromPdb.setText(MessageManager.getString("label.struct_from_pdb"));
+    structFromPdb
+            .setText(MessageManager.getString("label.struct_from_pdb"));
     structFromPdb.setBounds(new Rectangle(5, ypos, width, height));
     structFromPdb.addActionListener(new ActionListener()
     {
@@ -858,13 +868,9 @@ public class GPreferences extends JPanel
     docFieldPref.setBounds(new Rectangle(10, ypos + 5, 450, 120));
     structureTab.add(docFieldPref);
 
-
-
-
     return structureTab;
   }
 
-
   /**
    * Action on choosing a structure viewer from combobox options.
    * 
@@ -1114,7 +1120,7 @@ public class GPreferences extends JPanel
         }
       }
     });
+
     sortby.setFont(LABEL_FONT);
     sortby.setBounds(new Rectangle(172, 260, 155, 21));
     JLabel sortLabel = new JLabel();