X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fappletgui%2FAnnotationPanel.java;h=45a5f1e18b2ed2226d8172ef7437c76d90e151ca;hb=e8ede151da126e8fe205392c64f1604d80adda6d;hp=492683d61a20891c65d22ec50e14bde1813ba7d7;hpb=42a69102cb90f11498687980f3592ef96a3cf9ea;p=jalview.git diff --git a/src/jalview/appletgui/AnnotationPanel.java b/src/jalview/appletgui/AnnotationPanel.java index 492683d..45a5f1e 100755 --- a/src/jalview/appletgui/AnnotationPanel.java +++ b/src/jalview/appletgui/AnnotationPanel.java @@ -390,7 +390,7 @@ public class AnnotationPanel extends Panel implements AwtRenderPanelI, Adjustmen av.getAlignment().getAlignmentAnnotation()[graphStretch].graphHeight = 0; } graphStretchY = evt.getY(); - calcPanelHeight(); + av.calcPanelHeight(); needValidating = true; ap.paintAlignment(true); } @@ -464,7 +464,7 @@ public class AnnotationPanel extends Panel implements AwtRenderPanelI, Adjustmen public int adjustPanelHeight(boolean repaint) { - int height = calcPanelHeight(); + int height = av.calcPanelHeight(); this.setSize(new Dimension(getSize().width, height)); if (repaint) { @@ -477,54 +477,6 @@ public class AnnotationPanel extends Panel implements AwtRenderPanelI, Adjustmen * ABSTRACT GUI METHOD * @return total height of annotation */ - public int calcPanelHeight() - { - // setHeight of panels - AlignmentAnnotation[] aa = av.getAlignment().getAlignmentAnnotation(); - int height = 0; - - if (aa != null) - { - for (int i = 0; i < aa.length; i++) - { - if (!aa[i].visible) - { - continue; - } - - aa[i].height = 0; - - if (aa[i].hasText) - { - aa[i].height += av.charHeight; - } - - if (aa[i].hasIcons) - { - aa[i].height += 16; - } - - if (aa[i].graph > 0) - { - aa[i].height += aa[i].graphHeight; - } - - if (aa[i].height == 0) - { - aa[i].height = 20; - } - - height += aa[i].height; - } - } - if (height == 0) - { - height = 20; - } - - return height; - - } public void addEditableColumn(int i) {