}
return result;
}
protected StyleMapEntry getStyleMapEntry(String type, String label, String styleColor) {
StyleMapEntry result = new StyleMapEntry();
result.setAnnotationTypeName(type);
result.setLabel(label);
StringTokenizer token = new StringTokenizer(styleColor, ":;");
if (!token.hasMoreTokens()) {
return null; // No token
}
token.nextToken();
String fgString = token.nextToken().toLowerCase().trim();
result.setForeground(parseColorForeground(fgString));
token.nextToken();
String bgString = token.nextToken().toLowerCase().trim();
result.setBackground(parseColorBackground(bgString));
boolean checked = false; // default to Checked
if (token.hasMoreTokens()) {
String ck = token.nextToken();
String tf = token.nextToken();
if (ck.equals("checked")) {
if (tf.equals("false")) {
checked = false;
} else if (tf.equals("true")) {
checked = true;
}
}
}
result.setChecked(checked);
boolean hidden = false;
if (token.hasMoreTokens()) {
String ck = token.nextToken();
String tf = token.nextToken();
if (ck.equals("hidden")) {
if (tf.equals("true")) {
hidden = true;
}
}
}
result.setHidden(hidden);
return result;
}