private String getLabelForState(IEntity entity) throws IOException {
		final DrawFile cFile = entity.getImageFile();
		final String stateBgcolor = getBackColorOfEntity(entity);

		final String stereotype = entity.getStereotype() == null ? null : entity.getStereotype().getLabel();

		final StringBuilder sb = new StringBuilder("<{<TABLE BGCOLOR=" + stateBgcolor
				+ " BORDER=\"0\" CELLBORDER=\"0\" CELLSPACING=\"0\">");
		sb.append("<TR><TD>"
				+ manageHtmlIB(StringUtils.getMergedLines(entity.getDisplay2()), FontParam.STATE, stereotype)
				+ "</TD></TR>");
		sb.append("</TABLE>");

		if (entity.getFieldsToDisplay().size() > 0) {
			sb.append("|");
			for (Member att : entity.getFieldsToDisplay()) {
				sb.append(manageHtmlIB(att.getDisplay(true), FontParam.STATE_ATTRIBUTE, stereotype));
				sb.append("<BR ALIGN=\"LEFT\"/>");
			}
		}

		if (cFile != null) {
			sb.append("|");
			final String path = StringUtils.getPlateformDependentAbsolutePath(cFile.getPng());
			final String bgcolor;
			if (OptionFlags.PBBACK) {
				bgcolor = stateBgcolor;
			} else {
				bgcolor = "\"" + getAsHtml(getData().getSkinParam().getBackgroundColor()) + "\"";
			}
			// PBBACK

			sb.append("<TABLE BORDER=\"0\" CELLBORDER=\"0\" CELLSPACING=\"0\" CELLPADDING=\"0\">");
			sb.append("<TR>");
			sb.append("<TD BGCOLOR=" + bgcolor + " BORDER=\"0\" CELLBORDER=\"0\" CELLSPACING=\"0\" CELLPADDING=\"2\">");
			sb.append("<IMG SRC=\"" + path + "\"/></TD></TR>");
			sb.append("</TABLE>");
		}

		if (getData().isHideEmptyDescription() == false && entity.getFieldsToDisplay().size() == 0 && cFile == null) {
			sb.append("|");
		}

		sb.append("}>");

		return sb.toString();
	}