*/
package jalview.gui;
+import jalview.api.AlignViewportI;
import jalview.bin.Cache;
import jalview.io.FileLoader;
import jalview.io.FormatAdapter;
}
/**
- * This will return the first AlignFrame viewing AlignViewport av. It will
- * break if there are more than one AlignFrames viewing a particular av.
+ * This will return the AlignFrame holding the given viewport instance. It
+ * will break if there are more than one AlignFrames viewing a particular av.
*
- * @param av
- * @return alignFrame for av
+ * @param viewport
+ * @return alignFrame for viewport
*/
- public static AlignFrame getAlignFrameFor(AlignmentViewport av)
+ public static AlignFrame getAlignFrameFor(AlignViewportI viewport)
{
if (desktop != null)
{
- AlignmentPanel[] aps = getAlignmentPanels(av.getSequenceSetId());
+ AlignmentPanel[] aps = getAlignmentPanels(viewport
+ .getSequenceSetId());
for (int panel = 0; aps != null && panel < aps.length; panel++)
{
- if (aps[panel] != null && aps[panel].av == av)
+ if (aps[panel] != null && aps[panel].av == viewport)
{
return aps[panel].alignFrame;
}