diff --git a/uk/ac/sanger/artemis/plot/LineAttributes.java b/uk/ac/sanger/artemis/plot/LineAttributes.java index a04f29ca86bb83167391383290eedb20c709969e..7d0e12d13fbe53ae28f09ee8b705a024d1ce832c 100644 --- a/uk/ac/sanger/artemis/plot/LineAttributes.java +++ b/uk/ac/sanger/artemis/plot/LineAttributes.java @@ -171,9 +171,10 @@ public class LineAttributes */ public static Color parse(String colourStr) { - if(colourStr.indexOf(":") > -1) + if(colourStr.indexOf(":") > -1 || + colourStr.indexOf(",") > -1) { - String colourStrs[] = colourStr.split(":"); + String colourStrs[] = colourStr.split("[:,]"); return new Color(Integer.parseInt(colourStrs[0]), Integer.parseInt(colourStrs[1]), Integer.parseInt(colourStrs[2])); @@ -184,7 +185,8 @@ public class LineAttributes colourStr = colourStr.toLowerCase(); if (colourStr.length() > 6) - throw new NumberFormatException("not a 24 bit representation of the color"); + throw new NumberFormatException(colourStr+ + " not a 24 bit representation of the color"); Color color = new Color( Integer.parseInt( colourStr , 16 ) ); return color; @@ -302,6 +304,7 @@ public class LineAttributes } } + /** * Renderer for the JComboBox to define different line styles. */