X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fjalview%2Fgui%2FAnnotationPanel.java;h=199c4e599a9ff1e5cc0cf83a272f668e993b91b1;hb=a889a61789f15e79ecde7043cddfdea18ad00166;hp=74505554f45fe802fc4677c2aee01cacd3d7105b;hpb=c73c8c28e34bdcac21e89aa89b69e85dad9e0189;p=jalview.git diff --git a/src/jalview/gui/AnnotationPanel.java b/src/jalview/gui/AnnotationPanel.java index 7450555..199c4e5 100755 --- a/src/jalview/gui/AnnotationPanel.java +++ b/src/jalview/gui/AnnotationPanel.java @@ -123,8 +123,6 @@ public class AnnotationPanel extends JPanel implements AwtRenderPanelI, boolean mouseDragging = false; - boolean MAC = false; - // for editing cursor int cursorX = 0; @@ -142,9 +140,6 @@ public class AnnotationPanel extends JPanel implements AwtRenderPanelI, */ public AnnotationPanel(AlignmentPanel ap) { - - MAC = jalview.util.Platform.isAMac(); - ToolTipManager.sharedInstance().registerComponent(this); ToolTipManager.sharedInstance().setInitialDelay(0); ToolTipManager.sharedInstance().setDismissDelay(10000); @@ -463,8 +458,8 @@ public class AnnotationPanel extends JPanel implements AwtRenderPanelI, String tlabel = null; if (anots[index] != null) { // LML added stem code - if (type.equals(HELIX) || type.equals(SHEET) - || type.equals(STEM) || type.equals(LABEL)) + if (type.equals(HELIX) || type.equals(SHEET) || type.equals(STEM) + || type.equals(LABEL)) { tlabel = anots[index].description; if (tlabel == null || tlabel.length() < 1) @@ -819,8 +814,7 @@ public class AnnotationPanel extends JPanel implements AwtRenderPanelI, { text.append(", ") .append(MessageManager.getString("label.sequence")) - .append(" ") - .append(seqIndex + 1); + .append(" ").append(seqIndex + 1); char residue = seqref.getCharAt(column); if (!Comparison.isGap(residue)) { @@ -1139,4 +1133,25 @@ public class AnnotationPanel extends JPanel implements AwtRenderPanelI, return null; } } + + /** + * Try to ensure any references held are nulled + */ + public void dispose() + { + av = null; + ap = null; + image = null; + fadedImage = null; + gg = null; + _mwl = null; + + /* + * I created the renderer so I will dispose of it + */ + if (renderer != null) + { + renderer.dispose(); + } + } }