*/
package jalview.bin;
+import java.awt.Color;
import java.io.*;
import java.util.*;
* </li>
* <li>SHOW_WSDISCOVERY_ERRORS (true) Controls if the web service URL discovery
* warning dialog box is displayed.</li>
+ * <li>ANNOTATIONCOLOUR_MIN (orange) Shade used for minimum value of annotation when shading by annotation</li>
+ * <li>ANNOTATIONCOLOUR_MAX (red) Shade used for maximum value of annotation when shading by annotation</li>
*
* <li></li>
*
}
}
+ /**
+ * get the user's default colour if available
+ * @param property
+ * @param defcolour
+ * @return
+ */
+ public static Color getDefaultColour(String property, Color defcolour)
+ {
+ String colprop = getProperty(property);
+ if (colprop==null) {
+ return defcolour;
+ }
+ Color col = jalview.schemes.ColourSchemeProperty.getAWTColorFromName(colprop);
+ if (col==null)
+ {
+ try {
+ col = new jalview.schemes.UserColourScheme(colprop).findColour('A');
+ } catch (Exception ex)
+ {
+ log.warn("Couldn't parse '"+colprop+"' as a colour for "+property);
+ col=null;
+ }
+ }
+ return (col==null) ? defcolour: col;
+ }
}