*/
void setBorderColor(String colorName) {
if (colorName == null) {
colorName = DEFAULT_BORDER_COLOR;
}
final ColorRegistry colorRegistry = EclipseCommonPlugin.getColorRegistry();
Color borderColor = null;
synchronized (colorRegistry) {
borderColor = colorRegistry.get(colorName);
if (borderColor == null) {
RGB borderRGB = obtainRGBFromString(colorName);
if (borderRGB == null) {
borderColor = colorRegistry.get(DEFAULT_BORDER_COLOR);
if (borderColor == null) {
borderRGB = obtainRGBFromString(DEFAULT_BORDER_COLOR);
if (borderRGB == null) {
throw new IllegalStateException(
"Could not obtain an"
+ " RGB value for default border color: \""
+ DEFAULT_BORDER_COLOR + "\"");
}
colorRegistry.put(colorName, borderRGB);
borderColor = colorRegistry.get(colorName);
}
} else {
colorRegistry.put(colorName, borderRGB);
borderColor = colorRegistry.get(colorName);
}
}
}
setBorderColor(borderColor);
}