X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fjalview%2Fgui%2FAnnotationChooser.java;h=35b603255e7a2185e5b2fc064a698273feb78db6;hb=17e77c3f2949a0729322b4a8d907f3f34b6a9914;hp=33c49929919351620eb6954c14d8d63ef48ff825;hpb=b4e0958489010d048a9247dad7b45791e633a1dc;p=jalview.git
diff --git a/src/jalview/gui/AnnotationChooser.java b/src/jalview/gui/AnnotationChooser.java
index 33c4992..35b6032 100644
--- a/src/jalview/gui/AnnotationChooser.java
+++ b/src/jalview/gui/AnnotationChooser.java
@@ -1,3 +1,23 @@
+/*
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.9)
+ * Copyright (C) 2015 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 jalview.datamodel.AlignmentAnnotation;
@@ -62,7 +82,7 @@ public class AnnotationChooser extends JPanel
// currently selected 'annotation type' checkboxes
private Map selectedTypes = new HashMap();
-
+
/**
* Constructor.
*
@@ -388,7 +408,7 @@ public class AnnotationChooser extends JPanel
final boolean wholeAlignment = this.sg == null;
JPanel applyToOptions = new JPanel(new FlowLayout(FlowLayout.LEFT));
CheckboxGroup actingOn = new CheckboxGroup();
-
+
String forAll = MessageManager.getString("label.all_sequences");
final Checkbox allSequences = new Checkbox(forAll, actingOn,
wholeAlignment);
@@ -397,7 +417,8 @@ public class AnnotationChooser extends JPanel
@Override
public void itemStateChanged(ItemEvent evt)
{
- if (evt.getStateChange() == ItemEvent.SELECTED) {
+ if (evt.getStateChange() == ItemEvent.SELECTED)
+ {
AnnotationChooser.this.setApplyToSelectedSequences(true);
AnnotationChooser.this.setApplyToUnselectedSequences(true);
AnnotationChooser.this.changeApplyTo_actionPerformed();
@@ -405,7 +426,7 @@ public class AnnotationChooser extends JPanel
}
});
applyToOptions.add(allSequences);
-
+
String forSelected = MessageManager
.getString("label.selected_sequences");
final Checkbox selectedSequences = new Checkbox(forSelected, actingOn,
@@ -425,10 +446,11 @@ public class AnnotationChooser extends JPanel
}
});
applyToOptions.add(selectedSequences);
-
+
String exceptSelected = MessageManager
.getString("label.except_selected_sequences");
- final Checkbox unselectedSequences = new Checkbox(exceptSelected, actingOn, false);
+ final Checkbox unselectedSequences = new Checkbox(exceptSelected,
+ actingOn, false);
unselectedSequences.setEnabled(!wholeAlignment);
unselectedSequences.addItemListener(new ItemListener()
{
@@ -444,7 +466,7 @@ public class AnnotationChooser extends JPanel
}
});
applyToOptions.add(unselectedSequences);
-
+
// set member variables to match the initial selection state
this.applyToSelectedSequences = selectedSequences.getState()
|| allSequences.getState();
@@ -476,7 +498,8 @@ public class AnnotationChooser extends JPanel
@Override
public void itemStateChanged(ItemEvent evt)
{
- if (evt.getStateChange() == ItemEvent.SELECTED) {
+ if (evt.getStateChange() == ItemEvent.SELECTED)
+ {
AnnotationChooser.this.setShowSelected(true);
AnnotationChooser.this.changeShowHide_actionPerformed();
}
@@ -521,7 +544,7 @@ public class AnnotationChooser extends JPanel
{
JPanel jp = new JPanel();
final Font labelFont = JvSwingUtils.getLabelFont();
-
+
JButton ok = new JButton(MessageManager.getString("action.ok"));
ok.setFont(labelFont);
ok.addActionListener(new ActionListener()
@@ -533,7 +556,7 @@ public class AnnotationChooser extends JPanel
}
});
jp.add(ok);
-
+
JButton cancel = new JButton(MessageManager.getString("action.cancel"));
cancel.setFont(labelFont);
cancel.addActionListener(new ActionListener()