X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fappletgui%2FAnnotationColourChooser.java;h=c7b7c6c5e7a23850a72d0201c118bb38e5426b20;hb=refs%2Fheads%2Ffeatures%2FJAL-1264_showHideAnnotations;hp=aa3c821cd9515154c5cc7367bc66843ededacc7a;hpb=47168f025aefdaa044802bd5f8f510ffe43a4808;p=jalview.git diff --git a/src/jalview/appletgui/AnnotationColourChooser.java b/src/jalview/appletgui/AnnotationColourChooser.java index aa3c821..c7b7c6c 100644 --- a/src/jalview/appletgui/AnnotationColourChooser.java +++ b/src/jalview/appletgui/AnnotationColourChooser.java @@ -88,8 +88,9 @@ public class AnnotationColourChooser extends Panel implements if (oldcs instanceof AnnotationColourGradient) { AnnotationColourGradient acg = (AnnotationColourGradient) oldcs; - currentColours.setState(acg.isPredefinedColours() || acg.getBaseColour()!=null); - if (!acg.isPredefinedColours() && acg.getBaseColour()==null) + currentColours.setState(acg.isPredefinedColours() + || acg.getBaseColour() != null); + if (!acg.isPredefinedColours() && acg.getBaseColour() == null) { minColour.setBackground(acg.getMinColour()); maxColour.setBackground(acg.getMaxColour()); @@ -97,7 +98,6 @@ public class AnnotationColourChooser extends Panel implements // seqAssociated.setState(acg.isSeqAssociated()); } - Vector list = new Vector(); int index = 1; for (int i = 0; i < av.getAlignment().getAlignmentAnnotation().length; i++) @@ -114,9 +114,12 @@ public class AnnotationColourChooser extends Panel implements annotations.addItem(list.elementAt(i).toString()); } - threshold.addItem(MessageManager.getString("label.threshold_feature_no_thereshold")); - threshold.addItem(MessageManager.getString("label.threshold_feature_above_thereshold")); - threshold.addItem(MessageManager.getString("label.threshold_feature_below_thereshold")); + threshold.addItem(MessageManager + .getString("label.threshold_feature_no_thereshold")); + threshold.addItem(MessageManager + .getString("label.threshold_feature_above_thereshold")); + threshold.addItem(MessageManager + .getString("label.threshold_feature_below_thereshold")); if (oldcs instanceof AnnotationColourGradient) { @@ -134,8 +137,7 @@ public class AnnotationColourChooser extends Panel implements threshold.select(1); break; default: - throw new Error( - "Implementation error: don't know about threshold setting for current AnnotationColourGradient."); + throw new Error(MessageManager.getString("error.implementation_error_dont_know_thereshold_annotationcolourgradient")); } thresholdIsMin.setState(acg.thresholdIsMinMax); thresholdValue.setText("" + acg.getAnnotationThreshold()); @@ -147,7 +149,8 @@ public class AnnotationColourChooser extends Panel implements frame = new Frame(); frame.add(this); - jalview.bin.JalviewLite.addFrame(frame, MessageManager.getString("label.colour_by_annotation"), 560, + jalview.bin.JalviewLite.addFrame(frame, + MessageManager.getString("label.colour_by_annotation"), 560, 175); validate(); } @@ -202,11 +205,13 @@ public class AnnotationColourChooser extends Panel implements thresholdValue.setEnabled(false); thresholdValue.setColumns(5); currentColours.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11)); - currentColours.setLabel(MessageManager.getString("label.use_original_colours")); + currentColours.setLabel(MessageManager + .getString("label.use_original_colours")); currentColours.addItemListener(this); thresholdIsMin.setBackground(Color.white); - thresholdIsMin.setLabel(MessageManager.getString("label.threshold_minmax")); + thresholdIsMin.setLabel(MessageManager + .getString("label.threshold_minmax")); this.setLayout(borderLayout1); @@ -404,11 +409,11 @@ public class AnnotationColourChooser extends Panel implements .getSelectedIndex()]; int aboveThreshold = -1; - if (threshold.getSelectedIndex()==1) + if (threshold.getSelectedIndex() == 1) { aboveThreshold = AnnotationColourGradient.ABOVE_THRESHOLD; } - else if (threshold.getSelectedIndex()==2) + else if (threshold.getSelectedIndex() == 2) { aboveThreshold = AnnotationColourGradient.BELOW_THRESHOLD; }