From: Jim Procter Date: Wed, 11 Feb 2015 09:16:45 +0000 (+0000) Subject: JAL-969 use AlignViewportI interface instance where ever possible in method signatures X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=e81d431b1905b0613b16a6fda28ac1d1dee40294;p=jalview.git JAL-969 use AlignViewportI interface instance where ever possible in method signatures --- diff --git a/src/jalview/gui/Desktop.java b/src/jalview/gui/Desktop.java index b9e796e..7852253 100644 --- a/src/jalview/gui/Desktop.java +++ b/src/jalview/gui/Desktop.java @@ -20,6 +20,7 @@ */ package jalview.gui; +import jalview.api.AlignViewportI; import jalview.bin.Cache; import jalview.io.FileLoader; import jalview.io.FormatAdapter; @@ -2526,20 +2527,21 @@ public class Desktop extends jalview.jbgui.GDesktop implements } /** - * 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; }