\r
StringBuffer colours = new StringBuffer();\r
StringBuffer graphLine = new StringBuffer();\r
-\r
+ StringBuffer rowprops = new StringBuffer();\r
Hashtable graphGroup = new Hashtable();\r
\r
java.awt.Color color;\r
colours.append("COLOUR\t" + row.label + "\t"\r
+ jalview.util.Format.getHexString(color) + "\n");\r
}\r
-\r
+ if (row.scaleColLabel || row.showAllColLabels || row.centreColLabels)\r
+ {\r
+ rowprops.append("ROWPROPERTIES\t"+row.label);\r
+ rowprops.append("\tscaletofit="+row.scaleColLabel);\r
+ rowprops.append("\tshowalllabs="+row.showAllColLabels);\r
+ rowprops.append("\tcentrelabs="+row.centreColLabels);\r
+ rowprops.append("\n");\r
+ }\r
}\r
\r
text.append("\n");\r
text.append(en.nextElement() + "\n");\r
}\r
}\r
+ text.append(rowprops);\r
}\r
\r
if (groups != null)\r
combineAnnotations(al, st);\r
continue;\r
}\r
-\r
+ else if (token.equalsIgnoreCase("ROWPROPERTIES"))\r
+ {\r
+ addRowProperties(al, st);\r
+ continue;\r
+ }\r
else if (token.equalsIgnoreCase("GRAPHLINE"))\r
{\r
addLine(al, st);\r
}\r
}\r
\r
+ void addRowProperties(AlignmentI al, StringTokenizer st)\r
+ {\r
+ String label = st.nextToken(),keyValue,key,value;\r
+ boolean scaletofit=false,centerlab=false,showalllabs=false;\r
+ while (st.hasMoreTokens()) {\r
+ keyValue=st.nextToken();\r
+ key = keyValue.substring(0, keyValue.indexOf("="));\r
+ value = keyValue.substring(keyValue.indexOf("=") + 1);\r
+ if (key.equalsIgnoreCase("scaletofit")) {\r
+ scaletofit = Boolean.valueOf(value).booleanValue();\r
+ }\r
+ if (key.equalsIgnoreCase("showalllabs")) {\r
+ showalllabs = Boolean.valueOf(value).booleanValue();\r
+ }\r
+ if (key.equalsIgnoreCase("centrelabs")) {\r
+ centerlab = Boolean.valueOf(value).booleanValue();\r
+ }\r
+ AlignmentAnnotation[] alr = al.getAlignmentAnnotation(); \r
+ for (int i = 0; i < alr.length; i++)\r
+ {\r
+ if (alr[i].label.equalsIgnoreCase(label))\r
+ {\r
+ alr[i].centreColLabels = centerlab;\r
+ alr[i].scaleColLabel = scaletofit;\r
+ alr[i].showAllColLabels = showalllabs;\r
+ }\r
+ }\r
+ }\r
+ }\r
void addProperties(AlignmentI al, StringTokenizer st)\r
{\r
\r