JAL-4155 Replace unsafe casting to AlignmentPanel with generics
[jalview.git] / src / jalview / gui / AlignViewport.java
index 79a16ba..04618af 100644 (file)
@@ -72,7 +72,7 @@ import javax.swing.JInternalFrame;
  * @author $author$
  * @version $Revision: 1.141 $
  */
-public class AlignViewport extends AlignmentViewport
+public class AlignViewport extends AlignmentViewport<AlignmentPanel>
         implements SelectionSource
 {
   public final static int NO_SPLIT = 0;
@@ -528,7 +528,6 @@ public class AlignViewport extends AlignmentViewport
                     new HiddenColumns(getAlignment().getHiddenColumns()),
                     this);
   }
-
   
   public boolean getSortByTree()
   {
@@ -539,19 +538,7 @@ public class AlignViewport extends AlignmentViewport
   {
     sortByTree = sort;
   }
-  /**
-   * return the alignPanel containing the given viewport. Use this to get the
-   * components currently handling the given viewport.
-   * 
-   * @param av
-   * @return null or an alignPanel guaranteed to have non-null alignFrame
-   *         reference
-   */
-  
-  public AlignmentPanel getAlignPanel()
-  {
-    return (AlignmentPanel) alignPanel;
-  }
+
   /**
    * Returns the (Desktop) instance of the StructureSelectionManager
    */