From: gmungoc Date: Thu, 22 Sep 2016 13:16:13 +0000 (+0100) Subject: JAL-2216 finalize call super.finalize() X-Git-Tag: Release_2_10_0~39^2^2~9 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=a1eec7b66ee008e700865e1e97d010f057b673d3;p=jalview.git JAL-2216 finalize call super.finalize() --- diff --git a/src/jalview/appletgui/AlignmentPanel.java b/src/jalview/appletgui/AlignmentPanel.java index 34e0cc0..813ab84 100644 --- a/src/jalview/appletgui/AlignmentPanel.java +++ b/src/jalview/appletgui/AlignmentPanel.java @@ -68,7 +68,8 @@ public class AlignmentPanel extends Panel implements AdjustmentListener, // this value is set false when selection area being dragged boolean fastPaint = true; - public void finalize() + @Override + public void finalize() throws Throwable { alignFrame = null; av = null; @@ -80,6 +81,7 @@ public class AlignmentPanel extends Panel implements AdjustmentListener, annotationPanel = null; annotationPanelHolder = null; annotationSpaceFillerHolder = null; + super.finalize(); } public AlignmentPanel(AlignFrame af, final AlignViewport av) @@ -121,6 +123,7 @@ public class AlignmentPanel extends Panel implements AdjustmentListener, addComponentListener(new ComponentAdapter() { + @Override public void componentResized(ComponentEvent evt) { setScrollValues(av.getStartRes(), av.getStartSeq()); @@ -146,6 +149,7 @@ public class AlignmentPanel extends Panel implements AdjustmentListener, final AlignmentPanel ap = this; av.addPropertyChangeListener(new java.beans.PropertyChangeListener() { + @Override public void propertyChange(java.beans.PropertyChangeEvent evt) { if (evt.getPropertyName().equals("alignment")) @@ -538,6 +542,7 @@ public class AlignmentPanel extends Panel implements AdjustmentListener, * automatically adjust annotation panel height for new annotation whilst * ensuring the alignment is still visible. */ + @Override public void adjustAnnotationHeight() { // TODO: display vertical annotation scrollbar if necessary @@ -770,6 +775,7 @@ public class AlignmentPanel extends Panel implements AdjustmentListener, } + @Override public void adjustmentValueChanged(AdjustmentEvent evt) { int oldX = av.getStartRes(); @@ -947,6 +953,7 @@ public class AlignmentPanel extends Panel implements AdjustmentListener, /** * Repaint the alignment and annotations, and, optionally, any overview window */ + @Override public void paintAlignment(boolean updateOverview) { final AnnotationSorter sorter = new AnnotationSorter(getAlignment(), @@ -969,11 +976,13 @@ public class AlignmentPanel extends Panel implements AdjustmentListener, } } + @Override public void update(Graphics g) { paint(g); } + @Override public void paint(Graphics g) { invalidate();