X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fappletgui%2FAlignmentPanel.java;h=a677eff2ece24d8755e0acddd0005337c3e9dcc5;hb=7ab5d6b0ba5fec1ea4a4239e79c476d841622485;hp=fd03e3029c52a63db3846c0d0d558170e7ad3ad9;hpb=1889827c44c51f6353fe8619e5d44b421158af23;p=jalview.git diff --git a/src/jalview/appletgui/AlignmentPanel.java b/src/jalview/appletgui/AlignmentPanel.java index fd03e30..a677eff 100644 --- a/src/jalview/appletgui/AlignmentPanel.java +++ b/src/jalview/appletgui/AlignmentPanel.java @@ -435,7 +435,9 @@ public class AlignmentPanel extends Panel implements AdjustmentListener, { annotationSpaceFillerHolder.setVisible(b); annotationPanelHolder.setVisible(b); - } else { + } + else + { annotationSpaceFillerHolder.setVisible(false); annotationPanelHolder.setVisible(false); } @@ -486,10 +488,12 @@ public class AlignmentPanel extends Panel implements AdjustmentListener, if (adjustPanelHeight) { - // NOTE: this logic is different in the application. Need a better algorithm to define behaviour + // NOTE: this logic is different in the application. Need a better + // algorithm to define behaviour // sets initial preferred height // try and set height according to alignment - float sscaling = (float) ((av.getCharHeight() * av.getAlignment().getHeight())/(1.0*mheight)); + float sscaling = (float) ((av.getCharHeight() * av.getAlignment() + .getHeight()) / (1.0 * mheight)); if (sscaling > 0.5) { // if the alignment is too big then @@ -498,7 +502,7 @@ public class AlignmentPanel extends Panel implements AdjustmentListener, } else { - // otherwise just set the panel so that one row of sequence is visible + // otherwise just set the panel so that one row of sequence is visible height = -av.getCharHeight() * 1 + (int) (seqandannot * (1 - sscaling)); } @@ -549,7 +553,7 @@ public class AlignmentPanel extends Panel implements AdjustmentListener, annotationPanelHolder.setVisible(true); annotationSpaceFillerHolder.setVisible(true); } - + idSpaceFillerPanel1.setVisible(!wrap); fontChanged(); // This is so that the scalePanel is resized correctly @@ -825,7 +829,7 @@ public class AlignmentPanel extends Panel implements AdjustmentListener, seqPanel.seqCanvas.repaint(); idPanel.idCanvas.repaint(); - if (!av.wrapAlignment) + if (!av.wrapAlignment) { if (av.showAnnotation) { @@ -834,7 +838,7 @@ public class AlignmentPanel extends Panel implements AdjustmentListener, } scalePanel.repaint(); } - + } protected Panel sequenceHolderPanel = new Panel();