From 63e4d4c2e14852e9bd65276c22c28e264d35ea5d Mon Sep 17 00:00:00 2001
From: tjc <tjc@ee4ac58c-ac51-4696-9907-e4b3aa274f04>
Date: Tue, 7 Jul 2009 14:38:35 +0000
Subject: [PATCH] read line colours from the header of user plots

git-svn-id: svn+ssh://svn.internal.sanger.ac.uk/repos/svn/pathsoft/artemis/trunk@11332 ee4ac58c-ac51-4696-9907-e4b3aa274f04
---
 uk/ac/sanger/artemis/components/Plot.java | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/uk/ac/sanger/artemis/components/Plot.java b/uk/ac/sanger/artemis/components/Plot.java
index e8953e814..1ccb3a4ce 100644
--- a/uk/ac/sanger/artemis/components/Plot.java
+++ b/uk/ac/sanger/artemis/components/Plot.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/Plot.java,v 1.21 2009-06-26 15:52:48 tjc Exp $
+ * $Header: //tmp/pathsoft/artemis/uk/ac/sanger/artemis/components/Plot.java,v 1.22 2009-07-07 14:38:35 tjc Exp $
  **/
 
 package uk.ac.sanger.artemis.components;
@@ -48,7 +48,7 @@ import javax.swing.JPopupMenu;
  *  This class implements a simple plot component.
  *
  *  @author Kim Rutherford
- *  @version $Id: Plot.java,v 1.21 2009-06-26 15:52:48 tjc Exp $
+ *  @version $Id: Plot.java,v 1.22 2009-07-07 14:38:35 tjc Exp $
  **/
 
 public abstract class Plot extends JPanel 
@@ -697,7 +697,11 @@ public abstract class Plot extends JPanel
     {
       final int get_values_return_count =
        ((BaseAlgorithm)getAlgorithm()).getValueCount();
-      lines = LineAttributes.init(get_values_return_count);
+      
+      if(getAlgorithm() instanceof UserDataAlgorithm)
+        lines = ((UserDataAlgorithm)getAlgorithm()).getLineAttributes();
+      if(lines == null)
+        lines = LineAttributes.init(get_values_return_count);
     }
     
     numPlots = drawMultiValueGraph(og,lines);
-- 
GitLab