import java.awt.Font;
import java.awt.FontMetrics;
-public class AlignViewport extends AlignmentViewport
+public class AlignViewport extends AlignmentViewport<AlignmentPanel>
implements SelectionSource
{
boolean cursorMode = false;
* @author $author$
* @version $Revision: 1.141 $
*/
-public class AlignViewport extends AlignmentViewport
+public class AlignViewport extends AlignmentViewport<AlignmentPanel>
implements SelectionSource
{
Font font;
new HiddenColumns(getAlignment().getHiddenColumns()),
this);
}
-
public boolean getSortByTree()
{
{
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
*/
*
* @author jimp
*
+ * @param <AlignmentPanelT>
+ * implementation of the AlignmentViewPanel used by the class
*/
-public abstract class AlignmentViewport
+public abstract class AlignmentViewport<AlignmentPanelT extends AlignmentViewPanel>
implements AlignViewportI, CommandListener, VamsasSource
{
protected ViewportRanges ranges;
ranges = new ViewportRanges(al);
}
- protected AlignmentViewPanel alignPanel=null;
- public void setAlignPanel(AlignmentViewPanel ap)
+ protected AlignmentPanelT alignPanel = null;
+
+ public void setAlignPanel(AlignmentPanelT ap)
{
alignPanel = ap;
}
+
/**
- * return the AlignmentViewPanel containing the given viewport. Use this to get the
- * components currently handling the given viewport.
+ * return the AlignmentViewPanel 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 AlignmentViewPanel getAlignPanel()
+ public AlignmentPanelT getAlignPanel()
{
return alignPanel;
}
+
/**
* @param name
* @see jalview.api.ViewStyleI#setFontName(java.lang.String)