javatidy
authorjprocter <jprocter@compbio.dundee.ac.uk>
Thu, 7 Jun 2012 17:10:32 +0000 (18:10 +0100)
committerjprocter <jprocter@compbio.dundee.ac.uk>
Thu, 7 Jun 2012 17:10:32 +0000 (18:10 +0100)
src/jalview/gui/AnnotationPanel.java

index 2faba52..e00483d 100755 (executable)
@@ -1,18 +1,18 @@
 /*
  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
  * Copyright (C) 2011 J Procter, AM Waterhouse, J Engelhardt, LM Lui, G Barton, M Clamp, S Searle
- * 
+ *
  * This file is part of Jalview.
- * 
+ *
  * Jalview is free software: you can redistribute it and/or
- * modify it under the terms of the GNU General Public License 
+ * modify it under the terms of the GNU General Public License
  * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
- * 
- * Jalview is distributed in the hope that it will be useful, but 
- * WITHOUT ANY WARRANTY; without even the implied warranty 
- * of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *
+ * Jalview is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  * PURPOSE.  See the GNU General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU General Public License along with Jalview.  If not, see <http://www.gnu.org/licenses/>.
  */
 package jalview.gui;
@@ -20,19 +20,15 @@ package jalview.gui;
 import java.awt.*;
 import java.awt.event.*;
 import java.awt.image.*;
-import java.util.Hashtable;
-
 import javax.swing.*;
 
-import jalview.analysis.AAFrequency;
-import jalview.analysis.StructureFrequency;
 import jalview.datamodel.*;
 import jalview.renderer.AnnotationRenderer;
 import jalview.renderer.AwtRenderPanelI;
 
 /**
  * DOCUMENT ME!
- * 
+ *
  * @author $author$
  * @version $Revision$
  */
@@ -102,7 +98,7 @@ public class AnnotationPanel extends JPanel implements AwtRenderPanelI,
 
   /**
    * Creates a new AnnotationPanel object.
-   * 
+   *
    * @param ap
    *          DOCUMENT ME!
    */
@@ -132,10 +128,11 @@ public class AnnotationPanel extends JPanel implements AwtRenderPanelI,
 
   /**
    * DOCUMENT ME!
-   * 
+   *
    * @param evt
    *          DOCUMENT ME!
    */
+  @Override
   public void adjustmentValueChanged(AdjustmentEvent evt)
   {
     ap.alabels.setScrollOffset(-evt.getValue());
@@ -145,7 +142,7 @@ public class AnnotationPanel extends JPanel implements AwtRenderPanelI,
    * Calculates the height of the annotation displayed in the annotation panel.
    * Callers should normally call the ap.adjustAnnotationHeight method to ensure
    * all annotation associated components are updated correctly.
-   * 
+   *
    */
   public int adjustPanelHeight()
   {
@@ -163,7 +160,7 @@ public class AnnotationPanel extends JPanel implements AwtRenderPanelI,
   /**
    * calculate the height for visible annotation, revalidating bounds where
    * necessary ABSTRACT GUI METHOD
-   * 
+   *
    * @return total height of annotation
    */
   public int calcPanelHeight()
@@ -221,10 +218,11 @@ public class AnnotationPanel extends JPanel implements AwtRenderPanelI,
 
   /**
    * DOCUMENT ME!
-   * 
+   *
    * @param evt
    *          DOCUMENT ME!
    */
+  @Override
   public void actionPerformed(ActionEvent evt)
   {
     AlignmentAnnotation[] aa = av.getAlignment().getAlignmentAnnotation();
@@ -418,10 +416,11 @@ public class AnnotationPanel extends JPanel implements AwtRenderPanelI,
 
   /**
    * DOCUMENT ME!
-   * 
+   *
    * @param evt
    *          DOCUMENT ME!
    */
+  @Override
   public void mousePressed(MouseEvent evt)
   {
 
@@ -510,10 +509,11 @@ public class AnnotationPanel extends JPanel implements AwtRenderPanelI,
 
   /**
    * DOCUMENT ME!
-   * 
+   *
    * @param evt
    *          DOCUMENT ME!
    */
+  @Override
   public void mouseReleased(MouseEvent evt)
   {
     graphStretch = -1;
@@ -524,10 +524,11 @@ public class AnnotationPanel extends JPanel implements AwtRenderPanelI,
 
   /**
    * DOCUMENT ME!
-   * 
+   *
    * @param evt
    *          DOCUMENT ME!
    */
+  @Override
   public void mouseEntered(MouseEvent evt)
   {
     ap.scalePanel.mouseEntered(evt);
@@ -535,10 +536,11 @@ public class AnnotationPanel extends JPanel implements AwtRenderPanelI,
 
   /**
    * DOCUMENT ME!
-   * 
+   *
    * @param evt
    *          DOCUMENT ME!
    */
+  @Override
   public void mouseExited(MouseEvent evt)
   {
     ap.scalePanel.mouseExited(evt);
@@ -546,10 +548,11 @@ public class AnnotationPanel extends JPanel implements AwtRenderPanelI,
 
   /**
    * DOCUMENT ME!
-   * 
+   *
    * @param evt
    *          DOCUMENT ME!
    */
+  @Override
   public void mouseDragged(MouseEvent evt)
   {
     if (graphStretch > -1)
@@ -572,10 +575,11 @@ public class AnnotationPanel extends JPanel implements AwtRenderPanelI,
 
   /**
    * DOCUMENT ME!
-   * 
+   *
    * @param evt
    *          DOCUMENT ME!
    */
+  @Override
   public void mouseMoved(MouseEvent evt)
   {
     AlignmentAnnotation[] aa = av.getAlignment().getAlignmentAnnotation();
@@ -618,7 +622,7 @@ public class AnnotationPanel extends JPanel implements AwtRenderPanelI,
     }
 
     if (row > -1 && aa[row].annotations != null
-            && res < (int) aa[row].annotations.length)
+            && res < aa[row].annotations.length)
     {
       if (aa[row].graphGroup > -1)
       {
@@ -671,10 +675,11 @@ public class AnnotationPanel extends JPanel implements AwtRenderPanelI,
 
   /**
    * DOCUMENT ME!
-   * 
+   *
    * @param evt
    *          DOCUMENT ME!
    */
+  @Override
   public void mouseClicked(MouseEvent evt)
   {
     if (activeRow != -1)
@@ -713,10 +718,11 @@ public class AnnotationPanel extends JPanel implements AwtRenderPanelI,
 
   /**
    * DOCUMENT ME!
-   * 
+   *
    * @param g
    *          DOCUMENT ME!
    */
+  @Override
   public void paintComponent(Graphics g)
   {
     g.setColor(Color.white);
@@ -760,7 +766,7 @@ public class AnnotationPanel extends JPanel implements AwtRenderPanelI,
 
   /**
    * non-Thread safe repaint
-   * 
+   *
    * @param horizontal
    *          repaint with horizontal shift in alignment
    */
@@ -804,7 +810,7 @@ public class AnnotationPanel extends JPanel implements AwtRenderPanelI,
 
   /**
    * DOCUMENT ME!
-   * 
+   *
    * @param g
    *          DOCUMENT ME!
    * @param startRes