/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.2b1)
- * Copyright (C) 2014 The Jalview Authors
+ * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
+ * Copyright (C) $$Year-Rel$$ The Jalview Authors
*
* This file is part of Jalview.
*
*/
package jalview.appletgui;
-import java.util.*;
-
-import java.awt.*;
-import java.awt.event.*;
-
-import jalview.datamodel.*;
-import jalview.schemes.*;
+import jalview.datamodel.SequenceGroup;
+import jalview.schemes.AnnotationColourGradient;
+import jalview.schemes.ColourSchemeI;
import jalview.util.MessageManager;
+import java.awt.BorderLayout;
+import java.awt.Button;
+import java.awt.Checkbox;
+import java.awt.Choice;
+import java.awt.Color;
+import java.awt.Dimension;
+import java.awt.FlowLayout;
+import java.awt.Font;
+import java.awt.Frame;
+import java.awt.Panel;
+import java.awt.Scrollbar;
+import java.awt.TextField;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.AdjustmentEvent;
+import java.awt.event.AdjustmentListener;
+import java.awt.event.ItemEvent;
+import java.awt.event.ItemListener;
+import java.awt.event.MouseEvent;
+import java.awt.event.MouseListener;
+import java.util.Hashtable;
+import java.util.Vector;
+
public class AnnotationColourChooser extends Panel implements
ActionListener, AdjustmentListener, ItemListener, MouseListener
{
{
String label = av.getAlignment().getAlignmentAnnotation()[i].label;
if (!list.contains(label))
+ {
list.addElement(label);
+ }
else
+ {
list.addElement(label + "_" + (index++));
+ }
}
for (int i = 0; i < list.size(); i++)
threshold.select(1);
break;
default:
- throw new Error(MessageManager.getString("error.implementation_error_dont_know_thereshold_annotationcolourgradient"));
+ throw new Error(
+ MessageManager
+ .getString("error.implementation_error_dont_know_thereshold_annotationcolourgradient"));
}
thresholdIsMin.setState(acg.thresholdIsMinMax);
thresholdValue.setText("" + acg.getAnnotationThreshold());
}
else if (evt.getSource() == ok)
{
- changeColour();
frame.setVisible(false);
}
else if (evt.getSource() == cancel)
{
if (!adjusting)
{
- thresholdValue.setText(((float) slider.getValue() / 1000f) + "");
+ thresholdValue.setText((slider.getValue() / 1000f) + "");
if (currentColours.getState()
&& !(av.getGlobalColourScheme() instanceof AnnotationColourGradient))
{
changeColour();
}
- currentAnnotation.threshold.value = (float) slider.getValue() / 1000f;
+ currentAnnotation.threshold.value = slider.getValue() / 1000f;
ap.paintAlignment(false);
}
}