X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fappletgui%2FAnnotationColumnChooser.java;fp=src%2Fjalview%2Fappletgui%2FAnnotationColumnChooser.java;h=b4c1d54dabea6c3d29ee229b3441a06567dbfb32;hb=daf64249356f9a156423bd56ab0336d9da2e5325;hp=3a7188ea47d3aa8966a830ed9032bec812a17ad1;hpb=4f9c22055c3cdbfc9c4375dcb74755a89ec32b62;p=jalview.git diff --git a/src/jalview/appletgui/AnnotationColumnChooser.java b/src/jalview/appletgui/AnnotationColumnChooser.java index 3a7188e..b4c1d54 100644 --- a/src/jalview/appletgui/AnnotationColumnChooser.java +++ b/src/jalview/appletgui/AnnotationColumnChooser.java @@ -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;