X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=test%2Fjalview%2Fgui%2FColourMenuHelperTest.java;h=89e3ad8ef435f78ca4a46c5681ac771a96c93df9;hb=c1e71094304dcd2b975c485416ec5e25cca30815;hp=5128fe5eb57cb95dce306d1390291ebf5dc27f73;hpb=e0f2d3774e2392feed462fa1707d0fb10602a1e1;p=jalview.git
diff --git a/test/jalview/gui/ColourMenuHelperTest.java b/test/jalview/gui/ColourMenuHelperTest.java
index 5128fe5..89e3ad8 100644
--- a/test/jalview/gui/ColourMenuHelperTest.java
+++ b/test/jalview/gui/ColourMenuHelperTest.java
@@ -1,3 +1,23 @@
+/*
+ * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
+ * Copyright (C) $$Year-Rel$$ The Jalview Authors
+ *
+ * This file is part of Jalview.
+ *
+ * Jalview is free software: you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation, either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * Jalview is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE. See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Jalview. If not, see .
+ * The Jalview Authors are detailed in the 'AUTHORS' file.
+ */
package jalview.gui;
import static org.testng.Assert.assertEquals;
@@ -119,7 +139,7 @@ public class ColourMenuHelperTest
PopupMenu popup = new PopupMenu(af.alignPanel, s1, null);
ButtonGroup bg = ColourMenuHelper.addMenuItems(menu, popup, al, false);
Enumeration bgElements = bg.getElements();
-
+
/*
* first entry is 'No Colour' option
*/
@@ -128,7 +148,7 @@ public class ColourMenuHelperTest
assertEquals(item.getText(), MessageManager.getString("label.none"));
AbstractButton bgItem = bgElements.nextElement();
assertSame(bgItem, item);
-
+
/*
* check that each registered colour scheme is in the menu,
* and in the button group;
@@ -159,7 +179,7 @@ public class ColourMenuHelperTest
{
assertTrue(enabled);
}
-
+
/*
* check i18n for display name
*/
@@ -167,7 +187,7 @@ public class ColourMenuHelperTest
name);
assertEquals(item.getText(), label);
}
-
+
/*
* check nothing left over
*/
@@ -188,10 +208,10 @@ public class ColourMenuHelperTest
SequenceI s1 = new Sequence("s1", "KFRQSILM");
AlignmentI al = new Alignment(new SequenceI[] { s1 });
JMenu menu = new JMenu();
-
+
ButtonGroup bg = ColourMenuHelper.addMenuItems(menu, null, al, true);
Enumeration bgElements = bg.getElements();
-
+
/*
* check that only 'simple' colour schemes are included
*/
@@ -209,7 +229,7 @@ public class ColourMenuHelperTest
AbstractButton bgItem = bgElements.nextElement();
assertSame(bgItem, item);
}
-
+
/*
* check nothing left over
*/
@@ -227,10 +247,10 @@ public class ColourMenuHelperTest
AlignmentI al = new Alignment(new SequenceI[] { s1 });
AlignFrame af = new AlignFrame(al, 500, 500);
JMenu menu = new JMenu();
-
+
ButtonGroup bg = ColourMenuHelper.addMenuItems(menu, af, al, false);
Enumeration bgElements = bg.getElements();
-
+
/*
* check that each registered colour scheme is in the menu,
* (skipping over No Colour which is the first menu item),
@@ -248,7 +268,7 @@ public class ColourMenuHelperTest
ColourSchemeI cs = colourSchemes.next();
assertEquals(item.getName(), cs.getSchemeName());
}
-
+
/*
* check menu also has User Defined Colour
*/