From: amwaterhouse Date: Wed, 15 Feb 2006 15:25:27 +0000 (+0000) Subject: Threshold single element X-Git-Tag: Root_VamJalview_2_07b+~128 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=90b2653fcf34862d9c3d6a48eebce0428bc6e331;p=jalview.git Threshold single element --- diff --git a/src/jalview/gui/AnnotationColourChooser.java b/src/jalview/gui/AnnotationColourChooser.java index 06040a6..25eee10 100755 --- a/src/jalview/gui/AnnotationColourChooser.java +++ b/src/jalview/gui/AnnotationColourChooser.java @@ -221,9 +221,9 @@ public class AnnotationColourChooser else if(threshold.getSelectedItem().equals("Below Threshold")) aboveThreshold = AnnotationColourGradient.BELOW_THRESHOLD; - if(aboveThreshold!=AnnotationColourGradient.NO_THRESHOLD && aa.graphLines==null) + if(aboveThreshold!=AnnotationColourGradient.NO_THRESHOLD && aa.threshold==null) { - aa.addGraphLine(new jalview.datamodel.GraphLine((aa.graphMax-aa.graphMin)/2f, "Threshold", Color.black)); + aa.setThreshold(new jalview.datamodel.GraphLine((aa.graphMax-aa.graphMin)/2f, "Threshold", Color.black)); } AnnotationColourGradient acg = new AnnotationColourGradient(aa, diff --git a/src/jalview/gui/AnnotationLabels.java b/src/jalview/gui/AnnotationLabels.java index 1068980..bffa89a 100755 --- a/src/jalview/gui/AnnotationLabels.java +++ b/src/jalview/gui/AnnotationLabels.java @@ -449,7 +449,7 @@ public class AnnotationLabels extends JPanel implements MouseListener, if (aa[i].graph>0) { - if (aa[i].graphLines != null) + /* if (aa[i].graphLines != null) { for (int gl = 0; gl < aa[i].graphLines.size(); gl++) { @@ -470,7 +470,7 @@ public class AnnotationLabels extends JPanel implements MouseListener, graphExtras); g2.setStroke(new BasicStroke()); } - } + }*/ y += ((2 * aa[i].height) / 3); } else diff --git a/src/jalview/gui/AnnotationPanel.java b/src/jalview/gui/AnnotationPanel.java index f30c41c..41479aa 100755 --- a/src/jalview/gui/AnnotationPanel.java +++ b/src/jalview/gui/AnnotationPanel.java @@ -364,8 +364,7 @@ public class AnnotationPanel extends JPanel implements MouseListener, else if(aa[i].graph>0) { if(SwingUtilities.isRightMouseButton(evt) - && aa[i].graphLines!=null - && aa[i].graphLines.size()>0) + && aa[i].threshold!=null) { SliderPanel sp = new SliderPanel(aa[i], ap); return; @@ -978,21 +977,18 @@ public class AnnotationPanel extends JPanel implements MouseListener, g.drawLine(x-av.charWidth,y2,(eRes-sRes+1)*av.charWidth,y2); - if(aa.graphLines!=null) + if(aa.threshold!=null) { - for(int l=0; l