int prepareRow(Graphics gTo, int windowWidth, int xStart, String msg, int row, String state, boolean hard, Color bgColor, float seeThrough, BufferedImage sparkLine, boolean addToScrollersIfNotFit, boolean isFlapping, boolean flash, int suggestedHeight)
	{
		int rowHeight = (getHeight() - (config.getShowHeader() ? config.getUpperRowBorderHeight() : 0))/ config.getNRows();
		if (suggestedHeight >= 1)
			rowHeight = Math.min(suggestedHeight, rowHeight);

		String font = config.getFontName();
		if (state.equals("1"))
			font = config.getWarningFontName();
		else if (state.equals("2"))
			font = config.getCriticalFontName();

		Integer reduceToWidth = null;
		RowParameters rowParameters = null;
		if (config.getReduceTextWidth()) {
			reduceToWidth = Math.max(0, windowWidth - (sparkLine != null ? sparkLine.getWidth() - (isFlapping && config.getShowFlappingIcon() ? rowHeight : 0): 0));
		}
		rowParameters = calcRowParameters(new Font(font, Font.PLAIN, rowHeight), msg, rowHeight, reduceToWidth);

		boolean scrollRequired = (config.getReduceTextWidth() == false && rowParameters.getTextWidth() > windowWidth && addToScrollersIfNotFit == true);
		if (scrollRequired || flash) {
			int yPos = 0;
			if (row > 0)
				yPos = rowHeight * row + (config.getShowHeader() ? config.getUpperRowBorderHeight() : 0);
			BufferedImage img = createRowImage(rowParameters, msg + " ", state, hard, bgColor, rowHeight, null, isFlapping);
System.out.println("xstart: " + xStart);
			windowMovingParts.add(new ScrollableContent(img, xStart, yPos, windowWidth, flash, scrollRequired));
		}
		else {
			// int w = img.getWidth();
			// int h = img.getHeight();
			// gTo.drawImage(img, xStart, yPos, xStart + w, yPos + h, 0, 0, w, h, Color.GRAY, null);
			drawRow(gTo, windowWidth, xStart, rowParameters, rowHeight, msg, row, state, hard, bgColor, seeThrough, sparkLine, isFlapping);
		}

		return rowParameters.getTextWidth();
	}