X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=test%2Fjalview%2Fgui%2FAnnotationChooserTest.java;fp=test%2Fjalview%2Fgui%2FAnnotationChooserTest.java;h=f3c0dee6eecac20ceada348ae1d031a44ac82d02;hb=3459a8a691cb22508d7067f240b7254e588e77d3;hp=fbdda0901945fc7a3db67965499eb4ae3eae6f3b;hpb=5b27f1062b2203c4c31702e205f4c78e1992063e;p=jalview.git diff --git a/test/jalview/gui/AnnotationChooserTest.java b/test/jalview/gui/AnnotationChooserTest.java index fbdda09..f3c0dee 100644 --- a/test/jalview/gui/AnnotationChooserTest.java +++ b/test/jalview/gui/AnnotationChooserTest.java @@ -91,8 +91,8 @@ public class AnnotationChooserTest Cache.applicationProperties.setProperty(Preferences.SORT_ANNOTATIONS, SequenceAnnotationOrder.NONE.name()); final String TRUE = Boolean.TRUE.toString(); - Cache.applicationProperties.setProperty( - Preferences.SHOW_AUTOCALC_ABOVE, TRUE); + Cache.applicationProperties.setProperty(Preferences.SHOW_AUTOCALC_ABOVE, + TRUE); Cache.applicationProperties.setProperty("SHOW_QUALITY", TRUE); Cache.applicationProperties.setProperty("SHOW_CONSERVATION", TRUE); Cache.applicationProperties.setProperty("SHOW_IDENTITY", TRUE); @@ -108,11 +108,9 @@ public class AnnotationChooserTest * Add 4 annotations, 3 of them sequence-specific. * *
- * ann1 - for sequence 0 - label 'IUPRED' - * ann2 - not sequence related - label 'Beauty' - * ann3 - for sequence 3 - label 'JMol' - * ann4 - for sequence 2 - label 'IUPRED' - * ann5 - for sequence 1 - label 'JMol' + * ann1 - for sequence 0 - label 'IUPRED' ann2 - not sequence related - label + * 'Beauty' ann3 - for sequence 3 - label 'JMol' ann4 - for sequence 2 - label + * 'IUPRED' ann5 - for sequence 1 - label 'JMol' */ private void addAnnotations() { @@ -184,8 +182,8 @@ public class AnnotationChooserTest assertTrue("Not enabled", cb1.isEnabled()); assertTrue("Not enabled", cb2.isEnabled()); assertTrue("Not enabled", cb3.isEnabled()); - assertEquals("Option not selected", cb2, cb2.getCheckboxGroup() - .getSelectedCheckbox()); + assertEquals("Option not selected", cb2, + cb2.getCheckboxGroup().getSelectedCheckbox()); // check state variables match checkbox selection assertTrue(testee.isApplyToSelectedSequences()); @@ -235,15 +233,16 @@ public class AnnotationChooserTest assertTrue("Not enabled", cb1.isEnabled()); assertFalse("Enabled", cb2.isEnabled()); assertFalse("Enabled", cb3.isEnabled()); - assertEquals("Not selected", cb1, cb1.getCheckboxGroup() - .getSelectedCheckbox()); + assertEquals("Not selected", cb1, + cb1.getCheckboxGroup().getSelectedCheckbox()); // check state variables match checkbox selection assertTrue(testee.isApplyToSelectedSequences()); assertTrue(testee.isApplyToUnselectedSequences()); assertEquals("Wrong text", - MessageManager.getString("label.all_sequences"), cb1.getLabel()); + MessageManager.getString("label.all_sequences"), + cb1.getLabel()); assertEquals("Wrong text", MessageManager.getString("label.selected_sequences"), cb2.getLabel()); @@ -277,8 +276,8 @@ public class AnnotationChooserTest assertTrue("Hide not enabled", cb2.isEnabled()); // Hide (button 2) selected; note this may change to none (null) - assertEquals("Not selected", cb2, cb2.getCheckboxGroup() - .getSelectedCheckbox()); + assertEquals("Not selected", cb2, + cb2.getCheckboxGroup().getSelectedCheckbox()); assertTrue("Show is flagged", !testee.isShowSelected()); @@ -318,14 +317,14 @@ public class AnnotationChooserTest // selection group should make no difference to the result // as all annotation types for the alignment are considered - Listtypes = AnnotationChooser.getAnnotationTypes( - parentPanel.getAlignment(), true); + List types = AnnotationChooser + .getAnnotationTypes(parentPanel.getAlignment(), true); assertEquals("Not two annotation types", 2, types.size()); assertTrue("IUPRED missing", types.contains("IUPRED")); assertTrue("JMol missing", types.contains("JMol")); - types = AnnotationChooser.getAnnotationTypes( - parentPanel.getAlignment(), false); + types = AnnotationChooser.getAnnotationTypes(parentPanel.getAlignment(), + false); assertEquals("Not six annotation types", 7, types.size()); assertTrue("IUPRED missing", types.contains("IUPRED")); assertTrue("JMol missing", types.contains("JMol")); @@ -351,8 +350,8 @@ public class AnnotationChooserTest final Checkbox hideCheckbox = (Checkbox) getComponent(testee, 1, 0, 1); setSelected(hideCheckbox, true); - final Checkbox allSequencesCheckbox = (Checkbox) getComponent(testee, - 1, 1, 0); + final Checkbox allSequencesCheckbox = (Checkbox) getComponent(testee, 1, + 1, 0); setSelected(allSequencesCheckbox, true); AlignmentAnnotation[] anns = parentPanel.getAlignment() @@ -429,8 +428,8 @@ public class AnnotationChooserTest final Checkbox hideCheckbox = (Checkbox) getComponent(testee, 1, 0, 1); setSelected(hideCheckbox, true); - final Checkbox allSequencesCheckbox = (Checkbox) getComponent(testee, - 1, 1, 0); + final Checkbox allSequencesCheckbox = (Checkbox) getComponent(testee, 1, + 1, 0); setSelected(allSequencesCheckbox, true); AlignmentAnnotation[] anns = parentPanel.getAlignment() @@ -521,8 +520,8 @@ public class AnnotationChooserTest final Checkbox showCheckbox = (Checkbox) getComponent(testee, 1, 0, 0); final Checkbox hideCheckbox = (Checkbox) getComponent(testee, 1, 0, 1); - final Checkbox allSequencesCheckbox = (Checkbox) getComponent(testee, - 1, 1, 0); + final Checkbox allSequencesCheckbox = (Checkbox) getComponent(testee, 1, + 1, 0); AlignmentAnnotation[] anns = parentPanel.getAlignment() .getAlignmentAnnotation(); @@ -597,8 +596,8 @@ public class AnnotationChooserTest final Checkbox showCheckbox = (Checkbox) getComponent(testee, 1, 0, 0); setSelected(showCheckbox, true); - final Checkbox allSequencesCheckbox = (Checkbox) getComponent(testee, - 1, 1, 0); + final Checkbox allSequencesCheckbox = (Checkbox) getComponent(testee, 1, + 1, 0); setSelected(allSequencesCheckbox, true); AlignmentAnnotation[] anns = parentPanel.getAlignment() @@ -697,9 +696,9 @@ public class AnnotationChooserTest // TODO refactor to a test utility class cb.setState(select); // have to manually fire the action listener - cb.getItemListeners()[0].itemStateChanged(new ItemEvent(cb, - ItemEvent.ITEM_STATE_CHANGED, cb, select ? ItemEvent.SELECTED - : ItemEvent.DESELECTED)); + cb.getItemListeners()[0].itemStateChanged( + new ItemEvent(cb, ItemEvent.ITEM_STATE_CHANGED, cb, + select ? ItemEvent.SELECTED : ItemEvent.DESELECTED)); } /** @@ -796,8 +795,8 @@ public class AnnotationChooserTest final Checkbox hideCheckbox = (Checkbox) getComponent(testee, 1, 0, 1); setSelected(hideCheckbox, true); - final Checkbox allSequencesCheckbox = (Checkbox) getComponent(testee, - 1, 1, 0); + final Checkbox allSequencesCheckbox = (Checkbox) getComponent(testee, 1, + 1, 0); setSelected(allSequencesCheckbox, true); setSelected(getTypeCheckbox("JMol"), true);