Merge remote-tracking branch 'origin/releases/Release_2_10_2b1_Branch'
[jalview.git] / src / jalview / appletgui / AnnotationColumnChooser.java
index 3a7188e..b4c1d54 100644 (file)
@@ -172,16 +172,12 @@ public class AnnotationColumnChooser extends AnnotationRowFilter implements
     // restore Object state from the previous session if one exists
     if (lastChooser != null)
     {
-      currentSearchPanel = lastChooser
-              .getCurrentSearchPanel();
+      currentSearchPanel = lastChooser.getCurrentSearchPanel();
       currentStructureFilterPanel = lastChooser
               .getCurrentStructureFilterPanel();
-      annotations.select(lastChooser
-              .getAnnotations().getSelectedIndex());
-      threshold.select(lastChooser
-              .getThreshold().getSelectedIndex());
-      actionOption = lastChooser
-              .getActionOption();
+      annotations.select(lastChooser.getAnnotations().getSelectedIndex());
+      threshold.select(lastChooser.getThreshold().getSelectedIndex());
+      actionOption = lastChooser.getActionOption();
       percentThreshold.setState(lastChooser.percentThreshold.getState());
     }
 
@@ -295,8 +291,7 @@ public class AnnotationColumnChooser extends AnnotationRowFilter implements
 
       if (av.getAnnotationColumnSelectionState() != null)
       {
-        HiddenColumns oldHidden = av
-                .getAnnotationColumnSelectionState()
+        HiddenColumns oldHidden = av.getAnnotationColumnSelectionState()
                 .getOldHiddenColumns();
         if (oldHidden != null)
         {
@@ -399,11 +394,11 @@ public class AnnotationColumnChooser extends AnnotationRowFilter implements
     }
 
     AnnotationFilterParameter filterParams = new AnnotationFilterParameter();
-    setCurrentAnnotation(av.getAlignment().getAlignmentAnnotation()[getAnnotations()
-            .getSelectedIndex()]);
+    setCurrentAnnotation(av.getAlignment()
+            .getAlignmentAnnotation()[getAnnotations().getSelectedIndex()]);
 
-    int selectedThresholdItem = getSelectedThresholdItem(getThreshold()
-            .getSelectedIndex());
+    int selectedThresholdItem = getSelectedThresholdItem(
+            getThreshold().getSelectedIndex());
 
     slider.setEnabled(true);
     thresholdValue.setEnabled(true);
@@ -421,11 +416,10 @@ public class AnnotationColumnChooser extends AnnotationRowFilter implements
     {
       if (getCurrentAnnotation().threshold == null)
       {
-        getCurrentAnnotation()
-                .setThreshold(
-                        new jalview.datamodel.GraphLine(
-                                (getCurrentAnnotation().graphMax - getCurrentAnnotation().graphMin) / 2f,
-                                "Threshold", Color.black));
+        getCurrentAnnotation().setThreshold(new jalview.datamodel.GraphLine(
+                (getCurrentAnnotation().graphMax
+                        - getCurrentAnnotation().graphMin) / 2f,
+                "Threshold", Color.black));
       }
 
       adjusting = true;
@@ -434,7 +428,8 @@ public class AnnotationColumnChooser extends AnnotationRowFilter implements
 
       slider.setMinimum((int) (getCurrentAnnotation().graphMin * 1000));
       slider.setMaximum((int) (getCurrentAnnotation().graphMax * 1000));
-      slider.setValue((int) (getCurrentAnnotation().threshold.value * 1000));
+      slider.setValue(
+              (int) (getCurrentAnnotation().threshold.value * 1000));
       setThresholdValueText();
       // slider.setMajorTickSpacing((int) (range / 10f));
       slider.setEnabled(true);
@@ -443,8 +438,8 @@ public class AnnotationColumnChooser extends AnnotationRowFilter implements
       adjusting = false;
 
       // build filter params
-      filterParams
-              .setThresholdType(AnnotationFilterParameter.ThresholdType.NO_THRESHOLD);
+      filterParams.setThresholdType(
+              AnnotationFilterParameter.ThresholdType.NO_THRESHOLD);
       if (getCurrentAnnotation().isQuantitative())
       {
         filterParams
@@ -452,13 +447,13 @@ public class AnnotationColumnChooser extends AnnotationRowFilter implements
 
         if (selectedThresholdItem == AnnotationColourGradient.ABOVE_THRESHOLD)
         {
-          filterParams
-                  .setThresholdType(AnnotationFilterParameter.ThresholdType.ABOVE_THRESHOLD);
+          filterParams.setThresholdType(
+                  AnnotationFilterParameter.ThresholdType.ABOVE_THRESHOLD);
         }
         else if (selectedThresholdItem == AnnotationColourGradient.BELOW_THRESHOLD)
         {
-          filterParams
-                  .setThresholdType(AnnotationFilterParameter.ThresholdType.BELOW_THRESHOLD);
+          filterParams.setThresholdType(
+                  AnnotationFilterParameter.ThresholdType.BELOW_THRESHOLD);
         }
       }
     }
@@ -489,13 +484,13 @@ public class AnnotationColumnChooser extends AnnotationRowFilter implements
         filterParams.setRegexString(currentSearchPanel.searchBox.getText());
         if (currentSearchPanel.displayName.getState())
         {
-          filterParams
-                  .addRegexSearchField(AnnotationFilterParameter.SearchableAnnotationField.DISPLAY_STRING);
+          filterParams.addRegexSearchField(
+                  AnnotationFilterParameter.SearchableAnnotationField.DISPLAY_STRING);
         }
         if (currentSearchPanel.description.getState())
         {
-          filterParams
-                  .addRegexSearchField(AnnotationFilterParameter.SearchableAnnotationField.DESCRIPTION);
+          filterParams.addRegexSearchField(
+                  AnnotationFilterParameter.SearchableAnnotationField.DESCRIPTION);
         }
       }
       else
@@ -642,7 +637,8 @@ public class AnnotationColumnChooser extends AnnotationRowFilter implements
 
     public void syncState()
     {
-      if (aColChooser.getActionOption() == AnnotationColumnChooser.ACTION_OPTION_HIDE)
+      if (aColChooser
+              .getActionOption() == AnnotationColumnChooser.ACTION_OPTION_HIDE)
       {
         furtherAction.select("Hide");
       }
@@ -670,8 +666,8 @@ public class AnnotationColumnChooser extends AnnotationRowFilter implements
     }
   }
 
-  public class StructureFilterPanel extends TitledPanel implements
-          ItemListener
+  public class StructureFilterPanel extends TitledPanel
+          implements ItemListener
   {
     private AnnotationColumnChooser aColChooser;