From 250bde7b9fadd710cec37da08ac0526cda74e312 Mon Sep 17 00:00:00 2001 From: tjc <tjc@ee4ac58c-ac51-4696-9907-e4b3aa274f04> Date: Thu, 23 Oct 2008 14:44:28 +0000 Subject: [PATCH] fix git-svn-id: svn+ssh://svn.internal.sanger.ac.uk/repos/svn/pathsoft/artemis/trunk@9087 ee4ac58c-ac51-4696-9907-e4b3aa274f04 --- .../artemis/components/FeatureList.java | 29 ++++++++++++++++--- 1 file changed, 25 insertions(+), 4 deletions(-) diff --git a/uk/ac/sanger/artemis/components/FeatureList.java b/uk/ac/sanger/artemis/components/FeatureList.java index abda3a9b7..fcd3a0f5a 100644 --- a/uk/ac/sanger/artemis/components/FeatureList.java +++ b/uk/ac/sanger/artemis/components/FeatureList.java @@ -20,7 +20,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * - * $Header: //tmp/pathsoft/artemis/uk/ac/sanger/artemis/components/FeatureList.java,v 1.27 2008-10-23 14:38:55 tjc Exp $ + * $Header: //tmp/pathsoft/artemis/uk/ac/sanger/artemis/components/FeatureList.java,v 1.28 2008-10-23 14:44:28 tjc Exp $ */ package uk.ac.sanger.artemis.components; @@ -63,7 +63,7 @@ import javax.swing.JComponent; * Features. * * @author Kim Rutherford - * @version $Id: FeatureList.java,v 1.27 2008-10-23 14:38:55 tjc Exp $ + * @version $Id: FeatureList.java,v 1.28 2008-10-23 14:44:28 tjc Exp $ * **/ @@ -76,7 +76,9 @@ public class FeatureList extends EntryGroupPanel /** true if correlation scores should be shown */ private boolean show_correlation_scores = false; - /** set to true by selectionChanged() and used by paintComponent(). */ + /** + * This is set to true by selectionChanged() and used by paintComponent(). + **/ private boolean selection_changed_flag = false; /** colour used to draw the background. */ @@ -382,10 +384,29 @@ public class FeatureList extends EntryGroupPanel repaint(); } + /** + * Return a vector containing the text that is shown in the list - one + * String per line. + **/ + protected StringVector getListStrings() + { + final StringVector return_vector = new StringVector(); + final FeatureEnumeration test_enumerator = getEntryGroup().features(); + + while(test_enumerator.hasMoreFeatures()) + { + final Feature this_feature = test_enumerator.nextFeature(); + return_vector.add(makeFeatureString(this_feature, true)); + } + + return return_vector; + } + + /** * Return the JViewport that this component is contained in. */ - private JViewport getViewport() + protected JViewport getViewport() { if(viewport != null) return viewport; -- GitLab