From: jprocter Date: Fri, 4 Feb 2011 11:34:20 +0000 (+0000) Subject: 1.2ish awt methods and excluding unused code X-Git-Tag: Release_2_7~269 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=dca8d7b5caa5c263b01d7750098da075c892c9f4;p=jalview.git 1.2ish awt methods and excluding unused code --- diff --git a/src/jalview/appletgui/AlignmentPanel.java b/src/jalview/appletgui/AlignmentPanel.java index d8e03f7..05ecdcc 100755 --- a/src/jalview/appletgui/AlignmentPanel.java +++ b/src/jalview/appletgui/AlignmentPanel.java @@ -836,7 +836,7 @@ public class AlignmentPanel extends Panel implements AdjustmentListener { // TODO: display vertical annotation scrollbar if necessary // this is called after loading new annotation onto alignment - if (alignFrame.getHeight() == 0) + if (alignFrame.getSize().height == 0) { System.out.println("NEEDS FIXING"); } @@ -858,11 +858,12 @@ public class AlignmentPanel extends Panel implements AdjustmentListener apvscroll.addNotify(); hscroll.addNotify(); - annotationPanelHolder.setPreferredSize(new Dimension(annotationPanel - .getWidth(), height)); + annotationPanelHolder.setSize(new Dimension(annotationPanel + .getSize().width, height)); - annotationSpaceFillerHolder.setPreferredSize(new Dimension( - annotationSpaceFillerHolder.getWidth(), height)); + annotationSpaceFillerHolder.setSize(new Dimension( + annotationSpaceFillerHolder.getSize().width + , height)); //annotationScroller.validate();// repaint(); validate(); diff --git a/src/jalview/appletgui/AnnotationLabels.java b/src/jalview/appletgui/AnnotationLabels.java index 2bdf06b..cef84cc 100755 --- a/src/jalview/appletgui/AnnotationLabels.java +++ b/src/jalview/appletgui/AnnotationLabels.java @@ -275,9 +275,9 @@ public class AnnotationLabels extends Panel implements ActionListener, if ((d.height - dif) > 20) { - setPreferredSize(new Dimension(e.width,d.height-dif)); - ap.annotationSpaceFillerHolder.setPreferredSize(new Dimension(e.width, d.height - dif)); - ap.annotationPanelHolder.setPreferredSize(new Dimension(d.width, d.height - dif)); + setSize(new Dimension(e.width,d.height-dif)); + ap.annotationSpaceFillerHolder.setSize(new Dimension(e.width, d.height - dif)); + ap.annotationPanelHolder.setSize(new Dimension(d.width, d.height - dif)); ap.apvscroll.setValues(ap.apvscroll.getValue(), d.height-dif, 0, ap.annotationPanel.adjustPanelHeight(false)); ap.validate(); diff --git a/src/jalview/appletgui/AnnotationPanel.java b/src/jalview/appletgui/AnnotationPanel.java index 11a957a..b09e9ef 100755 --- a/src/jalview/appletgui/AnnotationPanel.java +++ b/src/jalview/appletgui/AnnotationPanel.java @@ -469,7 +469,7 @@ public class AnnotationPanel extends Panel implements AdjustmentListener, { height = 20; } - this.setPreferredSize(new Dimension(getSize().width, height)); + this.setSize(new Dimension(getSize().width, height)); if (repaint) { repaint();