From 4aca2a071e867e6f0af367b41ef8ece3d55d4a25 Mon Sep 17 00:00:00 2001
From: tjc <tjc@ee4ac58c-ac51-4696-9907-e4b3aa274f04>
Date: Fri, 6 Feb 2009 11:34:51 +0000
Subject: [PATCH] add getGeneNameList

git-svn-id: svn+ssh://svn.internal.sanger.ac.uk/repos/svn/pathsoft/artemis/trunk@9758 ee4ac58c-ac51-4696-9907-e4b3aa274f04
---
 .../genebuilder/ortholog/MatchPanel.java      | 19 ++++++++++++++++++-
 1 file changed, 18 insertions(+), 1 deletion(-)

diff --git a/uk/ac/sanger/artemis/components/genebuilder/ortholog/MatchPanel.java b/uk/ac/sanger/artemis/components/genebuilder/ortholog/MatchPanel.java
index 71f22c576..0b5390bb0 100644
--- a/uk/ac/sanger/artemis/components/genebuilder/ortholog/MatchPanel.java
+++ b/uk/ac/sanger/artemis/components/genebuilder/ortholog/MatchPanel.java
@@ -17,7 +17,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/genebuilder/ortholog/MatchPanel.java,v 1.26 2008-07-31 16:14:15 tjc Exp $
+ * $Header: //tmp/pathsoft/artemis/uk/ac/sanger/artemis/components/genebuilder/ortholog/MatchPanel.java,v 1.27 2009-02-06 11:34:51 tjc Exp $
  */
 
 package uk.ac.sanger.artemis.components.genebuilder.ortholog;
@@ -29,6 +29,7 @@ import java.awt.event.ActionEvent;
 import java.awt.event.ActionListener;
 import java.util.Collection;
 import java.util.Iterator;
+import java.util.List;
 import java.util.Vector;
 
 import javax.swing.Box;
@@ -577,6 +578,22 @@ public class MatchPanel extends JPanel
     return matchQualifiers;
   }
   
+  public List getGeneNameList()
+  {
+  	if(orthoparaLogTable == null || orthoparaLogTable.getTable().getRowCount()<1)
+  		return null;
+  	
+  	int columnIndex = orthoparaLogTable.getColumnIndex(orthoparaLogTable.GENE_COL);
+  	List geneNames = new Vector(orthoparaLogTable.getTable().getRowCount());
+  	for(int row=0; row<orthoparaLogTable.getTable().getRowCount(); row++)
+  	{
+  		String name[] = 
+  			((String)orthoparaLogTable.getTable().getValueAt(row, columnIndex)).split(":");
+  		geneNames.add(name[name.length-1]);
+  	}
+  	return geneNames;
+  }
+  
   public static String getDescription()
   {
     return "Ortholog/Paralog/Similarity";  
-- 
GitLab