Merge branch 'develop' into features/JAL-2446NCList
[jalview.git] / src / jalview / gui / OptsAndParamsPage.java
index e584eb7..5342c90 100644 (file)
@@ -76,8 +76,8 @@ public class OptsAndParamsPage
    */
   boolean compact = false;
 
-  public class OptionBox extends JPanel implements MouseListener,
-          ActionListener
+  public class OptionBox extends JPanel
+          implements MouseListener, ActionListener
   {
     JCheckBox enabled = new JCheckBox();
 
@@ -110,21 +110,20 @@ public class OptsAndParamsPage
       {
         hasLink = true;
 
-        enabled.setToolTipText(JvSwingUtils
-                .wrapTooltip(
-                        true,
-                        ((desc == null || desc.trim().length() == 0) ? MessageManager
-                                .getString("label.opt_and_params_further_details")
-                                : desc)
-                                + "<br><img src=\"" + linkImageURL + "\"/>"));
+        enabled.setToolTipText(JvSwingUtils.wrapTooltip(true,
+                ((desc == null || desc.trim().length() == 0)
+                        ? MessageManager.getString(
+                                "label.opt_and_params_further_details")
+                        : desc) + "<br><img src=\"" + linkImageURL
+                        + "\"/>"));
         enabled.addMouseListener(this);
       }
       else
       {
         if (desc != null && desc.trim().length() > 0)
         {
-          enabled.setToolTipText(JvSwingUtils.wrapTooltip(true,
-                  opt.getDescription()));
+          enabled.setToolTipText(
+                  JvSwingUtils.wrapTooltip(true, opt.getDescription()));
         }
       }
       add(enabled, BorderLayout.NORTH);
@@ -271,8 +270,8 @@ public class OptsAndParamsPage
 
   }
 
-  public class ParamBox extends JPanel implements ChangeListener,
-          ActionListener, MouseListener
+  public class ParamBox extends JPanel
+          implements ChangeListener, ActionListener, MouseListener
   {
     boolean adjusting = false;
 
@@ -308,7 +307,8 @@ public class OptsAndParamsPage
 
     JTextField valueField = null;
 
-    public ParamBox(final OptsParametersContainerI pmlayout, ParameterI parm)
+    public ParamBox(final OptsParametersContainerI pmlayout,
+            ParameterI parm)
     {
       pmdialogbox = pmlayout;
       finfo = parm.getFurtherDetails();
@@ -349,20 +349,16 @@ public class OptsAndParamsPage
               && parm.getDescription().trim().length() > 0)
       {
         // Only create description boxes if there actually is a description.
-        ttipText = (JvSwingUtils
-                .wrapTooltip(
-                        true,
-                        parm.getDescription()
-                                + (finfo != null ? "<br><img src=\""
-                                        + linkImageURL
-                                        + "\"/>"
-                                        + MessageManager
-                                                .getString("label.opt_and_params_further_details")
-                                        : "")));
-      }
-
-      JvSwingUtils.mgAddtoLayout(this, ttipText,
-              new JLabel(parm.getName()), controlPanel, "");
+        ttipText = (JvSwingUtils.wrapTooltip(true,
+                parm.getDescription() + (finfo != null ? "<br><img src=\""
+                        + linkImageURL + "\"/>"
+                        + MessageManager.getString(
+                                "label.opt_and_params_further_details")
+                        : "")));
+      }
+
+      JvSwingUtils.mgAddtoLayout(this, ttipText, new JLabel(parm.getName()),
+              controlPanel, "");
       updateControls(parm);
       validate();
     }
@@ -399,21 +395,18 @@ public class OptsAndParamsPage
         // Only create description boxes if there actually is a description.
         if (finfo != null)
         {
-          showDesc.setToolTipText(JvSwingUtils.wrapTooltip(
-                  true,
-                  MessageManager
-                          .formatMessage(
-                                  "label.opt_and_params_show_brief_desc_image_link",
-                                  new String[] { linkImageURL
-                                          .toExternalForm() })));
+          showDesc.setToolTipText(JvSwingUtils.wrapTooltip(true,
+                  MessageManager.formatMessage(
+                          "label.opt_and_params_show_brief_desc_image_link",
+                          new String[]
+                          { linkImageURL.toExternalForm() })));
           showDesc.addMouseListener(this);
         }
         else
         {
-          showDesc.setToolTipText(JvSwingUtils.wrapTooltip(
-                  true,
-                  MessageManager
-                          .getString("label.opt_and_params_show_brief_desc")));
+          showDesc.setToolTipText(
+                  JvSwingUtils.wrapTooltip(true, MessageManager.getString(
+                          "label.opt_and_params_show_brief_desc")));
         }
         showDesc.addActionListener(new ActionListener()
         {
@@ -578,9 +571,8 @@ public class OptsAndParamsPage
     {
       if (!adjusting)
       {
-        valueField.setText(""
-                + ((integ) ? ("" + slider.getValue()) : ("" + slider
-                        .getValue() / 1000f)));
+        valueField.setText("" + ((integ) ? ("" + slider.getValue())
+                : ("" + slider.getValue() / 1000f)));
         checkIfModified();
       }
 
@@ -790,8 +782,9 @@ public class OptsAndParamsPage
   {
 
     JPopupMenu mnu = new JPopupMenu();
-    JMenuItem mitem = new JMenuItem(MessageManager.formatMessage(
-            "label.view_params", new String[] { finfo }));
+    JMenuItem mitem = new JMenuItem(
+            MessageManager.formatMessage("label.view_params", new String[]
+            { finfo }));
     mitem.addActionListener(new ActionListener()
     {
 
@@ -878,8 +871,8 @@ public class OptsAndParamsPage
       else
       {
         throw new Error(MessageManager.formatMessage(
-                "error.invalid_value_for_option", new String[] { string,
-                    option.getName() }));
+                "error.invalid_value_for_option", new String[]
+                { string, option.getName() }));
       }
 
     }