From e57835ed5004395b7785f2f79a85261187a1741b Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Wed, 27 Jul 2016 10:29:46 +0100 Subject: [PATCH] JAL-2156 getter for AlignFrame(s) held in a splitframe --- src/jalview/gui/SplitFrame.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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. -- 1.7.10.2