private int getFontStyle(FontParam param, String stereotype) { String value = null; if (stereotype != null) { checkStereotype(stereotype); value = getValue(param.name() + "fontstyle" + stereotype); } if (value == null) { value = getValue(param.name() + "fontstyle"); } if (value == null) { value = getValue("defaultfontstyle"); } if (value == null) { return param.getDefaultFontStyle(this); } int result = Font.PLAIN; if (value.toLowerCase().contains("bold")) { result = result | Font.BOLD; } if (value.toLowerCase().contains("italic")) { result = result | Font.ITALIC; } return result; }