X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fappletgui%2FAnnotationPanel.java;h=d5334982a657c2480f39b89a6fbb3938d0ac76fc;hb=e7ddb4e421ed93f92b6a94f13f11c6f5677e2a0b;hp=f068a3cc35405cd9af13cf73ac7910a6536e0d5a;hpb=4e6c8d302a9df7012789e755e23d7a9b3f5d35bf;p=jalview.git diff --git a/src/jalview/appletgui/AnnotationPanel.java b/src/jalview/appletgui/AnnotationPanel.java index f068a3c..d533498 100755 --- a/src/jalview/appletgui/AnnotationPanel.java +++ b/src/jalview/appletgui/AnnotationPanel.java @@ -113,7 +113,7 @@ public class AnnotationPanel extends Panel implements AwtRenderPanelI, Adjustmen */ public void actionPerformed(ActionEvent evt) { - AlignmentAnnotation[] aa = av.alignment.getAlignmentAnnotation(); + AlignmentAnnotation[] aa = av.getAlignment().getAlignmentAnnotation(); if (aa == null) { return; @@ -129,8 +129,8 @@ public class AnnotationPanel extends Panel implements AwtRenderPanelI, Adjustmen } String label = ""; - if (av.colSel != null && av.colSel.size() > 0 - && anot[av.colSel.getMin()] != null) + if (av.getColumnSelection() != null && av.getColumnSelection().size() > 0 + && anot[av.getColumnSelection().getMin()] != null) label = anot[av.getColumnSelection().getMin()].displayCharacter; if (evt.getActionCommand().equals(REMOVE)) @@ -158,7 +158,7 @@ public class AnnotationPanel extends Panel implements AwtRenderPanelI, Adjustmen { int index = av.getColumnSelection().columnAt(i); - if (!av.colSel.isVisible(index)) + if (!av.getColumnSelection().isVisible(index)) continue; if (anot[index] == null) @@ -180,7 +180,7 @@ public class AnnotationPanel extends Panel implements AwtRenderPanelI, Adjustmen { int index = av.getColumnSelection().columnAt(i); - if (!av.colSel.isVisible(index)) + if (!av.getColumnSelection().isVisible(index)) continue; if (anot[index] == null) @@ -228,7 +228,7 @@ public class AnnotationPanel extends Panel implements AwtRenderPanelI, Adjustmen { int index = av.getColumnSelection().columnAt(i); - if (!av.colSel.isVisible(index)) + if (!av.getColumnSelection().isVisible(index)) continue; if (anot[index] == null) @@ -260,7 +260,7 @@ public class AnnotationPanel extends Panel implements AwtRenderPanelI, Adjustmen public void mousePressed(MouseEvent evt) { - AlignmentAnnotation[] aa = av.alignment.getAlignmentAnnotation(); + AlignmentAnnotation[] aa = av.getAlignment().getAlignmentAnnotation(); if (aa == null) { return; @@ -354,11 +354,11 @@ public class AnnotationPanel extends Panel implements AwtRenderPanelI, Adjustmen { if (graphStretch > -1) { - av.alignment.getAlignmentAnnotation()[graphStretch].graphHeight += graphStretchY + av.getAlignment().getAlignmentAnnotation()[graphStretch].graphHeight += graphStretchY - evt.getY(); - if (av.alignment.getAlignmentAnnotation()[graphStretch].graphHeight < 0) + if (av.getAlignment().getAlignmentAnnotation()[graphStretch].graphHeight < 0) { - av.alignment.getAlignmentAnnotation()[graphStretch].graphHeight = 0; + av.getAlignment().getAlignmentAnnotation()[graphStretch].graphHeight = 0; } graphStretchY = evt.getY(); calcPanelHeight(); @@ -373,7 +373,7 @@ public class AnnotationPanel extends Panel implements AwtRenderPanelI, Adjustmen public void mouseMoved(MouseEvent evt) { - AlignmentAnnotation[] aa = av.alignment.getAlignmentAnnotation(); + AlignmentAnnotation[] aa = av.getAlignment().getAlignmentAnnotation(); if (aa == null) { return; @@ -398,7 +398,7 @@ public class AnnotationPanel extends Panel implements AwtRenderPanelI, Adjustmen int res = evt.getX() / av.getCharWidth() + av.getStartRes(); - if (av.hasHiddenColumns) + if (av.hasHiddenColumns()) { res = av.getColumnSelection().adjustForHiddenColumns(res); } @@ -448,7 +448,7 @@ public class AnnotationPanel extends Panel implements AwtRenderPanelI, Adjustmen public int calcPanelHeight() { // setHeight of panels - AlignmentAnnotation[] aa = av.alignment.getAlignmentAnnotation(); + AlignmentAnnotation[] aa = av.getAlignment().getAlignmentAnnotation(); int height = 0; if (aa != null) @@ -498,7 +498,7 @@ public class AnnotationPanel extends Panel implements AwtRenderPanelI, Adjustmen { if (activeRow == -1) { - AlignmentAnnotation[] aa = av.alignment.getAlignmentAnnotation(); + AlignmentAnnotation[] aa = av.getAlignment().getAlignmentAnnotation(); if (aa == null) { return; @@ -563,8 +563,8 @@ public class AnnotationPanel extends Panel implements AwtRenderPanelI, Adjustmen public void fastPaint(int horizontal) { - if (horizontal == 0 || av.alignment.getAlignmentAnnotation() == null - || av.alignment.getAlignmentAnnotation().length < 1) + if (horizontal == 0 || av.getAlignment().getAlignmentAnnotation() == null + || av.getAlignment().getAlignmentAnnotation().length < 1) { repaint(); return; @@ -617,8 +617,8 @@ public class AnnotationPanel extends Panel implements AwtRenderPanelI, Adjustmen fm = g.getFontMetrics(); } - if ((av.alignment.getAlignmentAnnotation() == null) - || (av.alignment.getAlignmentAnnotation().length < 1)) + if ((av.getAlignment().getAlignmentAnnotation() == null) + || (av.getAlignment().getAlignmentAnnotation().length < 1)) { g.setColor(Color.white); g.fillRect(0, 0, getSize().width, getSize().height);