From: Jim Procter Date: Wed, 27 Jul 2016 09:29:46 +0000 (+0100) Subject: JAL-2156 getter for AlignFrame(s) held in a splitframe X-Git-Tag: Release_2_10_0~125^2~4^2~3 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=e57835ed5004395b7785f2f79a85261187a1741b;p=jalview.git JAL-2156 getter for AlignFrame(s) held in a splitframe --- diff --git a/src/jalview/gui/SplitFrame.java b/src/jalview/gui/SplitFrame.java index 3b96be8..c1039ee 100644 --- a/src/jalview/gui/SplitFrame.java +++ b/src/jalview/gui/SplitFrame.java @@ -37,6 +37,8 @@ import java.awt.event.KeyAdapter; import java.awt.event.KeyEvent; import java.awt.event.KeyListener; import java.beans.PropertyVetoException; +import java.util.Arrays; +import java.util.List; import java.util.Map.Entry; import javax.swing.AbstractAction; @@ -710,6 +712,17 @@ public class SplitFrame extends GSplitFrame implements SplitContainerI } /** + * return the AlignFrames held by this container + * + * @return { Top alignFrame (Usually CDS), Bottom AlignFrame (Usually + * Protein)} + */ + public List getAlignFrames() + { + return Arrays.asList(new AlignFrame[] { (AlignFrame) getTopFrame(), + (AlignFrame) getBottomFrame() }); + } + /** * Replace Cmd-F Find action with our version. This is necessary because the * 'default' Finder searches in the first AlignFrame it finds. We need it to * search in the half of the SplitFrame that has the mouse.